aspose file tools*
The moose likes I/O and Streams and the fly likes Brute Force Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Brute Force" Watch "Brute Force" New topic
Author

Brute Force

Giorgos Mourtasagas
Greenhorn

Joined: Nov 04, 2009
Posts: 18
Hi my name is George.
I want to make a program generate all the possible characters of length 8 using all the characters in charSet
char[] charSet = {0,1,2,3,4,5,6,7,8,9}.
I made that program to understand the algorithm , then I want to make the same with 8 char length.



But as you see thai is onle 4 characters and I want 8.
I believe that there is another way to make without to make 8 .
If anyone have an idea help me.
Nathan Leniz
Ranch Hand

Joined: Nov 26, 2006
Posts: 132
I would ask why you'd want to brute force something like this, because choosing 4 out of a set of 36 produces only 82,251 combinations while choosing 8 produces a much more respectable 145,008,513. All that is assuming you'll be matching a string in which the order doesn't matter. I see in your example you are using it as a "password" which would mean that given the same set of 36 characters and trying to brute force a password (which should, but not always, result in the order mattering) consisting of 8 characters, it could take you set^subset attempts, in this case a staggering 2,821,109,907,456 total permutations.

My math is a bit rusty and the numbers might be off, but Brute Forcing something like that is astronomical. If it's still something you want to give a shot at, the Google bot returned this link for me. http://www.merriampark.com/perm.htm

The very existence of flamethrowers proves that at some time, some where, some place, someone once said to themselves "I'd really like to set those people on fire over there, but I just can't get close enough".
Giorgos Mourtasagas
Greenhorn

Joined: Nov 04, 2009
Posts: 18
I want to make it because it's my homework.
I have a zip file with AES encryption and I want to find out the password with brute force and dictionary attack.
I have made it with dictionary attack but with brute force I have a problem.
I understand that is useless but I must done it.
Giorgos Mourtasagas
Greenhorn

Joined: Nov 04, 2009
Posts: 18
I wrote this program but I have a little problem.
I don't know how to convert the elements of an integer array to a string array to make the comparison and I found the password.
But I don't know how.I found examples but it isn't with arrays.It is only convert an integer to a string.
Here is the code.


Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

The key word is permutations. Here is an example.


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Brute Force