Word With Random Character Generator In C [Random Word Generator]
I'm in extreme broken stage and need to crack neighbor's WiFi to get Internet at home. Unfortunately there are only few APs that I can see from home and all of them are protected with WPA or WPA2.
I'm using aircrack suite to do the cracking and have managed to capture handshake packets. Now the problem I'm having is cracking the key. Dictionary based attack isn't successful due to following characteristics of key phrases:
To run this first copy the above code in a text file and save it as randomWordGenerator.c. Now run gcc compiler by:
I'm using aircrack suite to do the cracking and have managed to capture handshake packets. Now the problem I'm having is cracking the key. Dictionary based attack isn't successful due to following characteristics of key phrases:
- Using of name and address from Nepali origin which naturally won't exists in dictionary
- Mixing English and Nepali words which is very common in my culture
- Clever key phrases which may consists of numbers and combination of words
Brute forcing isn't feasible. It will take ages with my crappy laptop. So I'm trying to brute force by generating random words. First I tried with bash. The algorithm along with bash was miserable with only generating around 20-30 words per seconds.
So today I wrote a similar program in C that generates word with random characters. This program can easily generate more than 1500 words per second on my slow laptop. Here is the program.
#include <stdio.h>This program will produce infinite number of words with random letters. The generated words will be in 8,9,10,...15 characters in length. The words will consist of only small case letters. If you want to have other letters in your word, you can modify the following lines.
int main()
{
int i,j,n;
char c;
for(;;){
for (i=8;i<=15;i++) {
char s[16]="";
for(j=1;j<=i;j++) {
n = rand() % 26;
c = (char)(n+97);
s[j-1]=c;
}
printf("%s\n",s);
}
}
return 0;
}
n = rand() % 26;The main logic behind this is to generate random number in the range 97 to 122 which are ASCII code for small case English alphabets.
c = (char)(n+97);
To run this first copy the above code in a text file and save it as randomWordGenerator.c. Now run gcc compiler by:
gcc randomWordGenerator.c -o randomWordGeneratorNow you can run the program by first setting the permission bit and calling it.
chmod +x randomWordGenerator
./randomWordGenerator
Thanks for great post. well done.
ReplyDeleteword starting with..