Social Icons

Thursday, 3 May 2012

[TUT] Simple password protection [/TUT]

[Image: t5tyR.png]

Hey guys, I have find it very annoying to have some kid take your client and hand it out too people, and many others do too. This tutorial will show you how to make a simple password protection on your client. Anyone with a brain can crack this.

--How to make it--
First off, you will need to create a new boolean like so:
[Image: iXs2h.png]
It can really be named ANYTHING as long as you don't already have a boolean with the same name.
I use a custom class to hold all of my booleans and ArrayLists (

Next, you will need to make an ArrayList:
[Image: hHFTx.png]
Again, that can be named anything you want.

Next, your going to need to navigate to This is where you will be getting your file and reading it.

Right at the top of the file you should see something that looks like this:
[Image: eYO1Y.png]

Below that there will be:
chatMessageList = new ArrayList();
  rand = new Random();
  field_933_a = null;
  updateCounter = 0;
  recordPlaying = "";
  recordPlayingUpFor = 0;
  recordIsPlaying = false;
  prevVignetteBrightness = 1.0F;
  mc = minecraft;
Now, right below where it says mc = minecraft; your going to need to get the file that holds the passwords/keys.
[Image: cpb81.png]
The blacked out line is simply the url to a text file. (Enter your own url. It must be a direct download.
Then you will need to change BaseHack.keys.add(strLine); too ..add(strLine);
What that does is adds each line of your text file too the array list. (Pretty self explanatory).
Now you need to add this too a place that will check when you load a world, display a gui, press the mouse button ect (Skid proofing I guess?)
[Image: Bxtw6.png]

Now for the big part, creating the GUI. I created a new class called GuiLogin.

Warning! Large image

This class will create a GUI with two buttons and a text box for you to enter the password. If the password you entered matches with one of the ones in the ArrayList, it will set isLoggedIn to true, allowing you to play. Also, in that image three brackets at the bottom are missing I believe, I could not fit them all :/

After creating that Gui you will need to create a button to open it. That I will not show you.


Sorry if I did not explain it well, I am in a hurry. If you have any questions just ask below and I'll try to help.

Final Result
[Image: 9DEqk.png]

inb4 dis is eazy to cr4ck

No comments:

Post a Comment