Skip to content

Instantly share code, notes, and snippets.

@rumblefrog
Last active May 27, 2018 20:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rumblefrog/79168242230c488db668f8e0de8e2d76 to your computer and use it in GitHub Desktop.
Save rumblefrog/79168242230c488db668f8e0de8e2d76 to your computer and use it in GitHub Desktop.
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