Advertisement
azcamm

Untitled

Jun 20th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 7.20 KB | None | 0 0
  1.         private static UdpClient server = new UdpClient();
  2.         private static WebClient client = new WebClient();
  3.         private static string URL = "https://proxyworld.club/apih/";
  4.         private static string username = "";
  5.         private static string email = "";
  6.         private static string auth = "";
  7.         private static string password = "";
  8.         private static string rpassword = "";
  9.         private static string thisguid = HWDI.GetMachineGuid();
  10.  
  11.         static void Main(string[] args)
  12.         {
  13.         start:
  14.             server.Connect("localhost", 80);
  15.  
  16.             Console.Write("1. Login\n2. Register\nInput: ");
  17.             var answer = Console.ReadLine();
  18.  
  19.             if (answer == "1")
  20.             {
  21.                 Console.Write("Username: ");
  22.                 username = Console.ReadLine();
  23.                 Console.Write("Password: ");
  24.                 password = Console.ReadLine();
  25.                 DoLogin();
  26.             }
  27.             else if (answer == "2")
  28.             {
  29.                 Console.Write("Email: ");
  30.                 email = Console.ReadLine();
  31.                 Console.Write("Username: ");
  32.                 username = Console.ReadLine();
  33.                 Console.Write("Password: ");
  34.                 password = Console.ReadLine();
  35.                 Console.Write("Re-enter Password: ");
  36.                 rpassword = Console.ReadLine();
  37.                 Console.Write("Enter Registration Key: ");
  38.                 auth = Console.ReadLine();
  39.                 DoRegister();
  40.                 goto start;
  41.             }
  42.             else
  43.             {
  44.                 Console.WriteLine("Incorrect input!");
  45.                 Thread.Sleep(3000);
  46.                 Console.Clear();
  47.                 goto start;
  48.             }
  49.         }
  50.  
  51.         private static void DoLogin()
  52.         {
  53.             try
  54.             {
  55.                 if (client.DownloadString(URL + "api.php?type=login&username=" + username + "&password=" + password + "&hwid=" + thisguid + "&auth=" + auth).Contains("0x05"))
  56.                 {
  57.                     Console.Clear();
  58.                     Console.WriteLine("Successfully logged in.", "Success!");
  59.                     Console.Write("Amount of Emails to Generate: ");
  60.                     int amount = Convert.ToInt32(Console.ReadLine());
  61.                     Console.Write("Amount of Threads: ");
  62.                     int threads = Convert.ToInt32(Console.ReadLine());
  63.                     DoCreate(amount, threads);
  64.                 }
  65.                 else if (client.DownloadString(URL + "api.php?type=login&username=" + username + "&password=" + password + "&hwid=" + thisguid).Contains("0x01"))
  66.                 {
  67.                     Console.WriteLine("HWID doesn't match.", "ERROR");
  68.                     Thread.Sleep(3000);
  69.                     Console.Clear();
  70.                 }
  71.                 else if (client.DownloadString(URL + "api.php?type=login&username=" + username + "&password=" + password + "&hwid=" + thisguid).Contains("0x02"))
  72.                 {
  73.                     Console.WriteLine("Please fill in all fields.", "ERROR");
  74.                     Thread.Sleep(3000);
  75.                     Console.Clear();
  76.                 }
  77.                 else if (client.DownloadString(URL + "api.php?type=login&username=" + username + "&password=" + password + "&hwid=" + thisguid).Contains("0x03"))
  78.                 {
  79.                     Console.WriteLine("Username or password are invalid.", "ERROR");
  80.                     Thread.Sleep(3000);
  81.                     Console.Clear();
  82.                 }
  83.                 else if (client.DownloadString(URL + "api.php?type=login&username=" + username + "&password=" + password + "&hwid=" + thisguid).Contains("0x04"))
  84.                 {
  85.                     Console.WriteLine("You are banned.", "ERROR");
  86.                     Thread.Sleep(3000);
  87.                     Console.Clear();
  88.                 }
  89.             }
  90.             catch (WebSocketException exc)
  91.             {
  92.                 Console.WriteLine("Error: " + exc);
  93.             }
  94.         }
  95.  
  96.         private static void DoRegister()
  97.         {
  98.             try
  99.             {
  100.                 if (client.DownloadString(URL + "api.php?type=register&username=" + username + "&password=" + password + "&rpassword=" + rpassword + "&email=" + email + "&hwid=" + thisguid + "&auth=" + auth).Contains("0x6"))
  101.                 {
  102.                     Console.WriteLine("User is registered.", "SUCCESS");
  103.                     Thread.Sleep(2000);
  104.                     Console.Clear();
  105.                 }
  106.                 else if (client.DownloadString(URL + "api.php?type=register&username=" + username + "&password=" + password + "&rpassword=" + rpassword + "&email=" + email + "&hwid=" + thisguid + "&auth=" + auth).Contains("0x1"))
  107.                 {
  108.                     Console.WriteLine("Please fill in all fields.", "ERROR");
  109.                     Thread.Sleep(3000);
  110.                     Console.Clear();
  111.                 }
  112.                 else if (client.DownloadString(URL + "api.php?type=register&username=" + username + "&password=" + password + "&rpassword=" + rpassword + "&email=" + email + "&hwid=" + thisguid + "&auth=" + auth).Contains("0x2"))
  113.                 {
  114.                     Console.WriteLine("Username is already in use.", "ERROR");
  115.                     Thread.Sleep(3000);
  116.                     Console.Clear();
  117.                 }
  118.                 else if (client.DownloadString(URL + "api.php?type=register&username=" + username + "&password=" + password + "&rpassword=" + rpassword + "&email=" + email + "&hwid=" + thisguid + "&auth=" + auth).Contains("0x3"))
  119.                 {
  120.                     Console.WriteLine("Username must be alphanumberic and 4-15 characters in length.", "ERROR");
  121.                     Thread.Sleep(3000);
  122.                     Console.Clear();
  123.                 }
  124.                 else if (client.DownloadString(URL + "api.php?type=register&username=" + username + "&password=" + password + "&rpassword=" + rpassword + "&email=" + email + "&hwid=" + thisguid + "&auth=" + auth).Contains("0x4"))
  125.                 {
  126.                     Console.WriteLine("Email is not a valid email address.", "ERROR");
  127.                     Thread.Sleep(3000);
  128.                     Console.Clear();
  129.                 }
  130.                 else if (client.DownloadString(URL + "api.php?type=register&username=" + username + "&password=" + password + "&rpassword=" + rpassword + "&email=" + email + "&hwid=" + thisguid + "&auth=" + auth).Contains("0x5"))
  131.                 {
  132.                     Console.WriteLine("Passwords do not match.", "ERROR");
  133.                     Thread.Sleep(3000);
  134.                     Console.Clear();
  135.                 }
  136.                 else if (client.DownloadString(URL + "api.php?type=register&username=" + username + "&password=" + password + "&rpassword=" + rpassword + "&email=" + email + "&hwid=" + thisguid + "&auth=" + auth).Contains("0x7"))
  137.                 {
  138.                     Console.WriteLine("Invalid registration key.", "ERROR");
  139.                     Thread.Sleep(3000);
  140.                     Console.Clear();
  141.                 }
  142.             }
  143.             catch (WebSocketException exc)
  144.             {
  145.                 Console.WriteLine("Error: " + exc);
  146.             }
  147.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement