Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void WriteCodeOnFile()
- {
- string myLocation = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
- using (StreamWriter myCode = File.CreateText(myLocation + @"\Code.txt"))
- {
- if (File.Exists(myLocation + @"\Code.txt")) //It can probably go without the condition
- {
- SteamGuardAccount myCall = new SteamGuardAccount();
- myCall = JsonConvert.DeserializeObject<SteamGuardAccount>(File.ReadAllText(Bot.authFile)); //I took that from the GetMobileAuthCode() method, and tried to forge it a little
- myCode.WriteLine(myCall.GenerateSteamGuardCode());
- //myCode.WriteLine(Bot.GetMobileAuthCode()); - I kept this for trying different approaches
- //I tried calling it in Main(), later in the Log.cs, also in Bot.cs, all was futile
- //It compiles just fine, but after the build, when I start the Bot, it won't give me the code, it doesn't have to be a text file, I just want it to give me the code, so that I can log in using the browser or the Steam client
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment