Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var SteamCommunity = require('steamcommunity');
- var ReadLine = require('readline');
- var fs = require('fs');
- var community = new SteamCommunity();
- var community2 = new SteamCommunity();
- var targetUser = ""; // account's username you want the id on
- var targetPass = ""; // account's password you want the id on
- var currentUser = ""; // username of account holding the id
- var currentPass = ""; // password of account currently holding id
- var customURLToSwap = ""; // id you are currently swapping
- var rl = ReadLine.createInterface({
- "input": process.stdin,
- "output": process.stdout
- });
- doLogin2(targetUser, targetPass);
- function doLogin2(accountName, password, authCode, twoFactorCode, captcha) {
- community2.login({
- "accountName": accountName,
- "password": password,
- "authCode": authCode,
- "twoFactorCode": twoFactorCode,
- "captcha": captcha
- }, function(err, sessionID, cookies, steamguard) {
- if(err) {
- if(err.message == 'SteamGuard') {
- console.log("An email has been sent to target email adress " + err.emaildomain);
- rl.question("Steam Guard Code: ", function(code) {
- doLogin2(accountName, password, code);
- });
- return;
- }
- if(err.message == 'SteamGuardMobile') {
- rl.question("Steam Guard Code Target: ", function(code) {
- doLogin2(accountName, password, null, code);
- });
- return;
- }
- if(err.message == 'CAPTCHA') {
- console.log(err.captchaurl);
- rl.question("CAPTCHA: ", function(captchaInput) {
- doLogin2(accountName, password, null, captchaInput);
- });
- return;
- }
- console.log(err);
- process.exit();
- return;
- }
- console.log("Logged into target account");
- doLogin1(currentUser, currentPass);
- });
- }
- function doLogin1(accountName, password, authCode, twoFactorCode, captcha) {
- community.login({
- "accountName": accountName,
- "password": password,
- "authCode": authCode,
- "twoFactorCode": twoFactorCode,
- "captcha": captcha
- }, function(err, sessionID, cookies, steamguard) {
- if(err) {
- if(err.message == 'SteamGuard') {
- console.log("An email has been sent to current email adress " + err.emaildomain);
- rl.question("Steam Guard Code: ", function(code) {
- doLogin1(accountName, password, code);
- });
- return;
- }
- if(err.message == 'SteamGuardMobile') {
- rl.question("Steam Guard Code: ", function(code) {
- doLogin1(accountName, password, null, code);
- });
- return;
- }
- if(err.message == 'CAPTCHA') {
- console.log(err.captchaurl);
- rl.question("CAPTCHA: ", function(captchaInput) {
- doLogin1(accountName, password, null, captchaInput);
- });
- return;
- }
- console.log(err);
- process.exit();
- return;
- }
- console.log("Moving " + customURLToSwap + " onto " + targetUser);
- swapURL();
- });
- }
- function swapURL() {
- community.editProfile({
- "customURL": "",
- }, function(err){
- if (err) {
- community2.editProfile({
- "customURL": customURLToSwap,
- }, function(err){
- if (err) {
- console.log("Transfer Complete");
- }
- else {
- console.log("Transfer Complete");
- }
- });
- }
- else {
- }
- });
- }
Add Comment
Please, Sign In to add comment