Follow us on Twitter!
Understanding is the answer, hatred is the problem, and hackers are the slaves abused and destroyed in the process of peace online - Deshouleres
Wednesday, April 16, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 26
Guests Online: 21
Members Online: 5

Registered Members: 82811
Newest Member: IsaiahBowman
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:
Newbie
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.

Code
#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;
}






www.hellboundhackers.org/sig/r/29891.png
Author

RE: Facebook 'Word Challenge' Brute Forcer


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 02-07-08 11:57
you could just use a wordlist, but then it wouldnt be a bruteforcer Pfft


Author

RE: Facebook 'Word Challenge' Brute Forcer

devilsson2010
Member



Posts: 93
Location: Massachusetts
Joined: 25.04.08
Rank:
Newbie
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.


www.hellboundhackers.org/sig/r/29891.png
Author

RE: Facebook 'Word Challenge' Brute Forcer


Member

Your avatar

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


Author

RE: Facebook 'Word Challenge' Brute Forcer

devilsson2010
Member



Posts: 93
Location: Massachusetts
Joined: 25.04.08
Rank:
Newbie
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?


www.hellboundhackers.org/sig/r/29891.png

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

RE: Facebook 'Word Challenge' Brute Forcer


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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.


Author

RE: Facebook 'Word Challenge' Brute Forcer

devilsson2010
Member



Posts: 93
Location: Massachusetts
Joined: 25.04.08
Rank:
Newbie
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.


www.hellboundhackers.org/sig/r/29891.png

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