Advertisement
Guest User

Untitled

a guest
Jul 5th, 2016
476
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.63 KB | None | 0 0
  1. vvvar fs = require("fs"),
  2. Steam = require("steam"),
  3. SteamID = require("steamid"),
  4. IntervalInt = null,
  5. readlineSync = require("readline-sync"),
  6. Protos = require("./protos/protos.js"),
  7. CountReports = 0,
  8. Long = require("long"),
  9. steamID = readlineSync.question("SteamID64 which will be reported: ");
  10.  
  11. var ClientHello = 4006,
  12. ClientWelcome = 4004;
  13.  
  14. var accounts = [];
  15.  
  16. var arrayAccountsTxt = fs.readFileSync("accounts.txt").toString().split("\n");
  17. for (i in arrayAccountsTxt) {
  18. var accInfo = arrayAccountsTxt[i].toString().trim().split(":");
  19. var username = accInfo[0];
  20. var password = accInfo[1];
  21. accounts[i] = [];
  22. accounts[i].push({
  23. username: username,
  24. password: password
  25. });
  26. }
  27.  
  28. function loginAndReport(steamID) {
  29. if ((steamID == "") || !(steamID.indexOf("765") > -1) || (steamID.length < 17)) {
  30. console.log("That's not a valid SteamID!");
  31. process.exit();
  32. }
  33. if (accounts[0]) {
  34. var account = accounts[0][0];
  35. var account_name = account.username;
  36. var password = account.password;
  37. Client = new Steam.SteamClient();
  38. User = new Steam.SteamUser(Client);
  39. GC = new Steam.SteamGameCoordinator(Client, 730);
  40. Friends = new Steam.SteamFriends(Client);
  41.  
  42. Client.connect();
  43.  
  44. Client.on("connected", function() {
  45. User.logOn({
  46. account_name: account_name,
  47. password: password
  48. });
  49. });
  50.  
  51. Client.on("logOnResponse", function(res) {
  52. if (res.eresult !== Steam.EResult.OK) {
  53. if (res.eresult == Steam.EResult.ServiceUnavailable) {
  54. console.log("\n[STEAM CLIENT - " + account_name + "] Login failed - STEAM IS DOWN!");
  55. console.log(res);
  56. Client.disconnect();
  57. process.exit();
  58. } else {
  59. console.log("\n[STEAM CLIENT - " + account_name + "] Login failed!");
  60. console.log(res);
  61. Client.disconnect();
  62. accounts.splice(0, 1);
  63. loginAndReport(steamID);
  64. }
  65. } else {
  66. console.log("\n[STEAM CLIENT - " + account_name + "] Logged in!");
  67.  
  68. Friends.setPersonaState(Steam.EPersonaState.Offline);
  69.  
  70. User.gamesPlayed({
  71. games_played: [{
  72. game_id: 730
  73. }]
  74. });
  75.  
  76. if (GC) {
  77. IntervalInt = setInterval(function() {
  78. GC.send({
  79. msg: ClientHello,
  80. proto: {}
  81. }, new Protos.CMsgClientHello({}).toBuffer());
  82. }, 2000);
  83. console.log("[GC - " + account_name + "] Client Hello sent!");
  84. } else {
  85. console.log("[GC - " + account_name + "] Not initialized!");
  86. Client.disconnect();
  87. accounts.splice(0, 1);
  88. loginAndReport(steamID);
  89. }
  90. }
  91. });
  92.  
  93. Client.on("error", function(err) {
  94. console.log("[STEAM CLIENT - " + account_name + "] " + err);
  95. console.log("[STEAM CLIENT - " + account_name + "] Account is probably ingame!");
  96. Client.disconnect();
  97. accounts.splice(0, 1);
  98. loginAndReport(steamID);
  99. });
  100.  
  101. GC.on("message", function(header, buffer, callback) {
  102. switch (header.msg) {
  103. case ClientWelcome:
  104. clearInterval(IntervalInt);
  105. console.log("[GC - " + account_name + "] Client Welcome received!");
  106. console.log("[GC - " + account_name + "] Report request sent!");
  107. sendReport(GC, Client, account_name, steamID);
  108. break;
  109. case Protos.ECsgoGCMsg.k_EMsgGCCStrike15_v2_MatchmakingGC2ClientHello:
  110. console.log("[GC - " + account_name + "] MM Client Hello sent!");
  111. break;
  112. case Protos.ECsgoGCMsg.k_EMsgGCCStrike15_v2_ClientReportResponse:
  113. console.log("[GC - " + account_name + "] Report with confirmation ID: " + Protos.CMsgGCCStrike15_v2_ClientReportResponse.decode(buffer).confirmationId.toString() + " sent!");
  114. Client.disconnect();
  115. accounts.splice(0, 1);
  116. CountReports++;
  117. loginAndReport(steamID);
  118. break;
  119. default:
  120. console.log(header);
  121. break;
  122. }
  123. });
  124. } else {
  125. console.log("\n\n" + CountReports + " report(s) successfully sent!");
  126. Client.disconnect();
  127. }
  128. }
  129.  
  130. function sendReport(GC, Client, account_name) {
  131. console.log("[GC - " + account_name + "] Report request received!");
  132. console.log("[GC - " + account_name + "] Trying to report the user!");
  133. var account_id = new SteamID(steamID).accountid;
  134. GC.send({
  135. msg: Protos.ECsgoGCMsg.k_EMsgGCCStrike15_v2_ClientReportPlayer,
  136. proto: {}
  137. }, new Protos.CMsgGCCStrike15_v2_ClientReportPlayer({
  138. accountId: account_id,
  139. matchId: 8,
  140. rptAimbot: 2,
  141. rptWallhack: 3,
  142. rptSpeedhack: 4,
  143. rptTeamharm: 5,
  144. rptTextabuse: 6,
  145. rptVoiceabuse: 7
  146. }).toBuffer());
  147. }
  148.  
  149. loginAndReport(steamID);
  150. console.log("Initializing ReportBot by askwrite...\nCredits: Trololo - Idea");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement