Advertisement
Guest User

CS:S External Base coded by Scribzz

a guest
Sep 5th, 2015
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 15.39 KB | None | 0 0
  1. /*
  2. **********************************************************************
  3. *  ___ ___ ___   ___     _                     _   ___               *    
  4. * / __/ __/ __| | __|_ _| |_ ___ _ _ _ _  __ _| | | _ ) __ _ ___ ___ *
  5. *| (__\__ \__ \ | _|\ \ /  _/ -_) '_| ' \/ _` | | | _ \/ _` (_-</ -_)*
  6. * \___|___/___/ |___/_\_\\__\___|_| |_||_\__,_|_| |___/\__,_/__/\___|*
  7. *                                                                    *
  8. **********************************************************************
  9.  
  10. *CS:S External Base coded by Scribzz*
  11. *Credits : Sandaasu , Guidedhacking*
  12.  
  13. ************Features************
  14.  
  15. *BunnyHop
  16. *TriggerBot
  17. *Burst-Fire
  18. *Anti Recoil
  19. *sv_cheat Bypass
  20. *sv_pure Bypass
  21. *sv_consistency Bypass
  22. *Wireframe ESP
  23. *Fullbright
  24. *No Smoke
  25. *No Flash
  26. *No Hands
  27. *No Sky
  28. *Draw FPS
  29. *Radar
  30. */
  31. bool bSpotted = true;
  32. bool bEnabled = true;
  33. #include <windows.h>
  34. #include <iostream>
  35. #include <tlhelp32.h>
  36. #include <tchar.h>
  37. #include <cstdlib>
  38. #include <stdio.h>  
  39. #include <direct.h>
  40. #include <stdio.h>  
  41. #include <limits>
  42. #include <fstream>
  43. #include <conio.h>
  44. #include <strsafe.h>
  45. #define GetCurrentDir _getcwd
  46. #define M5 0x06
  47. #define space 0x20
  48. #define xxx 0x7B
  49. #define stand 257
  50. #define aerial 256
  51. #define c_jumping 260
  52. #define c_jump 262
  53. int cheats_off = 0;
  54. int cheats_on = 1;
  55. int pure_on = 0;
  56. int pure_off = 1;
  57. int consistency_on = 0;
  58. int consistency_off = 1;
  59. int wire_off = 1;
  60. int wire_on = 2;
  61. int bright_on = 1;
  62. int bright_off = 2;
  63. int no_smoke_on = 0;
  64. int no_smoke_off = 1;
  65. int no_hands_off = 0;
  66. int no_hands_on = 1;
  67. int no_sky_on = 0;
  68. int no_sky_off = 1;
  69. int draw_fps_off = 0;
  70. int draw_fps_on = 1;
  71. int maxplayers = 64;
  72. int gDelay;
  73. int sDelay;
  74. int Time = 25;
  75. int Delay = 17;
  76. int BurstEnable = 0;
  77. bool a = false;
  78. bool b = false;
  79. const DWORD m_bSpotted = 0x935;
  80. const DWORD eBaseAddy = 0x5451BC;
  81. const DWORD PBAddy = 0x538984;
  82. const DWORD JumpOff = 0x00;
  83. const DWORD teamOffs = 0x00;
  84. const DWORD xHairOffs = 0x1478;
  85. const DWORD LoopDistance = 0x10;
  86. using std::numeric_limits;
  87. using std::streamsize;
  88. using std::cout;
  89. using std::cin;
  90. char trigEnable = 'n';
  91. char _Nb;
  92. float sd = 0.0f;
  93. bool i = true;
  94. int n = 0;
  95.  
  96. DWORD _c0d_3r_dwGetModuleBaseAddress(DWORD _xCt_0_dwProcessIdentifier, TCHAR *sym_lpszModuleName);
  97. using namespace std;
  98.  
  99. int A_()
  100. {
  101.     DWORD pID;
  102.     HANDLE hHandle;
  103.     HWND hWnd;
  104.  
  105.  
  106.     SetConsoleTitle( "External BASE by Scribzz" );
  107.     hWnd = FindWindow(0, "Counter-Strike Source");
  108.     GetWindowThreadProcessId( hWnd, &pID);
  109.     hHandle = OpenProcess( PROCESS_ALL_ACCESS, 0, pID);
  110.  
  111.     if(hHandle)
  112.     {
  113.         if(!hWnd)
  114.         {          
  115.         return 0;
  116.         }
  117.         else
  118.         {
  119.             system("cls");
  120.             system("Color 8A");
  121.             cout << "..... Game found ! :) " << "\n "<< endl;
  122.             cout << "Loading features..." << "\n"<< endl;
  123.             DWORD EngineDll;
  124.             EngineDll = _c0d_3r_dwGetModuleBaseAddress( pID, "engine.dll");
  125.             DWORD ClientDll;
  126.             ClientDll = _c0d_3r_dwGetModuleBaseAddress( pID, "client.dll");
  127.             DWORD materialsystemDll;
  128.             materialsystemDll = _c0d_3r_dwGetModuleBaseAddress( pID, "materialsystem.dll");
  129.            
  130.     if (GetAsyncKeyState(VK_F1) && a == false)
  131.      {
  132.             WriteProcessMemory( hHandle, (LPVOID)( EngineDll + 0x674B98), &cheats_on, sizeof(int), NULL);
  133.             cout << "sv_Cheats bypass =  ON! " << "\n" << endl;
  134.             Sleep(1000);
  135.      }
  136.     if (GetAsyncKeyState(VK_F1) && a == true)
  137.      {
  138.         WriteProcessMemory( hHandle, (LPVOID)( EngineDll + 0x674B98), &cheats_off, sizeof(int), NULL);
  139.          a = false;
  140.          cout << "sv_Cheats bypass =  OFF! " << "\n" << endl;
  141.          Sleep(1000);
  142.      }
  143.     if (GetAsyncKeyState(VK_F2) && a == true)
  144.      {
  145.         WriteProcessMemory( hHandle, (LPVOID)( EngineDll + 0x3B89F0), &pure_on, sizeof(int), NULL);
  146.          a = false;
  147.          cout << "sv_pure bypass =  OFF! " << "\n" << endl;
  148.          Sleep(1000);
  149.      }
  150.     if (GetAsyncKeyState(VK_F2) && a == false)
  151.      {
  152.          WriteProcessMemory( hHandle, (LPVOID)( EngineDll + 0x3B89F0), &pure_off, sizeof(int), NULL);
  153.          a = true;
  154.          cout << "sv_pure bypass  =  ON! " << "\n" << endl;
  155.          Sleep(1000);
  156.      }
  157.     if (GetAsyncKeyState(VK_F3) && a == true)
  158.      {
  159.         WriteProcessMemory( hHandle, (LPVOID)( EngineDll + 0x5C51E4), &consistency_on, sizeof(int), NULL);
  160.          a = false;
  161.          cout << "sv_consistency bypass =  OFF! " << "\n" << endl;
  162.          Sleep(1000);
  163.      }
  164.     if (GetAsyncKeyState(VK_F3) && a == false)
  165.      {
  166.          WriteProcessMemory( hHandle, (LPVOID)( EngineDll + 0x5C51E4), &consistency_off, sizeof(int), NULL);
  167.          a = true;
  168.          cout << "sv_pure consistency  =  ON! " << "\n" << endl;
  169.          Sleep(1000);
  170.      }
  171.     if (GetAsyncKeyState(VK_F4) && a == false)
  172.      {
  173.          WriteProcessMemory( hHandle, (LPVOID)( ClientDll + 0x5350F0), &wire_on, sizeof(int), NULL);
  174.          a = true;
  175.          cout << "ESP boxes  =  ON! " << "\n" << endl;
  176.          Sleep(1000);
  177.      }
  178.      if (GetAsyncKeyState(VK_F4) && a == true)
  179.      {
  180.          WriteProcessMemory( hHandle, (LPVOID)( ClientDll + 0x5350F0), &wire_off, sizeof(int), NULL);
  181.          a = false;
  182.          cout << "ESP boxes  =  OFF! " << "\n" << endl;
  183.          Sleep(1000);
  184.      }
  185.  
  186.  
  187.         if (GetAsyncKeyState(VK_F5) && a == false)
  188.      {
  189.          WriteProcessMemory( hHandle, (LPVOID)( materialsystemDll + 0x10E4B0), &bright_on, sizeof(int), NULL);
  190.          a = true;
  191.          cout << "Fullbright  =  ON! " << "\n" << endl;
  192.          Sleep(1000);
  193.      }
  194.      if (GetAsyncKeyState(VK_F5) && a == true)
  195.      {
  196.          WriteProcessMemory( hHandle, (LPVOID)( materialsystemDll + 0x10E4B0), &bright_off, sizeof(int), NULL);
  197.          a = false;
  198.          cout << "Fullbright  =  OFF! " << "\n" << endl;
  199.          Sleep(1000);
  200.      }
  201.      if (GetAsyncKeyState(VK_F6) && a == false)
  202.      {
  203.         WriteProcessMemory( hHandle, (LPVOID)( ClientDll + 0x567048), &no_smoke_on, sizeof(int), NULL);
  204.         cout << "No Smoke =  ON! " << "\n" << endl;
  205.         Sleep(1000);
  206.      }
  207.     if (GetAsyncKeyState(VK_F6) && a == true)
  208.      {
  209.         WriteProcessMemory( hHandle, (LPVOID)( ClientDll + 0x567048), &no_smoke_off, sizeof(int), NULL);
  210.          a = false;
  211.          cout << "No_Smoke =  OFF! " << "\n" << endl;
  212.          Sleep(1000);
  213.      }
  214.      if (GetAsyncKeyState(VK_F7) && a == false)
  215.      {
  216.          WriteProcessMemory( hHandle, (LPVOID)( ClientDll + 0x8A6768), &no_hands_on, sizeof(int), NULL);
  217.          a = true;
  218.          cout << "NO Hands = ON! " << "\n" << endl;
  219.          Sleep(1000);
  220.      }
  221.      if (GetAsyncKeyState(VK_F7) && a == true)
  222.      {
  223.          WriteProcessMemory( hHandle, (LPVOID)( ClientDll + 0x8A6768), &no_hands_off, sizeof(int), NULL);
  224.          a = false;
  225.          cout << "NO Hands = OFF! " << "\n" << endl;
  226.          Sleep(1000);
  227.      }
  228.      if (GetAsyncKeyState(VK_F8) && a == false)
  229.      {
  230.          WriteProcessMemory( hHandle, (LPVOID)( ClientDll + 0x56E748), &no_sky_on, sizeof(int), NULL);
  231.          a = true;
  232.          cout << "NO Hands = ON! " << "\n" << endl;
  233.          Sleep(1000);
  234.      }
  235.      if (GetAsyncKeyState(VK_F8) && a == true)
  236.      {
  237.          WriteProcessMemory( hHandle, (LPVOID)( ClientDll + 0x56E748), &no_sky_off, sizeof(int), NULL);
  238.          a = false;
  239.          cout << "NO Hands = OFF! " << "\n" << endl;
  240.          Sleep(1000);
  241.      }
  242.      if (GetAsyncKeyState(VK_F9) && a == false)
  243.      {
  244.          WriteProcessMemory( hHandle, (LPVOID)( ClientDll + 0x56B008), &draw_fps_on, sizeof(int), NULL);
  245.          a = true;
  246.          cout << "FPS = ON! " << "\n" << endl;
  247.          Sleep(1000);
  248.      }
  249.      if (GetAsyncKeyState(VK_F9) && a == true)
  250.      {
  251.          WriteProcessMemory( hHandle, (LPVOID)( ClientDll + 0x56B008), &draw_fps_off, sizeof(int), NULL);
  252.          a = false;
  253.          cout << "FPS = OFF! " << "\n" << endl;
  254.          Sleep(1000);
  255.      } 
  256.          cout << "Loading Complete , Closing in 8 seconds..." << endl;
  257.          Sleep(8000);
  258.          exit(0);
  259.         }
  260.     }
  261.     else
  262.     {
  263.         system("Color 8C");
  264.         cout << "Error! You need to join a game before load executable..." << endl;
  265.  
  266.         Sleep(3000);
  267.         exit(0);           
  268.     }
  269.     return 0;
  270. }
  271.  
  272. struct lmao
  273.     {
  274.     DWORD ClientDll;
  275.     DWORD PB;
  276.     DWORD EBase;
  277.     HANDLE hHandle;
  278.     DWORD CurrentEBase;
  279.     bool toggle;
  280.     int mT;
  281.     int eT;
  282.     int xID;
  283.     int flag;
  284.  
  285.     void read()
  286.     {
  287.         ReadProcessMemory( hHandle, (LPVOID)(ClientDll + eBaseAddy), &EBase, sizeof(DWORD), NULL);
  288.         ReadProcessMemory( hHandle, (LPCVOID*)(ClientDll +  PBAddy), &PB, sizeof(DWORD), NULL);
  289.         ReadProcessMemory( hHandle, (LPCVOID*)(PB +  JumpOff), &flag, sizeof(int), NULL);
  290.         ReadProcessMemory( hHandle, (LPVOID)(PB+teamOffs), &mT, sizeof(int), NULL);
  291.         ReadProcessMemory( hHandle, (LPVOID)(PB+xHairOffs), &xID, sizeof(int), NULL);
  292.         ReadProcessMemory( hHandle, (LPVOID)((ClientDll + eBaseAddy) + ((xID - 1) * LoopDistance)), &CurrentEBase, sizeof(DWORD), NULL);
  293.         ReadProcessMemory( hHandle, (LPVOID)(CurrentEBase + teamOffs), &eT, sizeof(DWORD), NULL);
  294.         ReadProcessMemory( hHandle, (LPVOID)(ClientDll + 0x74575C), &PB, sizeof(DWORD), NULL);
  295.     }
  296.     void FlashAlpha(float Alpha){
  297.         WriteProcessMemory( hHandle, (LPVOID)(PB + 0x1410), &Alpha, sizeof(float), NULL);  
  298.     }  
  299.     }lol;
  300.  
  301. DWORD _c0d_3r_dwGetModuleBaseAddress(DWORD _xCt_0_dwProcessIdentifier, TCHAR *sym_lpszModuleName)
  302. {
  303.     HANDLE Ak3_sk3r_hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, _xCt_0_dwProcessIdentifier);
  304.     DWORD b1_0t_dwModuleBaseAddress = 0;
  305.     if (Ak3_sk3r_hSnapshot != INVALID_HANDLE_VALUE)
  306.     {
  307.         MODULEENTRY32 _An0n_ym0us_ME32 = { 0 };
  308.         _An0n_ym0us_ME32.dwSize = sizeof(MODULEENTRY32);
  309.         if (Module32First(Ak3_sk3r_hSnapshot, &_An0n_ym0us_ME32))
  310.         {
  311.             do
  312.             {
  313.                 if (_tcsicmp(_An0n_ym0us_ME32.szModule, sym_lpszModuleName) == 0)
  314.                 {
  315.                     b1_0t_dwModuleBaseAddress = (DWORD)_An0n_ym0us_ME32.modBaseAddr;
  316.                     break;
  317.                 }
  318.             } while (Module32Next(Ak3_sk3r_hSnapshot, &_An0n_ym0us_ME32));
  319.         }
  320.         CloseHandle(Ak3_sk3r_hSnapshot);
  321.     }
  322.     return b1_0t_dwModuleBaseAddress;
  323. }
  324.  
  325. int random(int limit)
  326. {
  327.     int div = RAND_MAX/(limit+1);
  328.     int ret;
  329.  
  330.     do
  331.     {
  332.         ret = rand() / div;
  333.     }
  334.     while (ret > limit);
  335.  
  336.     return ret;
  337. }
  338.  
  339. void Sleeptime(int Seconds){
  340.     Sleep(Seconds * 1000);
  341. }
  342.  
  343. void Burst()
  344. {
  345.     if(BurstEnable == 1)
  346.     {
  347.         Time = 24;
  348.         Delay = 16;
  349.     }
  350.     if(BurstEnable == 2)
  351.     {
  352.         Time = 33;
  353.         Delay = 300;
  354.     }
  355.     if(BurstEnable == 3)
  356.     {
  357.         Time = 112;
  358.         Delay = 380;
  359.     }
  360.     Sleep(1);
  361. }
  362.  
  363. void M()
  364.     {
  365.         mouse_event(MOUSEEVENTF_WHEEL, 0, 0, -120, 0);
  366.        
  367.  
  368.         Sleep(250);
  369.     }  
  370.  
  371. void bH()
  372.     {
  373.         for(int p_nK_xY_i = 0;p_nK_xY_i != 3 && (GetAsyncKeyState(space));p_nK_xY_i++)
  374.         {
  375.             lol.read();
  376.             if(lol.flag != aerial && lol.flag != c_jump && lol.flag != c_jumping)
  377.             {
  378.                 if(_Nb == 'y')
  379.                 {
  380.                    M();
  381.                 }
  382.                 if(_Nb == 'n')
  383.                 {
  384.                 exit(0);
  385.                 }
  386.             }
  387.         }
  388.         Sleep(1);
  389.     }
  390.  
  391. void TBoat()
  392. {  
  393.     lol.read();
  394.     Burst();
  395.  
  396.     if(lol.xID == 0)
  397.     return;
  398.  
  399.     if(lol.xID > maxplayers)
  400.     return;
  401.  
  402.     if(lol.eT == lol.mT)
  403.     return;
  404.  
  405.     int Number = random(2);
  406.     int Delay =Number + 11;
  407.  
  408.     if(lol.xID != 0)
  409.     {
  410.         Sleep(Delay);
  411.         mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
  412.         Sleep(Time);
  413.         mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
  414.         Sleep(Delay);
  415.     }
  416.     Sleep(1);
  417. }
  418.  
  419. void Radar()
  420. {
  421.     HANDLE hHandle;
  422.     DWORD ClientDll;
  423.     for( int i = 0; i < 32; i++ )
  424.     {
  425.         DWORD dwEntity = 0;
  426.         ReadProcessMemory( hHandle, (LPVOID)( ClientDll + 0xA89444 + i * 0x10 ), &dwEntity, 4, NULL );
  427.         WriteProcessMemory( hHandle, (LPVOID)( dwEntity + m_bSpotted ), &bSpotted, 1, NULL );
  428.     }
  429. while( !GetAsyncKeyState( 0x77 ) )
  430. {
  431.     if( GetAsyncKeyState( 0x09 ) & 1 )
  432.     {
  433.         bEnabled = !bEnabled;
  434.     }
  435.  
  436.     if( bEnabled )
  437.     {
  438.         Radar();
  439.     }
  440.     }
  441. Sleep(1);
  442. }
  443.  
  444. void init(){
  445.     {  
  446.         SetConsoleTitle( "CS:S External Base by Scribzz" );
  447.         system("Color 80");
  448.  
  449. cout << "" << endl;
  450. cout << "\t\t******COUNTER-STRIKE: SOURCE EXTERNAL BASE*******" << endl;
  451. cout << "\t\t***********************..,***********************" << endl;
  452. cout << "\t\t*********************.....,**********************" << endl;
  453. cout << "\t\t********************,.....***********************" << endl;
  454. cout << "\t\t******************.....................,*..******" << endl;
  455. cout << "\t\t*****************........,........,*/*/**********" << endl;
  456. cout << "\t\t*****************.............,,*.***************" << endl;
  457. cout << "\t\t****************,........,***********************" << endl;
  458. cout << "\t\t****************........,************************" << endl;
  459. cout << "\t\t****************........*************************" << endl;
  460. cout << "\t\t****************,........,***********************" << endl;
  461. cout << "\t\t****************...........,*********************" << endl;
  462. cout << "\t\t***************.....,*,....,*********************" << endl;
  463. cout << "\t\t**************,.....****.....********************" << endl;
  464. cout << "\t\t**************.....******.....*******************" << endl;
  465. cout << "\t\t************......********....,******************" << endl;
  466. cout << "\t\t**************Coded by Scribzz*******************" << endl;
  467.         cout << "" << endl;
  468.         cout << "\t\t   Enable Bhop, Bind Jump To MWheelDown!" << endl;
  469.         cout << "" << endl;
  470.         cout << "\t\t   Enable TriggerBot By Pressing Mouse4!" << endl;
  471.         cout << "" << endl;
  472.         cout << "\t\t   Enable Burst-Fire? (1= No, 2= Burst)\n";
  473.         cin >> BurstEnable;
  474.         cout << "\t\t   F1 sv_cheats Bypass" << endl;
  475.  
  476.         cout << "\t\t   F2 sv_pure Bypass" << endl;
  477.  
  478.         cout << "\t\t   F3 sv_consistency Bpass" << endl;
  479.  
  480.         cout << "\t\t   F4 ESP" << endl;
  481.  
  482.         cout << "\t\t   F5 Fullbright" << endl;
  483.  
  484.         cout << "\t\t   F6 No Smoke" << endl;
  485.  
  486.         cout << "\t\t   F7 No Hands" << endl;
  487.  
  488.         cout << "\t\t   F8 No Hands" << endl;
  489.  
  490.         cout << "\t\t   F9 Draw FPS" << endl;
  491.  
  492.         cout << "\t\t   Press ENTER after joining a game..." << "\n " << endl;
  493.        
  494.         cin.get();
  495.         system("cls");
  496.         A_();          
  497.     }
  498. }
  499.  
  500. int main(int argc, _TCHAR* argv[])
  501. {
  502.     init();
  503.  
  504.     void a1();
  505.     POINT pft;
  506.  
  507.  
  508.     while(i)
  509.     {
  510.         GetCursorPos(&pft);
  511.  
  512.         if(GetAsyncKeyState(M5))       
  513.         {
  514.           n++;
  515.             sd += 0.1f;
  516.             if(n < 300) SetCursorPos(pft.x - (int)sd,pft.y + 1);
  517.             if(sd > 1.1f) sd = 0.0f;
  518.  
  519.             if(n < 50)
  520.                 Sleep(4);
  521.             else if(n < 75)
  522.                 Sleep(6);
  523.             else if(n < 200)
  524.                 Sleep(9);
  525.             else if(n < 350)
  526.                 Sleep(15);
  527.             else
  528.                 Sleep(25);
  529.         }
  530.             else
  531.             n = 0;
  532.     }
  533. char A[5];
  534. DWORD S = 500;  
  535. ifstream ifile("C:/GuidedHacking.cfg");
  536. if (!ifile)
  537.     {  
  538.         ofstream Settings;
  539.         Settings.open("C:/GuidedHacking.cfg");
  540.         Settings << "[FlashBangAlpha]" << endl;
  541.         Settings << "Alpha=22" << endl;
  542.         Settings.close();
  543.     }
  544.     GetPrivateProfileString("FlashBangAlpha", "Alpha", NULL, A, S, "C:/GuidedHacking.cfg");
  545.     float AlphaF = atoi(A);  
  546.         lol.read();
  547.         lol.FlashAlpha(AlphaF);    
  548.     while (true)  
  549.     {
  550.         Sleep(1);
  551.         lol.read();
  552.         lol.FlashAlpha(AlphaF);  
  553.     }
  554.     getchar();
  555.     {
  556.  
  557.  
  558.  
  559.          while(!GetAsyncKeyState(xxx))
  560.         {    
  561.             while(GetAsyncKeyState(space))
  562.             {
  563.                 bH();
  564.                 }
  565.                 while(GetAsyncKeyState(M5))
  566.                 {
  567.                 TBoat();
  568.                 }
  569.              }
  570.         }
  571.     return 0;
  572.     }
  573.  
  574. DWORD GetMB(const DWORD dwProcId, const char *szModuleName)
  575. {
  576.     HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwProcId);
  577.     if (!hSnap)
  578.     {
  579.         return 0;
  580.     }
  581.     MODULEENTRY32 me;
  582.     me.dwSize = sizeof(MODULEENTRY32);
  583.     DWORD dwReturn = 0;
  584.     if (Module32First(hSnap, &me))
  585.     {
  586.         while (Module32Next(hSnap, &me))
  587.         {
  588.             if (lstrcmpi(me.szModule, szModuleName) == 0)
  589.             {
  590.                 dwReturn = (DWORD)me.modBaseAddr;
  591.                 break;
  592.             }
  593.         }
  594.     }
  595.     CloseHandle(hSnap);
  596.     return dwReturn;
  597. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement