From a25b6f6b11a3ae44d0c3b19ba8081a3d9eb1ac5f Mon Sep 17 00:00:00 2001 From: boris Date: Mon, 10 Dec 2018 15:34:33 +1300 Subject: removed loader 'tism --- loader/client/client_windows.cpp | 30 ++++----------- loader/client/connect.hpp | 79 +--------------------------------------- 2 files changed, 10 insertions(+), 99 deletions(-) (limited to 'loader/client') diff --git a/loader/client/client_windows.cpp b/loader/client/client_windows.cpp index 9795e17..225b37f 100644 --- a/loader/client/client_windows.cpp +++ b/loader/client/client_windows.cpp @@ -35,30 +35,16 @@ 17. Call DLLMain with correct parameters (Included Base Addresses) 18. In cheat DLLMain set up base addresses and do cheat stuff. */ - -// note below is just pseudo unprotected code... -// will make not retarded soon. int main( ) { - // TEMPORARY, WE NEED TO ENCRYPT IP STRING SO WE DON'T HAVE DDOS NOOBS. - // or we could do char address[] = { 127, 0, 0, 1 }; - std::string ip = "127.0.0.1"; - // std::cin >> ip; - - // okay now this is epic - auto syscaller = std::make_unique(); - - if (!syscaller->start()) - return 3; - // START. - //client::c_connect c( ip.c_str( ) ); - //if( !c.setup( ) ) - // return 1; - // - //if( !c.connect( ) ) - // return 2; - // - //c.handle( ); + client::c_connect c( "127.0.0.1" ); + if( !c.setup( ) ) + return 1; + + if( !c.connect( ) ) + return 2; + + c.handle( ); system( "pause" ); diff --git a/loader/client/connect.hpp b/loader/client/connect.hpp index ddf23a0..187e72f 100644 --- a/loader/client/connect.hpp +++ b/loader/client/connect.hpp @@ -189,89 +189,14 @@ namespace client } } - void handle( ) { - + void handle( ) { auto msg = get_string( ); if ( msg != xors( "hello" ) ) { std::cout << "connection failed." << std::endl; //return 0; } - send_msg( "hello" ); - - std::string username{ }, password{ }; - std::cout << "Enter your username" << std::endl << "> "; - std::cin >> username; - - send_msg( username.c_str( ) ); - msg = get_string( ); - std::cout < "; - std::cin >> password; - - send_msg( password.c_str( ) ); - if ( get_string( ) != xors( "correct password" ) ) { - std::cout << "incorrect password"; - //return 0; // remember to close connection on server when bad values were sent. - } - - // Receive list of games, - msg = get_string( ); - std::cout << msg << std::endl; - - - std::cout << "For what game do you want to inject on?" << std::endl << "> "; - - char game_id{ }; - std::cin >> game_id; - - send_msg( game_id ); - - // get process name. - msg = get_string( ); - - std::cout << msg << std::endl; - - int process_identifier{ }; - - HANDLE snapshot = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 ); - if ( snapshot != INVALID_HANDLE_VALUE ) { - PROCESSENTRY32 entry{ sizeof( PROCESSENTRY32 ) }; - - if ( Process32First( snapshot, &entry ) ) { - do { - if ( msg == entry.szExeFile ) { - process_identifier = entry.th32ProcessID; - break; - } - } while ( Process32Next( snapshot, &entry ) ); - } - } - - if ( !process_identifier ) { - std::cout << "Could not find process." << std::endl; - return; - } - - std::cout << "found" << std::endl; - send_msg( "found" ); - - auto file = get_msg( ); - auto file_data = file.data( ); - auto file_size = file.size( ); - - auto save_file = std::ofstream( "gmod.txt", std::ofstream::binary ); - if ( save_file.is_open( ) ) { - save_file.write( ( const char* )file_data, file_size ); - save_file.close( ); - } - - + send_msg( "hello" ); } private: -- cgit v1.2.3