Guest User

Untitled

a guest
Feb 10th, 2017
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.09 KB | None | 0 0
  1. var fs = require("fs"),
  2. Steam = require("steam"),
  3. SteamID = require("steamid"),
  4. IntervalIntArray = {},
  5. readlineSync = require("readline-sync"),
  6. Protos = require("./protos/protos.js"),
  7. CountReports = 0,
  8. Long = require("long"),
  9. SteamClients = {},
  10. SteamUsers = {},
  11. SteamGCs = {},
  12. SteamFriends = {},
  13. process = require("process"),
  14. steamID = process.argv[2],
  15. ClientHello = 4006,
  16. ClientWelcome = 4004;
  17.  
  18. var accounts = [];
  19.  
  20. var arrayAccountsTxt = fs.readFileSync("accounts.txt").toString().split("\n");
  21. for (i in arrayAccountsTxt) {
  22. var accInfo = arrayAccountsTxt[i].toString().trim().split(":");
  23. var username = accInfo[0];
  24. var password = accInfo[1];
  25. accounts[i] = [];
  26. accounts[i].push({
  27. username: username,
  28. password: password
  29. });
  30. }
  31.  
  32. var size = 0;
  33. size = arrayAccountsTxt.length;
  34.  
  35. arrayAccountsTxt.forEach(processSteamReport);
  36.  
  37. function processSteamReport(element, indexElement, array) {
  38. if (element != "") {
  39. var account = element.toString().trim().split(":");
  40. var account_name = account[0];
  41. var password = account[1];
  42. SteamClients[indexElement] = new Steam.SteamClient();
  43. SteamUsers[indexElement] = new Steam.SteamUser(SteamClients[indexElement]);
  44. SteamGCs[indexElement] = new Steam.SteamGameCoordinator(SteamClients[indexElement], 730);
  45. SteamFriends[indexElement] = new Steam.SteamFriends(SteamClients[indexElement]);
  46.  
  47. SteamClients[indexElement].connect();
  48.  
  49. var sentryfile;
  50. if(fs.existsSync(account_name + '.sentry')) {
  51. sentryfile = fs.readFileSync(account_name + '.sentry');
  52. }
  53.  
  54. SteamClients[indexElement].on("connected", function() {
  55. if(fs.existsSync(account_name + '.sentry')) {
  56. SteamUsers[indexElement].logOn({
  57. account_name: account_name,
  58. password: password,
  59. sha_sentryfile: sentryfile
  60. });
  61. } else {
  62. SteamUsers[indexElement].logOn({
  63. account_name: account_name,
  64. password: password
  65. });
  66. }
  67. });
  68.  
  69. SteamClients[indexElement].on("logOnResponse", function(res) {
  70. if (res.eresult !== Steam.EResult.OK) {
  71. if (res.eresult == Steam.EResult.ServiceUnavailable) {
  72. console.log("\n[STEAM CLIENT - Login failed - STEAM IS DOWN!");
  73. SteamClients[indexElement].disconnect();
  74. process.exit();
  75. } else {
  76. CountReports++;
  77. if (CountReports == size)
  78. {
  79. console.log("\n\n"+ CountReports + " Reports for this faggot.\nThanks for using this Service!\nCredits for the Script to askwrite & TROLOLO");
  80. process.exit();
  81. }
  82. console.log("\n[STEAM CLIENT (" + account_name.substring(0, 4) + "**) - Login failed!" + res.eresult);
  83. SteamClients[indexElement].disconnect();
  84. SteamClients.splice(indexElement, 1);
  85. SteamFriends.splice(indexElement, 1);
  86. SteamGCs.splice(indexElement, 1);
  87. SteamUsers.splice(indexElement, 1);
  88. IntervalIntArray.splice(indexElement, 1);
  89. }
  90. } else {
  91. SteamFriends[indexElement].setPersonaState(Steam.EPersonaState.Offline);
  92.  
  93. SteamUsers[indexElement].gamesPlayed({
  94. games_played: [{
  95. game_id: 730
  96. }]
  97. });
  98.  
  99. if (SteamGCs[indexElement]) {
  100. IntervalIntArray[indexElement] = setInterval(function() {
  101. SteamGCs[indexElement].send({
  102. msg: ClientHello,
  103. proto: {}
  104. }, new Protos.CMsgClientHello({}).toBuffer());
  105. }, 2000);
  106. } else {
  107. SteamClients[indexElement].disconnect();
  108. SteamClients.splice(indexElement, 1);
  109. SteamFriends.splice(indexElement, 1);
  110. SteamGCs.splice(indexElement, 1);
  111. SteamUsers.splice(indexElement, 1);
  112. IntervalIntArray.splice(indexElement, 1);
  113. }
  114. }
  115. });
  116.  
  117. SteamClients[indexElement].on("error", function(err) {
  118. console.log("[STEAM CLIENT - " + indexElement + "] Account is probably ingame! Logged out!\n" + err);
  119. size = size - 1;
  120. if (CountReports == size)
  121. {
  122. console.log("\n\n"+ CountReports + " Reports for this faggot.\nThanks for using this Service!\nCredits for the Script to askwrite & TROLOLO");
  123. process.exit();
  124. }
  125. SteamClients[indexElement].disconnect();
  126. SteamClients.splice(indexElement, 1);
  127. SteamFriends.splice(indexElement, 1);
  128. SteamGCs.splice(indexElement, 1);
  129. SteamUsers.splice(indexElement, 1);
  130. IntervalIntArray.splice(indexElement, 1);
  131. });
  132.  
  133. SteamGCs[indexElement].on("message", function(header, buffer, callback) {
  134. switch (header.msg) {
  135. case ClientWelcome:
  136. clearInterval(IntervalIntArray[indexElement]);
  137. IntervalIntArray[indexElement] = setInterval(function() {
  138. sendReport(SteamGCs[indexElement], SteamClients[indexElement], account_name, steamID);
  139. }, 2000);
  140. break;
  141. case Protos.ECsgoGCMsg.k_EMsgGCCStrike15_v2_MatchmakingGC2ClientHello:
  142. break;
  143. case Protos.ECsgoGCMsg.k_EMsgGCCStrike15_v2_ClientReportResponse:
  144. CountReports++;
  145. console.log("[GC - (" + CountReports + ")] Report with confirmation ID: " + Protos.CMsgGCCStrike15_v2_ClientReportResponse.decode(buffer).confirmationId.toString() + " sent!");
  146. if (CountReports == size)
  147. {
  148. console.log("\n\n"+ CountReports + " Reports for this faggot.\nThanks for using this Service!\nCredits for the Script to askwrite & TROLOLO");
  149. }
  150. SteamClients[indexElement].disconnect();
  151. SteamClients.splice(indexElement, 1);
  152. SteamFriends.splice(indexElement, 1);
  153. SteamGCs.splice(indexElement, 1);
  154. SteamUsers.splice(indexElement, 1);
  155. IntervalIntArray.splice(indexElement, 1);
  156. break;
  157. default:
  158. console.log(header);
  159. break;
  160. }
  161. });
  162. }
  163. }
  164.  
  165. function sendReport(GC, Client, account_name) {
  166. var account_id = new SteamID(steamID).accountid;
  167. GC.send({
  168. msg: Protos.ECsgoGCMsg.k_EMsgGCCStrike15_v2_ClientReportPlayer,
  169. proto: {}
  170. }, new Protos.CMsgGCCStrike15_v2_ClientReportPlayer({
  171. accountId: account_id,
  172. matchId: 8,
  173. rptAimbot: 2,
  174. rptWallhack: 3,
  175. rptSpeedhack: 4,
  176. rptTeamharm: 5,
  177. rptTextabuse: 6,
  178. rptVoiceabuse: 7
  179. }).toBuffer());
  180. }
  181.  
  182. process.on("uncaughtException", function(err) {});
  183.  
  184. console.log("Reporting SteamID: " + steamID + "\nStarting Accounts...");
Add Comment
Please, Sign In to add comment