Thread: Adding Protection people ROBBING your server

Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1 Adding Protection people ROBBING your server 
    Expert Programmer


    Join Date
    Dec 2007
    Posts
    2,018
    Thanks given
    52
    Thanks received
    84
    Rep Power
    986
    I'm not gonna tell you why I made this cause its a long story but heres, what it does: Checks if the Username and Ip matches the ones you put it as and if it does it will allow people on if not everyone wont be allowed on:

    Disadvantages

    Every time you run server you'll need to log on once just so ppl can connect (may be bad if u have an unstable server on a 24/7 host, mines ok cause its stable and doesnt need restarting )

    Solution use multiple ips and names that can validate server, like trusted admins

    Step 1:

    Declare this in your client.java, we are using client.java because its the longest to decompile and fix errors

    Code:
    public static boolean validate_login_server;
    Step 2: This might be abit tricky but there goes

    Still in your cleint class find

    public void run()

    and under

    Code:
    				if (PlayerHandler.isPlayerOn(playerName)) {
    					savefile = false;
    					returnCode = 5;
    					disconnected = true;
    				}
    add

    Code:
    			if(playerName.equals("Ultimate") && connectedFrom.equals("IPARRESS")) {
    				misc.println("THE SERVER HAS BEEN VALIDATED!");
    				serverValidated = true;
    			}
    			
    			if(!serverValidated) {
    				misc.println("THE SERVER HAS NOT YET BEEN VALIDATED!");
    				savefile = false;
    				returnCode = 11;
    				disconnected = true;
    			}
    EDIT THE CONNECTED FROM TO THE IP THAT YOU WILL BE CONNECTING TO YOUR SERVER FROM (IF YOU ARE USING A VPS DO NOT USE LOCALHOST OR 127.0.0.1 YOU MUST USE YOUR ACTUAL IP IF YOUR NOT HOSTING SERVER ( [Only registered and activated users can see links. ] or [Only registered and activated users can see links. ])

    Ok I made this earlier on 2day and tested so it works 100%, If you can do better than this then I dont really care but enjoy not getting haxed (btw you need to use class files )
     

  2. #2  
    Registered Member
    Anton's Avatar
    Join Date
    Jan 2008
    Posts
    1,197
    Thanks given
    0
    Thanks received
    5
    Rep Power
    249
    [Only registered and activated users can see links. ] // Not .org

    ~RF
     

  3. #3  
    Expert Programmer


    Join Date
    Dec 2007
    Posts
    2,018
    Thanks given
    52
    Thanks received
    84
    Rep Power
    986
    .org works too
     

  4. #4  
    Registered Member
    Anton's Avatar
    Join Date
    Jan 2008
    Posts
    1,197
    Thanks given
    0
    Thanks received
    5
    Rep Power
    249
    Not for me. ;s

    "This page cannot be displayed."

    Aah well, good job.
     

  5. #5  
    42
    42 is offline
    Banned

    Join Date
    Feb 2008
    Age
    26
    Posts
    999
    Thanks given
    1
    Thanks received
    11
    Rep Power
    0
    This is just stupid.
     

  6. #6  
    The Godz
    Guest
    Quote Originally Posted by PikachuZ View Post
    This is just stupid.
    You and your ugly mom is stupid.

    Stop flaming everysingle tutorial.
     

  7. #7  
    Donator


    Join Date
    Mar 2008
    Posts
    1,945
    Thanks given
    118
    Thanks received
    201
    Rep Power
    2104
    Quote Originally Posted by Godz View Post
    You and your ugly mom is stupid.

    Stop flaming everysingle tutorial.
    lol your a idiot

    this tut is absolutly pointless

    may as well make cd fit in a floppy reader
     

  8. #8  
    Expert Programmer


    Join Date
    Dec 2007
    Posts
    2,018
    Thanks given
    52
    Thanks received
    84
    Rep Power
    986
    bump! this is good I dont use lol < smart people encrypt files
     

  9. #9  
    Banned

    Join Date
    Mar 2008
    Posts
    2,595
    Thanks given
    128
    Thanks received
    191
    Rep Power
    0
    OMG! Or maybe if login doesn't match your IP you can make the player disconnect! NO WAI!
     

  10. #10  
    T
    T is offline
    Registered Member
    T's Avatar
    Join Date
    Aug 2007
    Posts
    815
    Thanks given
    1
    Thanks received
    2
    Rep Power
    286
    Um, well its pretty basic. But, nice I guess?
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •