{"action":"opened","issue":{"url":"https://api.github.com/repos/steam-forward/node-steam-forum/issues/25","labels_url":"https://api.github.com/repos/steam-forward/node-steam-forum/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/steam-forward/node-steam-forum/issues/25/comments","events_url":"https://api.github.com/repos/steam-forward/node-steam-forum/issues/25/events","html_url":"https://github.com/steam-forward/node-steam-forum/issues/25","id":94626876,"number":25,"title":"Easy sentry file generator","user":{"login":"pmk010","id":4672396,"avatar_url":"https://avatars.githubusercontent.com/u/4672396?v=3","gravatar_id":"","url":"https://api.github.com/users/pmk010","html_url":"https://github.com/pmk010","followers_url":"https://api.github.com/users/pmk010/followers","following_url":"https://api.github.com/users/pmk010/following{/other_user}","gists_url":"https://api.github.com/users/pmk010/gists{/gist_id}","starred_url":"https://api.github.com/users/pmk010/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmk010/subscriptions","organizations_url":"https://api.github.com/users/pmk010/orgs","repos_url":"https://api.github.com/users/pmk010/repos","events_url":"https://api.github.com/users/pmk010/events{/privacy}","received_events_url":"https://api.github.com/users/pmk010/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-13T03:05:18Z","updated_at":"2015-07-13T03:05:18Z","closed_at":null,"body":"Think a few people would find this helpful and I don't know where to put it, feel free to move/delete as appropriate if I've put it in the wrong place.\r\n\r\nEnter the username, password and steam guard code at the relevant prompts. The file is named the same as the username.\r\n\r\n```\r\nvar username;\r\nvar password;\r\nvar steamCode;\r\n\r\nvar Steam = require(\"steam\");\r\nvar fs = require(\"fs\");\r\nvar readline = require('readline');\r\n\r\nvar steam = new Steam.SteamClient();\r\n\r\nvar rl = readline.createInterface({\r\n  input: process.stdin,\r\n  output: process.stdout\r\n});\r\n\r\nrl.question(\"Username: \", function(answer) {\r\n\tusername = answer;\r\n\trl.question(\"Password: \", function(answer2) {\r\n\t\tpassword = answer2;\r\n\t\trl.pause();\r\n\t\tsteam.logOn({\r\n\t\t\taccountName: username,\r\n\t\t\tpassword: password\r\n\t\t});\r\n\t});\r\n});\r\n\r\nsteam.on(\"error\", function(error) {\r\n\tif (error.cause == \"logonFail\") {\r\n\t\tif (error.eresult == 63) {\r\n\t\t\trl.resume();\r\n\t\t\trl.question(\"Steam guard code: \", function(answer) {\r\n\t\t\t\tsteamCode = answer;\r\n\t\t\t\trl.close();\r\n\t\t\t\tsteam.logOn({\r\n\t\t\t\t\taccountName: username,\r\n\t\t\t\t\tpassword: password,\r\n\t\t\t\t\tauthCode: steamCode\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tconsole.log(\"Logon fail: \" + error.eresult);\r\n\t\t};\r\n\t};\r\n});\r\n\r\nsteam.on(\"sentry\", function(sentryHash) {\r\n\tfs.writeFile(username, sentryHash, function(err) {\r\n\t\tif (err) throw err;\r\n\t\tconsole.log(\"Sentry file successfully saved\");\r\n\t\tprocess.exit();\r\n\t});\r\n});\r\n```"}}