Script Idea

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

Script Idea
  1. Unread #1 - Aug 31, 2008 at 9:14 AM
  2. Chase Young
    Referrals:
    3

    Chase Young Guest

    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);
    }
     
  3. Unread #2 - Aug 31, 2008 at 6:31 PM
  4. Uriko
    Referrals:
    0

    Uriko Guest

    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?
     
  5. Unread #3 - Sep 1, 2008 at 12:09 AM
  6. Kevin`
    Joined:
    Nov 23, 2005
    Posts:
    549
    Referrals:
    0
    Sythe Gold:
    0

    Kevin` Forum Addict

    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..
     
  7. Unread #4 - Sep 1, 2008 at 8:21 AM
  8. Chase Young
    Referrals:
    3

    Chase Young Guest

    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.
     
  9. Unread #5 - Sep 8, 2008 at 4:38 AM
  10. santa clause
    Referrals:
    1

    santa clause Guest

    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.
     
  11. Unread #6 - Sep 16, 2008 at 6:40 PM
  12. Chase Young
    Referrals:
    3

    Chase Young Guest

    Script Idea

    That can't work because then they crash me just as easily with null connections.
     
  13. Unread #7 - Oct 10, 2008 at 11:57 PM
  14. exapto
    Joined:
    Oct 10, 2008
    Posts:
    645
    Referrals:
    0
    Sythe Gold:
    123
    Vouch Thread:
    Click Here
    Discord Unique ID:
    716746285151027321
    Discord Username:
    exapto#2360
    Homosex

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

    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 >

Users viewing this thread
1 guest


 
 
Adblock breaks this site