File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Problem with brute Force Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Problem with brute Force" Watch "Problem with brute Force" New topic
Author

Problem with brute Force

Giorgos Mourtasagas
Greenhorn

Joined: Nov 04, 2009
Posts: 18
I have this code but i can't make it work wright.
At first I want to find out the correct password with brute force. As a result I take all the possible combination but none of them is the correct even the correct.
And the next step is to use this code for a program to find out the password in zip file with brute force and dictionary attack.
Now I work the brute force way and then with the dictionary attack.
Here is the code:



And here is the result:

aa8
This in not the password , try again
aa9
This in not the password , try again
aaa
This in not the password , try again
aab
This in not the password , try again
aac
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8866
    
    8

Giorgos Mourtasagas wrote:





The operator "==" is not the same thing as Object.equals(). The "==" operator when used with objects returns true only if the two being compared are the exact same instance. It does not evaluate the contents of the objects.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Jay Shukla
Ranch Hand

Joined: Jun 08, 2008
Posts: 214
Hi Joe,

Thanks for the good explanation.


The "==" operator when used with objects returns true only if the two being compared are the exact same instance


Does that mean that both instances should refer to same object?

Thanks.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11229
    
  16

if you want to know if two references point to the same object, you use "==". If all you care about is if they are functionally equivalent, you would use the .equals() method. 99% of the time, it's the latter you care about.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with brute Force