Join us at IRC!
Hacking isn't just Computers & Exploits. It's a Philosophy. - Mr_Cheese
Wednesday, May 23, 2012
Navigation
Members Online
Total Online: 35
Web Spiders: 18
Guests Online: 33
Members Online: 2

Registered Members: 70180
Newest Member: RAWRFEARME744798
Latest Articles
View Thread

HellBound Hackers | Computer General | Hacking in general

Author

Facebook 'Word Challenge' Brute Forcer

devilsson2010
Member



Posts: 93
Location: Massachusetts
Joined: 25.04.08
Rank:
Active User
Posted on 02-07-08 04:20
There is an app on facebook called 'Word Challenge', which is a very common game where it gives you letters then you type in all words you can think of that use those letters. Example:

gives you the letters HRATLM

You can enter HAT, RAT, MAT, etc...
It takes 3, 4, 5, and 6 letter words.

Anyway, it seemed like a somewhat easy task to make a brute forcer for it that just emulates the keys for every word using the 6 letters given. It works but it goes too fast and sometimes words get overlapped because it didn't emulate the enter key, or it will miss a letter and mess up the word all together.

So if anyone has any advice on how to make it better, more efficient, or to speed it up more, please share, thanks!

I was using the Sleep() function to slow it down for 1/1000th of a second, which worked really well, but then the timer runs out because the 6 letter words take a whole minute to do without even pausing.

#include <cstdlib>
#include <iostream>
#include <windows.h>

using namespace std;


void Title()
{
printf("Facebook Word Challenge Brute Forcer\n\n" );
}


void Instructions()
{
printf("To use:\n1) Enter the 6 letters it gives you (no spaces, not case sensitive)\n2) After hitting ENTER you have 5 seconds to make Word Challenge the active\n window by clicking in it\n\nONCE THE PROGRAM HAS STARTED RUNNING DO NOT AT ANYTIME CLICK OUTSIDE OF WORD\nCHALLENGE UNTIL THE PROGRAM HAS FINISHED, YOU HAVE BEEN WARNED!!\n\nPlease Enter the 6 Letters\n: " );
}


void Countdown(int time)
{
for (int i=time;i>=0;i--)
{cout << i << endl;
Sleep(1000);}
}


int main()
{

Title();
Instructions();

char keys[6];

cin >> keys;
cout << endl;

Countdown(5);
system("cls" );
Title();
cout << "Using Keys: " << keys << endl << endl;
printf("Creating 3 letter words . . .\n" );

int a=0, b=0, c=0, d=0, e=0, f=0;
while (true)
{
keybd_event(VkKeyScan(keys[a]),0,0,0);
Sleep(5);
keybd_event(VkKeyScan(keys[b]),0,0,0);
Sleep(5);
keybd_event(VkKeyScan(keys[c]),0,0,0);
Sleep(5);
keybd_event(VK_RETURN,0,0,0);
Sleep(5);

if (a==5 && b==5 && c==5)
{break;
} else if (b==5 && c==5)
{a++; b=0; c=0;
} else if (c==5)
{b++; c=0;
} else {c++;}

}

printf("Done with 3 letter words.\n" );
printf("Creating 4 letter words . . .\n" );

a=0; b=0; c=0;
while (true)
{
keybd_event(VkKeyScan(keys[a]),0,0,0);
Sleep(5);
keybd_event(VkKeyScan(keys[b]),0,0,0);
Sleep(5);
keybd_event(VkKeyScan(keys[c]),0,0,0);
Sleep(5);
keybd_event(VkKeyScan(keys[d]),0,0,0);
Sleep(5);
keybd_event(VK_RETURN,0,0,0);
Sleep(5);

if (a==5 && b==5 && c==5 && d==5)
{break;
} else if (b==5 && c==5 && d==5)
{a++; b=0; c=0; d=0;
} else if (c==5 && d==5)
{b++; c=0; d=0;
} else if (d==5)
{c++; d=0;
} else {d++;}

}

printf("Done with 4 letter words.\n" );
printf("Creating 5 letter words . . .\n" );

a=0; b=0; c=0; d=0;
while (true)
{
keybd_event(VkKeyScan(keys[a]),0,0,0);
Sleep(1);
keybd_event(VkKeyScan(keys[b]),0,0,0);
Sleep(1);
keybd_event(VkKeyScan(keys[c]),0,0,0);
Sleep(1);
keybd_event(VkKeyScan(keys[d]),0,0,0);
Sleep(1);
keybd_event(VkKeyScan(keys[e]),0,0,0);
Sleep(1);
keybd_event(VK_RETURN,0,0,0);
Sleep(1);

if (a==5 && b==5 && c==5 && d==5 && e==5)
{break;
} else if (b==5 && c==5 && d==5 && e==5)
{a++; b=0; c=0; d=0; e=0;
} else if (c==5 && d==5 && e==5)
{b++; c=0; d=0; e=0;
} else if (d==5 && e==5)
{c++; d=0; e=0;
} else if (e==5)
{d++; e=0;
} else {e++;}

}

printf("Done with 5 letter words.\n" );
printf("Creating 6 letter words . . .\n" );

a=0; b=0; c=0; d=0, e=0;
while (true)
{
keybd_event(VkKeyScan(keys[a]),0,0,0);
Sleep(1);
keybd_event(VkKeyScan(keys[b]),0,0,0);
Sleep(1);
keybd_event(VkKeyScan(keys[c]),0,0,0);
Sleep(1);
keybd_event(VkKeyScan(keys[d]),0,0,0);
Sleep(1);
keybd_event(VkKeyScan(keys[e]),0,0,0);
Sleep(1);
keybd_event(VkKeyScan(keys[f]),0,0,0);
Sleep(1);
keybd_event(VK_RETURN,0,0,0);
Sleep(1);


if (a==5 && b==5 && c==5 && d==5 && e==5 && f==5)
{break;
} else if (b==5 && c==5 && d==5 && e==5 && f==5)
{a++; b=0; c=0; d=0; e=0; f=0;
} else if (c==5 && d==5 && e==5 && f==5)
{b++; c=0; d=0; e=0; f=0;
} else if (d==5 && e==5 && f==5)
{c++; d=0; e=0; f=0;
} else if (e==5 && f==5)
{d++; e=0; f=0;
} else if (f==5)
{e++; f=0;
} else {f++;}

}

printf("Done with 6 letter words.\n" );
printf("\n* DONE *\n\n" );

system("PAUSE" );
return EXIT_SUCCESS;
}



