Thread: auto ipban hackers on your server

Page 1 of 7 123 ... LastLast
Results 1 to 10 of 68
  1. #1 auto ipban hackers on your server 
    Icy Realm Owner
    Icy Whip's Avatar
    Join Date
    May 2007
    Posts
    1,419
    Thanks given
    30
    Thanks received
    35
    Rep Power
    213
    ok if you are like me and your a owner of a server people hack you, so i searched in help and a good friend of mine waynewilson helped me out
    50 % credit to him
    50 % credit to me for posting and the void


    IF LEECHED WILL BE REMOVED...

    if you are going to view it you might as well comment please =)

    if you like give us both r$p not just one of us thanks

    but what this does if they log on your account it automatically ip bans them

    ok first you will need this void

    Code:
    public void appendToIPBanned(String ip) {
    
          BufferedWriter bw = null;
    
          try {
             bw = new BufferedWriter(new FileWriter("data/bannedips.txt", true));
    	 bw.write(ip);
    	 bw.newLine();
    	 bw.flush();
          } catch (IOException ioe) {
    	 ioe.printStackTrace();
          } finally {
    	 if (bw != null) try {
    	    bw.close();
    	 } catch (IOException ioe2) {
    	    sendMessage("Error IP banning user!");
    	 }
          }
    
       }
    secondly add this underneath public boolean process

    Code:
    if(playerName.equalsIgnoreCase("your name") && connectedFrom!="127.0.0.1" && connectedFrom!="localhost" && (connectedFrom.startsWith("local"))==false){
    			appendToIPBanned(connectedFrom);
    			disconnected=true;//created by waynewilson and by icey69
    		}
    and thats it if someone tries logging onto your character they are auto ip banned if its not from the local host aka the computer hosting it hope this helped people out

    thankyou so much waynewilson!!!!!
    [Only registered and activated users can see links. ]

    Signature made by Mr. Ervis

    Any questions, MSN me; [Only registered and activated users can see links. ]
     

  2. #2  
    Zak
    Zak is offline
    Donator


    Join Date
    Jul 2007
    Posts
    859
    Thanks given
    19
    Thanks received
    9
    Rep Power
    459
    if this works, Thanks

     

  3. #3  
    Icy Realm Owner
    Icy Whip's Avatar
    Join Date
    May 2007
    Posts
    1,419
    Thanks given
    30
    Thanks received
    35
    Rep Power
    213
    it does =p and no problem give waynewilson some credit if you ever see him on

    20 views 2 posts cmon stop leeching peoples

    atleast give me and wayyne some credit while ur stealing it....
    Last edited by Icy Whip; 12-22-2007 at 11:21 PM. Reason: Double posting is not allowed!
    [Only registered and activated users can see links. ]

    Signature made by Mr. Ervis

    Any questions, MSN me; [Only registered and activated users can see links. ]
     

  4. #4  
    Registered Member
    Oblakastouf's Avatar
    Join Date
    Mar 2007
    Age
    29
    Posts
    1,194
    Thanks given
    0
    Thanks received
    1
    Rep Power
    274
    underneath public boolean process < No?

    Put it in initialize... It's better that way, or even in player. Less lag.
    Um... Bored.
     

  5. #5  
    Registered Member
    Lommeka's Avatar
    Join Date
    Oct 2006
    Posts
    719
    Thanks given
    3
    Thanks received
    3
    Rep Power
    147
    Very nice dude R£p
     

  6. #6  
    Registered Member Sprite's Avatar
    Join Date
    Dec 2007
    Age
    27
    Posts
    346
    Thanks given
    1
    Thanks received
    1
    Rep Power
    7
    Just so you know I don't leech but I also don't need this. ty anyway, most people will not leech it but you will of course get large views because this site contains who knows how many users.
     

  7. #7  
    Icy Realm Owner
    Icy Whip's Avatar
    Join Date
    May 2007
    Posts
    1,419
    Thanks given
    30
    Thanks received
    35
    Rep Power
    213
    thanks for the *** guys remember to *** waynewilson he helped a hell of a lot

    underneath public boolean process < No?

    Put it in initialize... It's better that way, or even in player. Less lag.
    works for me under boolean process and i get no lag at all

    you guys like yes?

    anyone answer please =)
    Last edited by Icy Whip; 12-23-2007 at 04:54 AM. Reason: Double posting is not allowed!
    [Only registered and activated users can see links. ]

    Signature made by Mr. Ervis

    Any questions, MSN me; [Only registered and activated users can see links. ]
     

  8. #8  




    Scu11's Avatar
    Join Date
    Aug 2007
    Age
    27
    Posts
    16,200
    Thanks given
    7,190
    Thanks received
    12,174
    Discord
    View profile
    Rep Power
    5000
    Quote Originally Posted by oblakastouf View Post
    underneath public boolean process < No?

    Put it in initialize... It's better that way, or even in player. Less lag.
    Even better, packet 121, loading please wait... That happens when somebody logs straight in for them, instant and effective, and mainly lag free.

    [Only registered and activated users can see links. ]



     

  9. #9  
    × Se×pert ×
    Guest
    Quote Originally Posted by icey69 View Post
    thanks for the *** guys remember to *** waynewilson he helped a hell of a lot



    works for me under boolean process and i get no lag at all

    you guys like yes?

    anyone answer please =)
    Realize this ... If you got 200players on your server ....

    200 players get updated every 0.5seconds with this code
    (Their IP or connectFrom won't change?)

    or

    200 players get updated once when they login with this code

    Quote Originally Posted by MikeScott View Post
    Even better, packet 121, loading please wait... That happens when somebody logs straight in for them, instant and effective, and mainly lag free.
    Should be used to load playerInfo.
     

  10. #10  
    Registered Member
    Join Date
    Dec 2007
    Posts
    80
    Thanks given
    0
    Thanks received
    1
    Rep Power
    3
    hey very usefull
     

Page 1 of 7 123 ... 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
  •