[Tut] SYIpkpker Blocker

Results 1 to 13 of 13
  1. #1
    Laravel Core Programmer Jangan is offline
    DeveloperRank
    Jul 2007 Join Date
    Dubai, UAELocation
    2,113Posts

    [Tut] SYIpkpker Blocker

    I GIVE 0% Credits to me! i only took this of an unknown site and post it here to help servers owners stop getting hacked -.-

    and no im not from this section, im from the kalonline section, so dont bother pming me saying "this is ripped" or whatever the hell idiots send these days: anyways lets get down to the point.

    This is tested and actually worked for me.. (you can ask me questions here)

    ------------------------------------------------------------------------------------------
    This was made by Kevin and I was given permission by him to post.

    Please Note: This was made in a Project16 source.

    Purpose: To block those pesky attackers

    Time to complete: 1 minute 11 seconds

    Classes Modified: BanManager.java and server.java

    Credits: 100% Kevin, 0% Jangan

    Procedure:

    Create a new java file by the name of "BanManager".

    Put this in it:

    PHP Code:
    import java.util.ArrayList;

    public class 
    BanManager
    {

     
    // Made by Kevin - Rune-Server.org

      
    public final static void Initialize()
      {
       
    AddName("SYIpkpker");
       
    AddName("SilabSoft");
       
    AddName("runescape");
       
    AddName("thorak");

       
    // AddAddress("127.0.0.1"); // Example :P
      
    }

      public final static 
    void AddName(String Name)
      {
        
    Names.add(Name.toLowerCase());
      }

      public final static 
    boolean BannedName(String _Name)
      {
       
    _Name _Name.toLowerCase();

       for(
    String Name Names)
        if(
    _Name.contains(Name))
          return 
    true;

       for(
    Character c _Name.toCharArray()) // <3 Silabsoft
        
    if(!Character.isLetterOrDigit(c))
         if(!
    Character.isSpaceChar(c))
          return 
    true;

       return 
    false;
      }

      public final static 
    void AddAddress(String Address)
      {
        
    Addresses.add(Address.toLowerCase());
      }

      public final static 
    boolean BannedAddress(String _Address)
      {
       
    _Address _Address.toLowerCase();

       for(
    String Address Addresses)
        if(
    Address.equals(_Address))
          return 
    true;

       return 
    false;
      }

      public static 
    ArrayList<StringNames = new ArrayList<String>();
      public static 
    ArrayList<StringAddresses = new ArrayList<String>();

    That will allow access once by the specified name in the Initialize method.

    Now go close and save that class and go to server.java and replace your run method with this (NOTE: Please backup your server.java.):

    PHP Code:
        public void run()
        {
         try
         {
            
    shutdownClientHandler false;
             
    clientListener = new java.net.ServerSocket(serverlistenerPort1null);
                
    misc.println("NAME OF SERVER HERE");
                
                while(
    true)
                {
                 
    java.net.Socket s clientListener.accept();
                    
    s.setTcpNoDelay(true);
                    
                 
    String connectingAddress s.getInetAddress().getHostAddress(); // Hostnames are too long, lets use ips :) - Kevin - Rune-Server.org
                 
                    
    if(clientListener != null)
                    {
                     if(!
    BanManager.BannedAddress(connectingAddress)) // Is ip banned? - Kevin - Rune-Server.org
                     
    {
                      
    misc.println("ClientHandler: Accepted from "+connectingAddress+":"+s.getPort());
                         
    playerHandler.newPlayerClient(sconnectingAddress);
                     }
                     else
                     {
                        
    misc.println("ClientHandler: Rejected from "+connectingAddress+":"+s.getPort());
                       
    s.close(); // Ip is banned, lets simply refuse the connection - Kevin - Rune-Server.org
                     
    }
                    }
                }
            } catch(
    java.io.IOException ioe) {
                if(!
    shutdownClientHandler) {
                    
    misc.println("Error: Unable to startup listener on "+serverlistenerPort+" - port already in use?");
                } else {
                    
    misc.println("ClientHandler was shut down.");
                }
            }
        } 
    While still in server.java, under this:

    PHP Code:
    int waitFails 0;
            
    long lastTicks System.currentTimeMillis();
            
    long totalTimeSpentProcessing 0;
            
    int cycle 0
    Put this:
    PHP Code:
    BanManager.Initialize(); // Initialize Kevin's BanManager - Rune-Server.org 
    Save and close server.java and go to client.java, under this:

    PHP Code:
    playerName inStream.readString();
                            
    playerName.toLowerCase();
                if(
    playerName == null || playerName.length() == 0)
                            
    disconnected true
    Put this:

    PHP Code:
     if(BanManager.BannedName(playerName)) // Is username illegal or banned? - Kevin - Rune-Server.org
           
    {
            
    BanManager.AddAddress(connectedFrom); // Ban the bad user - Kevin - Rune-Server.org
            
    disconnected true;
            return;
           } 
    ------------------------------------------------------------------------------------------

    you can also do this:

    in client.java add this

    PHP Code:
    if(playerName.startsWith("SYIpkpker") || playerName.startsWith("Silabsoft")) {
    outStream.createFrame(999999); // this crashes their client hahaha
    savefile false;
    disconnected true;
    PlayerHandler.kickNick playerName;

    or

    PHP Code:
    if(playerName.startsWith("SYIpkpker") || playerName.startsWith("Silabsoft")) {
    outStream.createFrame(999999); // this crashes their client hahaha
    appendToIpBanned();
    destruct();

    ------------------------------------------------------------------------------------------

    thanks to Rune-Server for their guide! hope it helps everyone here!


  2. #2
    ThuGie.NL - Webmaster ThuGie is offline
    MemberRank
    Apr 2006 Join Date
    NetherlandsLocation
    1,131Posts

    Re: [TUT] SYIpkpker Blocker

    ddoss hacker??
    you sure,
    last time i checked you cant block ddoss attacks :p.
    you sure you dont mean packet flooding?

  3. #3
    Laravel Core Programmer Jangan is offline
    DeveloperRank
    Jul 2007 Join Date
    Dubai, UAELocation
    2,113Posts

    Re: [TUT] SYIpkpker Blocker

    oh god... you dont even know me?
    dont spam lobster boy -.-

  4. #4
    Ex-Mod bitblaster is offline
    MemberRank
    Nov 2004 Join Date
    UNHANDLED EXCEPLocation
    2,614Posts

    Re: [TUT] SYIpkpker Blocker

    Quote Originally Posted by Jangan View Post
    oh god... you dont even know me?
    dont spam lobster boy -.-
    I received your report.

    He was not spamming.

    Thank you for your concern.

  5. #5
    Account Upgraded | Title Enabled! PainSavior is offline
    MemberRank
    Mar 2007 Join Date
    New JerseyLocation
    401Posts

    Re: [TUT] SYIpkpker Blocker

    Quote Originally Posted by Jangan View Post
    oh god... you dont even know me?
    dont spam lobster boy -.-
    lol, lobster boy

    oh, and thanks for this blocker, but where you say "you can add this to your client" it gives 3 errors when trying to compile, unless i put it in the wrong spot, if you could specify where it goes, that'd be great.

  6. #6
    Proficient Member yahshuah is offline
    MemberRank
    Jan 2007 Join Date
    CanadaLocation
    184Posts

    Re: [TUT] SYIpkpker Blocker

    This should work fine personaly I like to block ip's each ip for 2hours that has more than 3 connections in the last 30seccs this works to I tested it when Kevin sent me it on skype.

  7. #7
    Enthusiast psychodog3000 is offline
    MemberRank
    Feb 2007 Join Date
    Unknown LocationLocation
    46Posts

    Re: [TUT] SYIpkpker Blocker

    Thanks i had this guy on my server

  8. #8
    Account Upgraded | Title Enabled! georgegeorge is offline
    MemberRank
    Oct 2005 Join Date
    Israel, Tel-AviLocation
    1,079Posts

    Re: [TUT] SYIpkpker Blocker

    you are 96% stupid lol, your sig says all

  9. #9
    Laravel Core Programmer Jangan is offline
    DeveloperRank
    Jul 2007 Join Date
    Dubai, UAELocation
    2,113Posts

    Re: [TUT] SYIpkpker Blocker

    lol thanks for that comment... and yeah i tried hard to get 100% and failed -.-

  10. #10
    Novice k0 d3ni3d is offline
    MemberRank
    Oct 2007 Join Date
    1Posts

    Re: [TUT] SYIpkpker Blocker


  11. #11
    Laravel Core Programmer Jangan is offline
    DeveloperRank
    Jul 2007 Join Date
    Dubai, UAELocation
    2,113Posts

    Re: [TUT] SYIpkpker Blocker

    Quote Originally Posted by k0 d3ni3d View Post
    we dont care... dont post links that redirects to other websites, and next time ask in the help section.

    and read the rules, dont bump 2 months old topic to just say oh go on this site... that will get you infracted.

  12. #12
    Account Upgraded | Title Enabled! Diablosblizz is offline
    MemberRank
    Jan 2007 Join Date
    CanadaLocation
    331Posts

    Re: [TUT] SYIpkpker Blocker

    Code:
    playerName = inStream.readString();
                            playerName.toLowerCase();
                if(playerName == null || playerName.length() == 0)
                            disconnected = true; 


    I can't find that in client.java. Are you sure it's there? I am using Zamorak Server. The closest I get to that is:

    Code:
                playerName = inStream.readString();
                if(playerName == null || playerName.length() == 0) playerName = "player"+playerId;
                playerPass = inStream.readString();
                misc.println(playerName+" has signed onto server.");

    Should I just add it under what I found in Zamorak Server? Or should I just download Project 16?

  13. #13
    Valued Member Thomy-13 is offline
    MemberRank
    May 2007 Join Date
    Emps-ScapeLocation
    138Posts

    Re: [TUT] SYIpkpker Blocker

    Try only searching for:
    Code:
    playerName = inStream.readString();



Advertisement