Advertisement
Guest User

Untitled

a guest
Sep 30th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.94 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3. using System.Threading;
  4. using Google;
  5.  
  6. namespace freexboxforme
  7. {
  8.  
  9. public class FreeXbox
  10. {
  11.  
  12. const string badacctfile = "badaccount.txt";
  13. const string winfile = "winner.txt";
  14.  
  15. static void Main(string[] args)
  16. {
  17. Console.Write("Enter Input file location (Format: User:Pass:RecorveryEmail): ");
  18. string filename = Console.ReadLine();
  19. if (!System.IO.File.Exists(filename))
  20. {
  21. Console.WriteLine("Input file cannot be found! Any key to exit.");
  22. Console.ReadKey();
  23. return;
  24. }
  25. Console.Write("Enter seconds between entries (Recommended '60'): ");
  26. int timeout = Int32.Parse(Console.ReadLine()) * 1000;
  27. var accounts = System.IO.File.ReadAllLines(filename);
  28. int i = 0;
  29. foreach (var acct in accounts)
  30. {
  31. Google.Voice.GoogleVoice gv = new Google.Voice.GoogleVoice();
  32. string user = acct.Split(':')[0].Trim();
  33. string pass = acct.Split(':')[1].Trim();
  34. string eAnswer = acct.Split(':')[2].Trim();
  35. var login = gv.Login(user, pass);
  36. Console.WriteLine(string.Format("Logging into {0}", user));
  37. if (!login.RequiresRelogin)
  38. {
  39. //CheckforWin(gv, user);
  40. //continue;
  41. Console.WriteLine("Messaging TB.");
  42. gv.SMS("72823", "2YKSS3PSSPBS");
  43. Thread.Sleep(5000);
  44. Console.WriteLine(string.Format("Checking Response for {0}", user));
  45. var res = gv.Inbox(null, null, true);
  46. foreach (var item in res.messages)
  47. {
  48. if (item.Value.phoneNumber != "72823") continue;
  49. string lastTxt = item.Value.Thread.Last();
  50. if (lastTxt.StartsWith("You already entered today"))
  51. {
  52. Console.WriteLine(string.Format("Already Entered today {0}. Next Account!", user));
  53. break;
  54. }
  55. if (lastTxt.StartsWith("Reply YES to enter"))
  56. {
  57. gv.SMS("72823", "YES");
  58. Console.WriteLine(string.Format("Answering YES for {0}", user));
  59. Thread.Sleep(5000);
  60. while (!gv.Inbox(null, null, true).messages.Keys.Contains(item.Key))
  61. {
  62. Thread.Sleep(2000);
  63. }
  64. lastTxt = gv.Inbox(null, null, true).messages[item.Key].Thread.Last();
  65. }
  66. if (lastTxt.StartsWith("Sorry, you didn't win today"))
  67. {
  68. Console.WriteLine(string.Format("{0} didn't win today. Waiting a minute for next submit.", user));
  69. Thread.Sleep(timeout);
  70. break;
  71. }
  72. if (lastTxt.StartsWith("Winner!"))
  73. {
  74. Console.WriteLine(string.Format("{0} WINNER! Waiting a minute for next submit.", user));
  75. System.IO.File.AppendAllText(Environment.CurrentDirectory + "\\" + winfile, String.Format("{0} : {1}{2}", user, lastTxt, Environment.NewLine));
  76. Thread.Sleep(600000);
  77. }
  78. }
  79.  
  80.  
  81. }
  82. else
  83. {
  84. Console.WriteLine(string.Format("Couldn't login to {0}", user));
  85.  
  86. System.IO.File.AppendAllText(Environment.CurrentDirectory + "\\" + badacctfile, user + Environment.NewLine);
  87. }
  88.  
  89. }
  90. return;
  91. }
  92. }
  93. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement