• We just launched and are currently in beta. Join us as we build and grow the community.

[Steam]How to implement 2FA escrow shit to your Tradebot

Pingouin

Frontend Framework Specialist
Divine
P Rep
0
0
0
Rep
0
P Vouches
0
0
0
Vouches
0
Posts
130
Likes
178
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 400 XP
There we go,
a lot of guys were selling this shit here, but its pretty simple if you are able to understand what you're doing.
The thing is, if you already had downloaded the old Tradebot (first versions leaked) you simply are using the node module "steam" which does not support 2FA (escrow shit) yet.
First of all login with your bot acc to your mobile device, enable 2FA and logout. you can use up to 5 accounts with 1 number.
Then you have to change this to the node module "steam-user".
How to do this?
it took me like 10 minutes, changing the whole bot to dual factor.
First of all you dont need that
Code:
var Steam = require
so remove it.
and then we are going to do it like that:
Code:
var TradeOfferManager = require('steam-tradeoffer-manager');
var SteamTotp = require('steam-totp');
var SteamConfirm = require('steamcommunity-mobile-confirmations');
var TOTP = require('onceler').TOTP;
var request = require('request');
var API_KEY = ""; // API key from bitskins.com
var SECRET = ""; // Secret key from bitskins.com
var pooling_interval = 10000; // 10 seconds
var totp = new TOTP(SECRET);
var client = new SteamUser() //thats our new steam login shit
Code:
var manager = new TradeOfferManager({ "steam" : client, "domain" : "localhost", "language" : "en"
})
var offers = new SteamTradeOffers();
var recheck = true;
var client = new SteamUser();
var details = {
"accountName" : "username",
"password" : "pass",
"twoFactorCode" : SteamTotp.generateAuthCode("YOUR_SHARED_SECRET")
};
so "client" is taking the role of "steam"
then you have to... oh wait.. i have to hide that shit...HIDING ...
¯\_(ツ)_/¯
Code:
if (require('fs').existsSync('sentry_'+details['accountName']+'.hash')) {
details['shaSentryfile'] = require('fs').readFileSync('sentry_'+details['accountName']+'.hash');
} else if(require('fs').existsSync('ssfn_'+details['accountName'])) {
var sha = require('crypto').createHash('sha1');
sha.update(require('fs').readFileSync('ssfn_'+details['accountName']));
var sentry = new Buffer(sha.digest(), 'binary');
details['shaSentryfile'] = sentry;
require('fs').writeFileSync('sentry_'+details['accountName']+'.hash', sentry);
console.log('Converting ssfn to sentry file!');
console.log('Now you can remove ssfn_'+details['accountName']);
} else if (authCode != '') {
details['authCode'] = authCode;
}
var hash = require('crypto').createHash('sha1');
hash.update(Math.random().toString());
hash = hash.digest('hex');
var device_id = 'android:' + hash;
client.logOn(details);
Code:
client.on('loggedOn', function(details){
console.log("Logged ON!");
client.on('webSession', function(sessionID, cookies){
//Setting manager
manager.setCookies(cookies, function(err) {
if(err) {
console.log(err);
process.exit(1); // Fatal error since we couldn't get our API key
return;
}
// Write API key if it's OK.
console.log("Got API key: " + manager.apiKey);
var SteamcommunityMobileConfirmations = require('steamcommunity-mobile-confirmations');
var steamcommunityMobileConfirmations = new SteamcommunityMobileConfirmations(
{
steamid:         "YOUR_STEAM_ID",
identity_secret: "YOUR_IDENTITY_SECRET",
device_id:       device_id,
webCookie:       cookies,
});
//Checking mobile confirmations and accept it.
//Be carefull with this function.
setInterval(function(){
checkConfirmations(steamcommunityMobileConfirmations)
}, pooling_interval);
});
});
});
manager.on('newOffer', function(offer) {
offer.getEscrowDuration(function(err, daysTheirEscrow, daysMyEscrow){
if (err) console.log(err);
else {
if (daysTheirEscrow != 0) offer.decline(function(err){
if (err) console.log(err);
});
else {
var checker = true;
var itemsString = "";
var items = offer.itemsToReceive;
var itemsObj = new Array(items.length);
items.forEach(function(item, i , arr){
if (item.appid != 730 || item.market_hash_name.indexOf("Souvenir") != -1)
checker = false;
else {
itemsString += item.market_hash_name + "!END!";
}
});
if (checker){
request.post({
url: 'https://bitskins.com/api/v1/get_item_price'
form: {
'api_key': API_KEY,
'names': itemsString,
'delimiter': '!END!',
'code': totp.now()
}
}, callback);
function callback(error, response, body) {
if (!error) {
var info = JSON.parse(body);
if (info.status != "fail"){
var newItems = info.data.prices;
var totalPrice = 0;
newItems.forEach(function(newItem,i,arr){
newItem.url = items.icon_url_large;
totalPrice += parseFloat(newItem.price);
});
var deposit = new Object();
deposit.totalPrice = totalPrice;
deposit.steamId    = offer.partner.getSteam3RenderedID();
deposit.items      = newItems;
//ToDo:
//1)Don't forget deposit.totalPrice!
//2)Accept offer and use object deposit
}
else offer.decline(function(err){
if (err) console.log(err);
});
}
}
}
else {
offer.decline(function(err){
if (err) console.log(err);
});
}
}
}
});
});
function checkConfirmations(steamcommunityMobileConfirmations){
steamcommunityMobileConfirmations.FetchConfirmations((function (err, confirmations)
{
if (err)
{
console.log(err);
return;
}
console.log('steamcommunityMobileConfirmations.FetchConfirmations received ' + confirmations.length + ' confirmations');
if ( ! confirmations.length)
{
return;
}
steamcommunityMobileConfirmations.AcceptConfirmation(confirmations[0], (function (err, result)
{
if (err)
{
console.log(err);
return;
}
console.log('steamcommunityMobileConfirmations.AcceptConfirmation result: ' + result);
}).bind(this));
}).bind(this));
}
comment that shit out with // console.log('steamcommunityMobileConfirmations.FetchConfirmations received ' + confirmations.length + ' confirmations');
if you dont want to have console entries every 5 seconds.
Last step is you need to change all old "steam" syntax shit in your code.
things like "steam.on..."
Code:
Steam.sendMessage(steamID, 'Exchange has been sent!');
change it to
Code:
client.sendMessage(steamID, 'Exchange has been sent!');
and
Code:
client.on('loggedOn', function(result) {	console.log('Logged in!');	client.setPersona(SteamUser.Steam.EPersonaState.LookingToTrade);
});
steam-users module is just a "better update" fork version of the "steam" module with escrow support.
then just sstart your script and add the current code, posted to your mobile device. and have fun-
Oh and yes, one more info:
pls dont, just dont, pm me with this shit, its pretty easy if u know what ur doing, if not learn it.
downloading shit and uploading it to your webserver is not all....
ah yea, like always.
It would be pretty fruity if you rep me up, fruity like a banana or sth. u dont have to... just saying..
 

434,548

313,478

313,487

Top