public FrameController(ILogger <HomeController> logger, IHubContext <SignalRHub> hubContext, DBConnection save) { _logger = logger; _hubContext = hubContext; _save = save; capatchaFactory = new CaptchaFactory(save); }
public void Register() { new Thread(delegate() { if (register.InvokeRequired) { Invoke(new Action(() => { register.Enabled = false; })); } else { register.Enabled = false; } //Register string friendId = user.GetFriendId(inviteURL); if (!friendId.Equals("")) { AddToLog(lang.Get("Misc", "FriendID") + ": " + friendId); } CaptchaSolver captchaSolver = CaptchaFactory.Captcha( Settings.Instance.Get("CaptchaProvider", "Manual"), Settings.Instance.Get("CaptchaUsername", ""), Settings.Instance.Get("CaptchaPassword", "") ); bool open = false; for (int i = 0; i < 1; i++) { open = user.Register(EMail, captchaSolver, friendId, Ikariam.User.GetFriendHash(inviteURL)); if (open) { break; } } if (!open) { AddToLog(lang.Get("Misc", "Error") + ": " + lang.Get("WebView", "Registered")); return; } AddToLog(lang.Get("WebView", "Registered") + " (" + server_address + ") " + user.GetCurrentCity().Cords); AddToLog(lang.Get("Piracy", "CityID") + ": " + user.GetCurrentCity().ID); if (IS_SPAM_BOT) { while (!user.IsEMailVerified()) { AddToLog("Email is not verified, retring in 1 minute"); Thread.Sleep(ONE_MINUTE + RandomInteger(10000, 20000)); } AddToLog("EMail is verified"); //Highscore table int countMessgaes = 0; for (int page = offset; page < pages + offset; page++) { List <string> users = user.GetHighScoreTable(page); foreach (string player in users) { if (0 != countMessgaes && 0 == countMessgaes % 5) { Thread.Sleep(FIVE_MINUTES + RandomInteger(20000, 30000)); } AddToLog("Spamming " + player.ToString() + " (" + (countMessgaes + 1).ToString() + " / " + (pages * 50).ToString() + ")"); //string message = Config.PROGRAM_NAME + "\n-------\nCheck " + Config.PROGRAM_NAME + "! I can do up to 1,000,000 capture points per day(even more), search in all the world in minutes, open new users and do the tutorial and much more!\nFirst 3 days are free!\nhttp://testsql3s.altervista.org/buy.php"; string message = Config.PROGRAM_NAME + " is a program that can do every hack on any official Ikariam server! Pirate clicker, captcha solver, auto raid and much more!\nCheck " + Config.PROGRAM_NAME + " now for free!\nhttps://github.com/Smoxer/"; user.SendPM(player.ToString(), message); countMessgaes++; } } AddToLog("Finished spamming this world"); Application.Exit(); } else { user.DoTutorial(AddToLog); MessageBox.Show(userName + " - " + lang.Get("WebView", "FinishedTutorial"), lang.Get("Misc", "Alert")); } }).Start(); }