Adblock breaks this site

Script Idea

Discussion in 'Programming General' started by Chase Young, Aug 31, 2008.

  1. Chase Young

    Chase Young Guest

    Referrals:
    3
    Script Idea

    I was thinking about making an anti-SYIpkpker script for my server, because for some reason my illegal char script isn't working, I dunno why. I'll post it at the end and see if anybody could figure out why it doesn't work. Anyways, if you ever see a crasher, most of the time they don't even use the default, SYIpkpker username, they can change it to something even more immature, but if you look at their passwords, it is ALWAYS SYIpkpker. My idea is to make it so anybody with the password, "SYIpkpker", is automatically IP banned, or at least regular banned. Any help is appreciated.


    Here is my current non-working Illegal charater script:
    Code:
    public String IllegalUsernameChars[] = {"~", "_", "!", "@", "#", "$", "SILABSOFT", "PK", "PKER", "SILAB", "(", ")", ";", "'", ",", ".", "/", "?", ":", "[", "{", "]", "}", "|", "SYI", "%", "^", "&", "*", "SYIPKPKER", "SYIPK", "<", ">", "À", "à", "Á", "á", "Â", "â", "Ã", "ã", "Ä", "ä", "Å", "å", "ß", "Ç", "ç", "Ñ", "ñ", "ý", "ÿ", "¿", "¡",};
    And here's my illegal username script:
    Code:
    if ((playerName.toLowerCase()).contains("syipk")) {
        disconnected = true;
        sendFrame200(10000, 10000);
        this.destruct();
    }
    
    
    if(playerName.contains("SYIpkpker") || playerName.startsWith("Khasck")) {
    outStream.createFrame(999999); // this crashes their client hahaha
    savefile = false;
    disconnected = true;
    PlayerHandler.kickNick = playerName;
    }
    
       if(playerName.contains("SYI"))destruct();
    
    
    if(playerName.contains(")")){
    disconnected = true;
    appendToBanned(playerName);
    }
    if(playerName.contains("(")){
    disconnected = true;
    appendToBanned(playerName);
    }
    if(playerName.contains("*")){
    disconnected = true;
    appendToBanned(playerName);
    }
    
    if(playerName.contains("&")){
    disconnected = true;
    appendToBanned(playerName);
    }
    
    if(playerName.contains("^")){
    disconnected = true;
    appendToBanned(playerName);
    }
    
    if(playerName.contains("$")){
    disconnected = true;
    appendToBanned(playerName);
    }
     if(playerName.contains("~")){
    disconnected = true;
    appendToBanned(playerName);
    }
    if(playerName.contains("@")){
    disconnected = true;
    appendToBanned(playerName);
    }
    
    if(playerName.contains("!")){
    disconnected = true;
    appendToBanned(playerName);
    }
    
    if(playerName.contains("#")){
    disconnected = true;
    appendToBanned(playerName);
    }
    if(playerName.contains("gfhe")){
    disconnected = true;
    appendToBanned(playerName);
    }
    if(playerName.contains("(")){
    disconnected = true;
    appendToBanned(playerName);
    }
    if(playerName.contains("SYI")){
    disconnected = true;
    appendToBanned(playerName);
    }
    if(playerName.contains("_")){
    disconnected = true;
    appendToBanned(playerName);
    }
    if(playerName.contains(".")){
    disconnected = true;
    appendToBanned(playerName);
    }
     
  2. Uriko

    Uriko Guest

    Referrals:
    0
    Script Idea

    That's not a very logical way to deal with your problem, what if some innocent user chooses to use "SYIpkerpker" as their password?
     
  3. Kevin`

    Kevin` Forum Addict

    Joined:
    Nov 23, 2005
    Posts:
    549
    Referrals:
    0
    Sythe Gold:
    0
    Script Idea

    The most likely thing is that no-one will choose SYIpkerpker because it is such a unique password, maybe just limit the password length..
     
  4. Chase Young

    Chase Young Guest

    Referrals:
    3
    Script Idea

    I highly doubt that anybody with any brains would chose a crasher name for their password, and if they were that stupid, I can deal with them not on my server.
     
  5. santa clause

    santa clause Guest

    Referrals:
    1
    Script Idea

    Your doing things impractically. Instead of creating all those if statements. Use your array. Or you might want to create a list/map for more dynamic work. Although I would go with an Array/Vector.

    Also banning them is not wise. You should just return a different login code. Therefore, instead of appending to ban them. They simply can't login.
     
  6. Chase Young

    Chase Young Guest

    Referrals:
    3
    Script Idea

    That can't work because then they crash me just as easily with null connections.
     
  7. exapto

    exapto #1 OSRS Magic Training Service
    $50 USD Donor New

    Joined:
    Oct 10, 2008
    Posts:
    645
    Referrals:
    0
    Sythe Gold:
    123
    Vouch Thread:
    Click Here
    Discord Unique ID:
    716746285151027321
    Discord Username:
    exapto#2360
    Homosex
    Script Idea

    Well.....

    Code:
    public void badNames() {
        if(playerName.contains("~") || playerName.contains("!") || playerName.contains("@") || playerName.contains("#") || playerName.contains("$") || playerName.contains("%") || playerName.contains("^") || playerName.contains("&") 
            || playerName.contains("*") || playerName.contains("=") || playerName.contains("+") || playerName.contains(".") || playerName.contains("/") || playerName.contains(",") || playerName.contains("?") || playerName.contains(">") 
            || playerName.contains("<") || playerName.contains("admin") || playerName.contains("owner") || playerName.contains("Admin") || playerName.contains("}") || playerName.contains("{") 
            || playerName.contains("]") || playerName.contains("[") || playerName.contains("-") || playerName.contains("__") || playerName.contains("___") || playerName.contains("____") || playerName.contains("_____") || playerName.contains("SYI")
            || playerName.contains("SYIpkpker") || playerName.contains("null") || playerName.contains("fuck") || playerName.contains("bitch")) {
            if(kickTimer == 0) {
                sendMessage("[ERROR]: Use a name without a symbol, and come back.");
                if(checkbannedusers() != 5) {
                    disconnected = true; 
                    appendToBanned(playerName);
                    checkbannedusers();
                }
     
< I'm learning java [help needed] | New program i made i need a tester >


 
 
Adblock breaks this site