Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.Threading;
- using Google;
- namespace freexboxforme
- {
- public class FreeXbox
- {
- const string badacctfile = "badaccount.txt";
- const string winfile = "winner.txt";
- static void Main(string[] args)
- {
- Console.Write("Enter Input file location (Format: User:Pass:RecorveryEmail): ");
- string filename = Console.ReadLine();
- if (!System.IO.File.Exists(filename))
- {
- Console.WriteLine("Input file cannot be found! Any key to exit.");
- Console.ReadKey();
- return;
- }
- Console.Write("Enter seconds between entries (Recommended '60'): ");
- int timeout = Int32.Parse(Console.ReadLine()) * 1000;
- var accounts = System.IO.File.ReadAllLines(filename);
- int i = 0;
- foreach (var acct in accounts)
- {
- Google.Voice.GoogleVoice gv = new Google.Voice.GoogleVoice();
- string user = acct.Split(':')[0].Trim();
- string pass = acct.Split(':')[1].Trim();
- string eAnswer = acct.Split(':')[2].Trim();
- var login = gv.Login(user, pass);
- Console.WriteLine(string.Format("Logging into {0}", user));
- if (!login.RequiresRelogin)
- {
- //CheckforWin(gv, user);
- //continue;
- Console.WriteLine("Messaging TB.");
- gv.SMS("72823", "2YKSS3PSSPBS");
- Thread.Sleep(5000);
- Console.WriteLine(string.Format("Checking Response for {0}", user));
- var res = gv.Inbox(null, null, true);
- foreach (var item in res.messages)
- {
- if (item.Value.phoneNumber != "72823") continue;
- string lastTxt = item.Value.Thread.Last();
- if (lastTxt.StartsWith("You already entered today"))
- {
- Console.WriteLine(string.Format("Already Entered today {0}. Next Account!", user));
- break;
- }
- if (lastTxt.StartsWith("Reply YES to enter"))
- {
- gv.SMS("72823", "YES");
- Console.WriteLine(string.Format("Answering YES for {0}", user));
- Thread.Sleep(5000);
- while (!gv.Inbox(null, null, true).messages.Keys.Contains(item.Key))
- {
- Thread.Sleep(2000);
- }
- lastTxt = gv.Inbox(null, null, true).messages[item.Key].Thread.Last();
- }
- if (lastTxt.StartsWith("Sorry, you didn't win today"))
- {
- Console.WriteLine(string.Format("{0} didn't win today. Waiting a minute for next submit.", user));
- Thread.Sleep(timeout);
- break;
- }
- if (lastTxt.StartsWith("Winner!"))
- {
- Console.WriteLine(string.Format("{0} WINNER! Waiting a minute for next submit.", user));
- System.IO.File.AppendAllText(Environment.CurrentDirectory + "\\" + winfile, String.Format("{0} : {1}{2}", user, lastTxt, Environment.NewLine));
- Thread.Sleep(600000);
- }
- }
- }
- else
- {
- Console.WriteLine(string.Format("Couldn't login to {0}", user));
- System.IO.File.AppendAllText(Environment.CurrentDirectory + "\\" + badacctfile, user + Environment.NewLine);
- }
- }
- return;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement