Advertisement
Guest User

Untitled

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