Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with brute Force

 
Giorgos Mourtasagas
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jay Shukla
Ranch Hand
Posts: 214
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 12022
25
Chrome Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic