Skip to content

Instantly share code, notes, and snippets.

@rumblefrog
Last active May 27, 2018 20:04
Embed
What would you like to do?
Steam Spring Cleaning AppID Simulator

Installation

  1. Put these two files in the same directory
  2. Run yarn or npm install
  3. Update the accountName and password on line 11 and 12

Usage

  1. Run node index in that directory
  2. Enter Steam Guard Code (If prompted)
  3. Enter any AppID you have in your account, and it will play that game
  4. Repeat step 3
const SteamUser = require('steam-user')
, Stdin = process.openStdin();
const client = new SteamUser({
promptSteamGuardCode: false
});
let guard = null;
client.logOn({
accountName: '',
password: ''
});
client.on('loggedOn', (d) => {
console.log(`Logged into Steam as ${client.steamID.getSteam3RenderedID()}`);
client.setPersona(SteamUser.EPersonaState.Online);
});
client.on('steamGuard', (d, cb) => {
console.log(`Steam Guard code from ${d}: `);
guard = cb;
})
Stdin.addListener('data', (d) => {
let i = d.toString().trim();
if (guard) {
guard(i);
guard = null;
}
else
client.gamesPlayed(parseInt(i, 10));
});
{
"dependencies": {
"steam-user": "^3.27.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment