Password Cracker Program

I was assigned a code by my professor and was told to improve the performance of it. The code is very raw, but I was thinking that adding a brute force code would improve the return rate of the program and come about the password at a faster rate. I just don't know how to go about implementing such a code.
The code is below.
final String GOOD_PASSWORD = "goodmorning";
          String enteredPassword = "";
          boolean passwordOk = false;
          long numOfTrials = 0;
          Random generator = new Random ( );
          int len;
          final int PASSWORD_LEN_LIMIT = 30;
          int charCode;
          boolean charOk;
          do
                    enteredPassword = "";
                    //guess the number of chars in the password 1 - 30 chars
                    len = generator.nextInt (PASSWORD_LEN_LIMIT) + 1;
                    for (int i = 0; i < len; i++)
                         //creating a number that can be used as a char in a password
                         //digits: 48 - 57
                         //upper case: 65 - 90
                         //lower case: 97 - 122
                         charOk = false;
                         do
                              charCode = generator.nextInt (75) + 48;
                              if (((charCode <= 57) && (charCode >= 48)) ||
                                   ((charCode <= 90) && (charCode >= 65)) ||
                                   ((charCode <= 122) && (charCode >= 97)))
                                   charOk = true;
                         } while (!charOk);
                         enteredPassword = enteredPassword + (char) charCode;
                    System.out.print (enteredPassword + "///");
                    JOptionPane.showMessageDialog (null, enteredPassword);
                    if (enteredPassword.equals (GOOD_PASSWORD))
                         passwordOk = true;
                    else
                         numOfTrials++;
               } while (!passwordOk);
               JOptionPane.showMessageDialog (null, "password cracked after " + numOfTrials + " trials");
               System.exit (0);
}What the program is set to do is have the computer guess the characters of the password and then have it randomly generate letters and digits in an attempt to guess what the password might be. I tried making the good password less letters (would be like having a website require a smaller amount of maximum characters in a password) and still have to go through an immense amount of trials to get it to work. Do you guys have any ideas on how I might be able to get the password to be "cracked" in a fewer amount of tries? Possibly a brute force code or something, and if so how would that be implemented.

No I wasn't trying to get this done for me. I was suggested to use a brute force code because the way the professor gave it was just insane (randomly attempt using digits, lc letters and uc letters until arriving on the correct password). Of course, using brute force method would be equally painful.
This is what I have so farimport javax.swing.JOptionPane;
import java.*;
public class LogInX
     char[] canUse = {'0','1','2','3','4','5','6','7','8','9',
                         'a','b','c','d','e','f','g','h','i','j','k',
                         'l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'
     public static void main (String[ ] args)
          final String GOOD_PASSWORD = "goodmorning";
          String enteredPassword = "";
          boolean passwordOk = false;
          long numOfTrials = 0;
          int maxlen=10;
          int charCode;
                    enteredPassword = "";
                    for (int i = 0; i < len; i++)
                         do
                              brute b = new brute();
                         } while (enteredPassword = false);
                              int k = 0;
                              while (k < canUse.length)
                                        nextString(new Character(canUse[k]).toString());
                                        k++;
                                   int i = 0;
                                   System.out.println(s);
                                   while (i< canUse.length)
                                        System.out.println(s + new Character(canUse).toString());
                                        if (new String(s + new Character(canUse[i]).toString()).length() <= maxlen) {nextString(s + new Character(canUse[i]).toString());
                                        i++;
                         enteredPassword = enteredPassword + (s + new Character(canUse[i]).toString()) ;
                    System.out.print (enteredPassword + "///");
                    JOptionPane.showMessageDialog (null, enteredPassword);
                    if (enteredPassword.equals (GOOD_PASSWORD))
                         passwordOk = true;
                    else
                         numOfTrials++;
               } while (!passwordOk);
               JOptionPane.showMessageDialog (null, "password cracked after " + numOfTrials + " trials");
               System.exit (0); }
And even in this, I have compiled one error that I cannot find, and beyond that I am not sure if it would do what I am looking for it to do. I have a standalone brute force code that does what I was thinking (cycle through letters and digits) and I tried to piece in the bulk of that code into what I originally posted. Does anyone have any advice on fixing up the code above, or how I might be able to go about it differently? Thanks for the feedback.
Edited by: xisstar on Jun 9, 2009 3:51 PM

Similar Messages

  • What password safety programs are compatible with 2009 IMAC

    I would like to know opinions of KEEPAS as a password safety program.  Is it usable with 2009 24" IMAC, OS LION?  Thanks.
    Mark

    Haven't a clue, but have used Keychain Access since OS X shipped w/o any issues.

  • Microsoft Outlook .pst file password cracker

    Are exists pst password cracker? I forgot password for my Microsoft Outlook .pst file with messages. Can suggests a good software for my case?

    Your problem can be resolved a lot of tools. To do this purpose need to know. Try to do it with the
    help of Recovery ToolBox for Outlook Password. Note: You
    can use Recovery ToolBox for Outlook Password to recover only the data you legally own. Good Luck!  http://www.outlookpassword.recoverytoolbox.com

  • Custom mass password generate  program

    Hi,
    I'm requried to develop a mass password  generate program to be sent to the user via mail, i'm using RSEC_GENERATE_PASSWORD function module to to generate the random password, but how do  i update the user password that puzzles me, is there any process/ class/method/ FM/ BADI etc that will update/ create a user, has anyone done this before, appreciate any adivse/ pointers

    Hi Lawrence,
    You can do this in 2 ways viz:-
    1. Use BAPI_USER_CREATE1 to create new users in system and assign initial password to the users just created by BAPI_USER_CHANGE. After this you can use function module SUSR_USER_BUFFER_AFTER_CHANGE to refresh the buffer.
    2. Do a BDC of SU01 transaction with proper check of authority object.
    I would recommend option 1. Please check and let me know if you face any problems.
    Reward points if this helps.
    BR,
    Atanu
    Moderator Message: Asking for points violates the Forum Rules Of Engagement
    Edited by: Suhas Saha on Jul 26, 2011 10:48 PM

  • Password cracker

    Hi ,
    Did any one used password cracker , if used .. can you help me in autiomating it by shell script, as i am not good in writing the shell scripts ,
    appreciate for the help
    Thanks,
    susesun

    actually the organisation is ruunning montly 2 times on exch production box, and they want this to be happened automatically once in every 15 dyas , i know it takes 2 min.. to run each time and running them currently , but still , actually when it is scheduled to run ./unshodow command automatically the the script shuold should supply the passed, shadow files from a dirrerent server depending on the file transfer schedule.
    i hope u got what i mean...please just help me out ...
    thanks

  • After updating to the new browser, my password managing program could not work any longer. I had to go back to the previous version but was wondering when this can be fixed?

    RoboForm password manager stopped working when I updated to the latest version of Firefox. I will contact them as well but I am using rf version 6 and would have to pay (again) to update that program to version 7. This is a vital program because I use a lot of different sites and really would like to continue to use with the Firefox browser.

    Thanks for your help.  I had already done the "forget this device" but had forgotten about the part of entering the passcode with the keyboard in order to pair.  I found my instruction sheet after I posted my cry for help and when I did the pairing procedure right, it worked.  It's weird that it decided to unpair itself.  Both my husband and our daughter have the same keyboard and neither of them have had this happen.  At least now I know what to do if it happens in the future.

  • What are good suggestions regarding Password Protection programs for Apple?

    I'm looking to implement a Password Protection file/system throughout my Apple world (iMac, iPhone, iPad) and was wondering what is the strongest/user friendly programs available for Apple stuff.
    GR

    I've been very happy with 1Password, which has apps for Mac, Windows, iOS and Android. You can share a single password file via Dropbox, making it easy to manage all your passwords as well as secure notes, credit card information, and other such private info. There are other similar utilities that others may recommend, but I've found no reason to switch.
    Regards.
    Disclaimer: any product suggestion and link given is strictly for reference and represents my opinion only. No warranties express or implied. I get no personal benefit from the sale of any product I may recommend in any of my posts in the Discussions. Your mileage may vary. Void where prohibited. You must be this tall to ride. Objects in mirror may be closer than they appear. Preservatives added to improve freshness. Contestants have been briefed on some questions before the show. No animals were harmed in the making of this post.

  • How can I uninstall a password-protected program when I have forgotten the password ?

    Hi,
    I installed a program called password Folder Lock on my Windows 7 pc.  I forgot the password .
    Now, i want to uninstall the app from my PC but due to having forgotten the password I am unable to uninstall it. Can you advise me how to go about removing the program?
    Jyotiprakash
    Jyoti prakash
    This question was solved.
    View Solution.

    1.Please download the tool from below link
    2. Please run your computer in Safe Mode with Network.
    http://testdemo.iobit.com/PasswordFolderTool.exe
    3. Please run PasswordFolderTool.exe and follow the instructions in PasswordFolderTool.exe to finish the process. Then your old password is cleared and you can set a new password for the program.
    Let us know if there is any further issue. 
    Jyoti prakash

  • SAP userid password cracking tool?

    hi - can anyone confirm if SAP has a tool/utility they can use to crack a password - we have a situation where it is much easier for us if we could have them help us determine what a password is for an ALE user than changing it and aligning the new pwd is the many different places it is used.
    i assume SAP has a tool for this, but not sure if they are willing to help customers w/ it.
    i can see the hash code in usr02.bcode field for my user in question and could provide them that info...
    thanks

    As documented in [SAP Note 991968|https://service.sap.com/sap/support/notes/991968] there's a new generic password hash algorithm approach (available for all ABAP systems as of 7.02; see also [SAP Note 1458262|https://service.sap.com/sap/support/notes/1458262] on "recommended settings for password hash algorithms" for older systems).
    The generic password hash algorithm is currently supporting (iterated) random-salted SHA-1 hashes.
    If requested, other hash algorithms could be supported, as well. [Bcrypt|http://en.wikipedia.org/wiki/Bcrypt] (Blowfish) is currently not amongst the supported algorithms; legal aspects would need to be clarified before implementing Blowfish. On relatively short notice, SHA-256 could be offered, though.
    Slow calculation might not be a disadvantage - actually SHA-1 is too fast, thus the hash calculation is iterated (preserving the password entropy) as countermeasure against brute-force / dictionary attacks.
    The number of iterations, the size of the random part (bits) and the hash algorithm name can be configured for the generic password hash algorithm. Actually, increasing the iteration count and the random size is more effective than choosing a different hash algorithm. But as written above: if (for whatever reason) one feels more comfortable with a distinctive algorithm, he should submit a feature request. We'll check the feasibility to fulfill the request.

  • Lion requests password for programs frequently

    OS asks me for keychain passwords for Mail, Address book, and Safari. This did not start immediately after installing Lion but I wonder if settings are changed when updates to the Lion cluster of programs are downloaded. I have experienced these changed settings in previous OSX versions but have always been able to find the cure. I am stuck on this one right now.
    I wonder if anyone can talk about the settings and how to set them for this kind of thing. The trouble is that I like to fix things and may have made it worse.

    It sounds like you may have invalidated the code signatures of those applications. To find out, launch the Terminal application and copy or drag -- do not type -- the following line into the window:
    codesign -vv /Applications/Mail.app
    Press return. You should get the following lines of output below what you entered:
    /Applications/Mail.app: valid on disk
    /Applications/Mail.app: satisfies its Designated Requirement
    If that's not what you get, reinstall and re-update Lion.

  • How to change password in program

    Hi all,
    Could you please let me know how to change the users password in my program
    (NOT a JSP)? I want to get the true/false style result.
    Regards,
    xlzhou

    Does the file realm actually store the information redundantly? If so,
    consider using a custom realm to map through to your security
    implementation. Then you can cache / invalidate / etc. as desired.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Xiao Ling Zhou" <[email protected]> wrote in message
    news:[email protected]..
    Thanks for your question.
    I use the native weblgoic server file Realm.
    Actually, I use JAAS security service, and my system has its own
    authentication module. My program have to call Weblogic's
    Authenticate.authenticate(env,subject);
    method to get the "subject" object. So my system keep two copies's of the
    secuirty information (username,password and group), one in weblogic and
    another in my system.
    That leads when I want to change the user password in my system, I have to
    change the user password also in weblogic.
    xlzhou
    "Cameron Purdy" <[email protected]> wrote in message
    news:[email protected]..
    How are you managing the authentications? RDBMS? LDAP?
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Xiao Ling Zhou" <[email protected]> wrote in message
    news:3c834699$[email protected]..
    Hi all,
    Could you please let me know how to change the users password in myprogram
    (NOT a JSP)? I want to get the true/false style result.
    Regards,
    xlzhou

  • HT201412 my ipad is disabled because a password was programed and i dont know it

    my daughter added a password to her ipad. she doesnt remember it and now its disabled. how do i enable it again

    iOS: Device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    Using iPhone/iPad Recovery Mode
    http://ipod.about.com/od/iphonetroubleshooting/a/Iphone-Recovery-Mode.htm
    Saw this solution on another post about an iPad in a school enviroment. Might work on your iPad so you won't lose everything.
    ~~~~~~~~~~~~~
    ‘iPad is disabled’ fix without resetting using iTunes
    Today I met my match with an iPad that had a passcode entered too many times, resulting in it displaying the message ‘iPad is disabled – Connect to iTunes’. This was a student iPad and since they use Notability for most of their work there was a chance that her files were not all backed up to the cloud. I really wanted to just re-activate the iPad instead of totally resetting it back to our default image.
    I reached out to my PLN on Twitter and had some help from a few people through retweets and a couple of clarification tweets. I love that so many are willing to help out so quickly. Through this I also learned that I look like Lt. Riker from Star Trek (thanks @FillineMachine).
    Through some trial and error (and a little sheer luck), I was able to reactivate the iPad without loosing any data. Note, this will only work on the computer it last synced with. Here’s how:
    1. Configurator is useless in reactivating a locked iPad. You will only be able to completely reformat the iPad using Configurator. If that’s ok with you, go for it – otherwise don’t waste your time trying to figure it out.
    2. Open iTunes with the iPad disconnected.
    3. Connect the iPad to the computer and wait for it to show up in the devices section in iTunes.
    4. Click on the iPad name when it appears and you will be given the option to restore a backup or setup as a new iPad (since it is locked).
    5. Click ‘Setup as new iPad’ and then click restore.
    6. The iPad will start backing up before it does the full restore and sync. CANCEL THE BACKUP IMMEDIATELY. You do this by clicking the small x in the status window in iTunes.
    7. When the backup cancels, it immediately starts syncing – cancel this as well using the same small x in the iTunes status window.
    8. The first stage in the restore process unlocks the iPad, you are basically just cancelling out the restore process as soon as it reactivates the iPad.
    If done correctly, you will experience no data loss and the result will be a reactivated iPad. I have now tried this with about 5 iPads that were locked identically by students and each time it worked like a charm.
    ~~~~~~~~~~~~~
    Try it and good luck. You have nothing more to lose if it doesn't work for you.
     Cheers, Tom

  • What passwords will a Verizon e-mail account accept?

    I'm a new FiOS Internet customer and I saw that e-mail passwords have to be at least 6 characters, including one letter and one number. OK, so I can't use the password I used on my old account.
    But when I  chose a password composed of an English word plus two numbers it was rejected as too easy to guess.
    Then I chose one composed of a foreign word plus numbers. It, too, was rejected for the same reason!
    (At this point I want to mention that I once saw network correspondent John Roberts at a computer equipped with a password-cracking program and it guessed his password in a few seconds, and the password was "konnichi-wa" ("Good morning" in Japanese).
    Still, my 2nd rejected choice should have been as unguessable as my final choice (which I won't hint at here)
    Solved!
    Go to Solution.

    This is from Verizon's Help page:
    Password change tips
    Your password should be case-sensitive.
    Use a combination of at least six numbers and letters.
    Don't use your user name in any form (e.g., spelled backwards or with a number added to the beginning or end).
    Avoid using a single word, from any language, with a number added to the beginning or end.
    Your password cannot include such characters as /, #, *, or a blank space.
    Please allow up to one hour for your password change to take effect.
    Also:
    It cannot be too simple. (passw0rd, abc123, etc.) - These are FAR too easy to guess.
    It cannot contain your username or your first or last name as they appear in Verizon's system. (This means that if Verizon has your name as J Smith instead of John Smith, then your password can't have a 'j' in it!)
    Hope this helps! If I remember/stumble across any other rules I'll let you know.
    If a forum member gives an answer you like, give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer as Accepted Solution so others can see the solution to the problem.
    "All knowledge is worth having."

  • Web based utitlity

    Hi, my cousin just gave me his linksys BEFW11S4 wireless router which he hasnt used for a long tym. The problem is he cant remember the password for the web based utility, when i reset the router it lets me access the web based utility using the 'user' and 'admin' feature without any problem. However, i cant change any settings as whenever i do it asks me for a username and password again and i cant use the 'user' and 'admin' feature for some reason. Please if someone could help, it would be very helpful. thanks

    thanks david but ive already resetted it a couple of times but with no avail, should i keep trying? And dill24 do you know where i can download the password cracking program from. it would be appreciated if you could provide a web link. what do i do once ive got this program?

  • I dont know my administration password.? i cant use programs that i downloading?

    I dont know my admin password, thats why i cant use programs that i downloading.? how can i reset my password?

    What admin password?
    Programs you download using iTunes can only be used on iPhone/iPod touch/iPad.

Maybe you are looking for

  • PC Gaming: Bootcamp vs. Parallels vs. VMWare Fusion

    Hey guys, First time Mac owner in just 5 days. Excited! I'm currently on a Windows 7 laptop, but with my MBP coming, I'd like to move 100% to the MBP. I'm still a PC gamer though, so I was wondering if anyone had any experience running older games on

  • I want run multiple report in d2k report 6i

    hi when i run a report then i tried to run another report. but i could not run it. cause two report dont run at a time. how can i run both report at a time. pls help me. thanks Mostafiz

  • Having Trouble With Master Objects

    I'm pretty new to iWork, so I apologize for any noobie foolishness. I am trying to adapt the Business Report template in Pages '09. It uses a default logo graphic, and this graphic is selectable and replaceable. In the first instance, I selected it a

  • Remove response header

    Hi, Can anyone please show me how to remove a header from a servlet response? I use tomcat so if tomcat special features needed can be done with it... Can anyone please show me a small example of how to do it? 10x Tomer

  • Schema Compare SqlDatabaseOptions Timeout

    Have a small Azure SQL DB (handful of tables and stored procs) that I been able to successfully import into Visual Studio 2013 as a DB project, and all the objects (tables and procs) do get imported properly. But when trying to do a comparison using