Author

RE: Facebook 'Word Challenge' Brute Forcer

deleted
Member



Posts: 21
Location: Sweden
Joined: 09.05.08
Rank:
Hacker Level 3
Posted on 02-07-08 11:57
you could just use a wordlist, but then it wouldnt be a bruteforcer :p



(sn)(sn)(sn)
Author

RE: Facebook 'Word Challenge' Brute Forcer

devilsson2010
Member



Posts: 93
Location: Massachusetts
Joined: 25.04.08
Rank:
Active User
Posted on 02-07-08 22:42
Yea I was thinking about using a word list because it'd be faster, but you can never get a good wordlist that has every word needed. There's always a couple missing.

Also it'd be pointless because 95% of the words wouldn't even be usable because it gives you 6 letters to use and that 95% of words will contain other characters.


Author

RE: Facebook 'Word Challenge' Brute Forcer

Mephisto
Member

Posts: 150
Location:
Joined: 13.12.06
Rank:
Newbie
Posted on 02-07-08 23:34
Why use C++ if you program (TI-)Basic style?




DON'T PANIC
Author

RE: Facebook 'Word Challenge' Brute Forcer

devilsson2010
Member



Posts: 93
Location: Massachusetts
Joined: 25.04.08
Rank:
Active User
Posted on 03-07-08 05:15
Mephisto wrote:
Why use C++ if you program (TI-)Basic style?


1) I don't use (TI-)Basic style

2) What the fuck is (TI-)Basic style?




Edited by devilsson2010 on 03-07-08 05:16
Author

RE: Facebook 'Word Challenge' Brute Forcer

deleted
Member



Posts: 21
Location: Sweden
Joined: 09.05.08
Rank:
Hacker Level 3
Posted on 03-07-08 06:53
devilsson2010 wrote:
Yea I was thinking about using a word list because it'd be faster, but you can never get a good wordlist that has every word needed. There's always a couple missing.

Also it'd be pointless because 95% of the words wouldn't even be usable because it gives you 6 letters to use and that 95% of words will contain other characters.



But the bruteforce is blatanly lower than that! it's like what 0.001-1% useable? And the game has to use some kind of dictionary, probably the official scrabble one. If you had that, the wordlist would be perfect.



(sn)(sn)(sn)
Author

RE: Facebook 'Word Challenge' Brute Forcer

devilsson2010
Member



Posts: 93
Location: Massachusetts
Joined: 25.04.08
Rank:
Active User
Posted on 03-07-08 07:17
I was using a scrabble word list I got off of some scrabble site for 3 lettered words and the dictionary only had 3 of the 10 or however many words there are.




Edited by devilsson2010 on 03-07-08 07:18
Guest
Username

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 

 

Links
By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2008- 2009. Since 3rd December 2004.