Advertisement
Guest User

Untitled

a guest
Jan 8th, 2019
631
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.89 KB | None | 0 0
  1. var community = new SteamCommunity();
  2. var community2 = new SteamCommunity();
  3.  
  4. var targetUser = ""; // account's username you want the id on
  5. var targetPass = ""; // account's password you want the id on
  6.  
  7. var currentUser = ""; // username of account holding the id
  8. var currentPass = ""; // password of account currently holding id
  9.  
  10. var customURLToSwap = ""; // id you are currently swapping
  11.  
  12. var rl = ReadLine.createInterface({
  13. "input": process.stdin,
  14. "output": process.stdout
  15. });
  16.  
  17. doLogin2(targetUser, targetPass);
  18.  
  19. function doLogin2(accountName, password, authCode, twoFactorCode, captcha) {
  20. community2.login({
  21. "accountName": accountName,
  22. "password": password,
  23. "authCode": authCode,
  24. "twoFactorCode": twoFactorCode,
  25. "captcha": captcha
  26. }, function(err, sessionID, cookies, steamguard) {
  27. if(err) {
  28. if(err.message == 'SteamGuard') {
  29. console.log("An email has been sent to target email adress " + err.emaildomain);
  30. rl.question("Steam Guard Code: ", function(code) {
  31. doLogin2(accountName, password, code);
  32. });
  33.  
  34. return;
  35. }
  36. if(err.message == 'SteamGuardMobile') {
  37.  
  38. rl.question("Steam Guard Code Target: ", function(code) {
  39. doLogin2(accountName, password, null, code);
  40. });
  41.  
  42. return;
  43. }
  44. if(err.message == 'CAPTCHA') {
  45. console.log(err.captchaurl);
  46. rl.question("CAPTCHA: ", function(captchaInput) {
  47. doLogin2(accountName, password, null, captchaInput);
  48. });
  49.  
  50. return;
  51. }
  52.  
  53. console.log(err);
  54. process.exit();
  55. return;
  56. }
  57.  
  58. console.log("Logged into target account");
  59. doLogin1(currentUser, currentPass);
  60. });
  61.  
  62. }
  63. function doLogin1(accountName, password, authCode, twoFactorCode, captcha) {
  64. community.login({
  65. "accountName": accountName,
  66. "password": password,
  67. "authCode": authCode,
  68. "twoFactorCode": twoFactorCode,
  69. "captcha": captcha
  70. }, function(err, sessionID, cookies, steamguard) {
  71. if(err) {
  72. if(err.message == 'SteamGuard') {
  73. console.log("An email has been sent to current email adress " + err.emaildomain);
  74. rl.question("Steam Guard Code: ", function(code) {
  75. doLogin1(accountName, password, code);
  76. });
  77.  
  78. return;
  79. }
  80. if(err.message == 'SteamGuardMobile') {
  81.  
  82. rl.question("Steam Guard Code: ", function(code) {
  83. doLogin1(accountName, password, null, code);
  84. });
  85.  
  86. return;
  87. }
  88. if(err.message == 'CAPTCHA') {
  89. console.log(err.captchaurl);
  90. rl.question("CAPTCHA: ", function(captchaInput) {
  91. doLogin1(accountName, password, null, captchaInput);
  92. });
  93.  
  94. return;
  95. }
  96.  
  97. console.log(err);
  98. process.exit();
  99. return;
  100. }
  101.  
  102. console.log("Moving " + customURLToSwap + " onto " + targetUser);
  103. swapURL();
  104. });
  105.  
  106. }
  107.  
  108. function swapURL() {
  109. community.editProfile({
  110. "customURL": "",
  111. }, function(err){
  112. if (err) {
  113. community2.editProfile({
  114. "customURL": customURLToSwap,
  115. }, function(err){
  116. if (err) {
  117. console.log("Transfer Complete");
  118.  
  119. }
  120. else {
  121. console.log("Transfer Complete");
  122. }
  123. });
  124. }
  125. else {
  126.  
  127. }
  128. });
  129.  
  130. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement