Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 34

Thread: [RELIABLE]Anti Bad Commands (overbright shit) Solution[REBORN ONLY]

  1. #11

    Default

    I have been using on my server for a long time the sor's + james cvar bad commands filter and also anticham.

    You can't put too much variables in it or it will raise the ping to all players and also server, because of the loop on every frame. All those commands on a list will not be workable.

    Good work Ryback Nice scripting logic. It will be handy for other purposes...

    But that isn't necessary really you just need to force the overbright to value "0" in every frame and then force a vid_restart to the player when he connects to the server. Simple and works

    By the way there are some hacks that use gl overbright and that is not possible to block through the cvars. So overbright is not that easy to block.

    We all should be working to improve the already AWESOME sv_antiwh from the reborn.

    Keep the good work.
    Last edited by PacRac; July 18th, 2016 at 09:15 PM.

  2. #12
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,603

    Default

    they could bind the cvar and vid restart, or hex edit the cvar.
    lots of exploits but this is the best logic for me.

  3. #13

    Default

    if this cause any kind of lag im out :P, my servers are always laggy, cant use more lag than it allready has :P, i prefer people playing with overbright than a laggy server

  4. #14
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,603

    Default

    u noob I shouldn't run ur scripts again :P
    Editing :3

    ok done.
    it now involves cvar-to-kick only.
    Last edited by RyBack; July 19th, 2016 at 03:03 AM.

  5. #15
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    You guys can increase the wait duration and this will solve the laginess. if you have waitframe that only waits 1\20 of a second. So basically you have an endless loop running on your server almost every single frame per the number of users you have... In other words, yes it's excessive, but when I used this on my server for testing it was negligible... So my assumption is your CPU might not be able to handle it and you should raise the wait tile between each stufftext.

  6. #16
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    I made a little bit of an adjustment to Rybacks script. It stll has the old stuff, but it incorporated Rybacks script and it should work properly together. I kept the same wait commands as Ryback had since you all suggested the original caused lag.

    BTW, why do you have the mid thread included? It doesn't even look like you're using it??


    //By RyBack , James, Elgan.
    //I don't think of any othe comments so enjoy!


    level waittill spawn


    // instr
    // instr will find the position in wich a string is found at.
    // usage: waitexec global/strings.scr::instr (str string to find) ( str string ) ( int start position )
    // returns the position of string_to_find
    // eg
    // exec global/strings.scr::instr "\" "hell\o"
    // gives 4 because it starts at 0


    // if none found it will return NIL
    //stolen from elgan's strings.scr


    instr local.char local.string local.startpos:


    if(local.string == "")
    {
    end
    }


    if(local.startpos == NIL)
    {
    local.startpos = 0
    }


    if(local.startpos > local.string.size)
    {
    end
    }


    if(local.startpos < 0)
    {
    local.startpos = 0
    }

    //how many do we need?
    local.sizeneeded = local.char.size


    //need is
    local.sofar = 0


    //where we found it
    local.position = 0


    //println ( "INSTRU : Needed is: \"" + local.sizeneeded + "\" IN \"" )


    for(local.i = local.startpos; local.i <= local.string.size - 1; local.i++)
    {
    local.position = local.i - (local.sizeneeded - 1)


    //println ( "FINDING : \"" + local.char[local.sofar] + "\" IN \"" + local.string[local.i] + "\" at pos " + local.position + " so far is: " + local.sofar )
    if(local.char[local.sofar] == local.string[local.i])
    {
    //println " - found"
    //how many found?
    local.sofar++


    //is this our first matching char
    if(local.sofar == 1)
    {
    //this is our first character
    local.position = local.i
    }


    if(local.sofar != local.sizeneeded)
    {
    continue
    }


    //set out position
    //where are we at, take how many chars long the string to find was, minus 1,
    // if find 1, take 0, if find 3, we are at 1, moved 3 = 4, take 3


    //done
    end local.position
    }
    else
    {
    //reset so far
    local.sofar = 0
    }
    }


    end


    //mid
    //mid will return a string from a given position for a given number of characters.
    // usage: local.string = waitexec global/strings.scr::mid ( start pos, string, count)
    // returns: the string from start pos of string along the count.
    //
    //eg
    // local.string = waitexec global/strings.scr 2 "hello" 2
    // local.string would become 'll'
    //stolen from elgan's strings.scr
    mid local.start local.string local.count:


    //init string
    local.mid = ""


    for(local.i = 1; local.i <= local.count;local.i++)
    {
    if(local.start >( local.string.size - 1 ))
    {
    break
    }


    local.mid += local.string[local.start]
    local.start++


    }


    end local.mid


    main:


    if(level.cvar_check != NIL)
    end

    level.cvar_check = 1

    // It's nicest to make a table with the cvars
    // and their values (do not put this inside a while
    // loop as that would be very detrimental to
    // performance (cpu))

    local.vars = makeArray
    wambot 0
    wbmenu 0
    wb_aim1 99999
    wb_aim2 99999
    wb_pingprediction 99999
    wb_aimbot 0
    wb_autoshoot 0
    wb_fov 0
    r_farplane_nofog 0
    r_farplane 0
    r_farplane_nocull 0
    cg_3rd_person 0
    r_overbrightbits 0
    r_light_nolight 0
    endArray

    local.accum = 0
    local.n = 1 // this sets how many stufftexts will be sent per frame

    while(1)
    {
    for(local.i=1; local.i <= $player.size; local.i++)
    {
    // this makes sure we will be referencing the same
    // player during our check, which now
    // covers multiple server frames
    local.p = $player[local.i]
    local.ui = local.p.userinfo

    // set all vars, one per frame
    // of course you could change this to more
    // than one per frame for faster aimbot resets
    // (by incrementing local.n),
    // just keep in mind each line adds a little bit of lag
    // you may also include more than one
    // stufftext command in a single packet:
    // local.p stufftext "set var1 a; set var2 b"
    // but I believe the game does this optimization
    // automatically (stufftexts are accumulated
    // and then sent at the end of the server frame)
    // so afaik there's no gain from
    // combining sets manually.

    for(local.j = 1; local.p && local.j <= local.vars.size; local.j++)
    {
    local.pos = thread instr local.vars[local.j][1] local.ui
    local.p stufftext ("set " + local.vars[local.j][1] + " " + local.vars[local.j][2])

    if(local.pos != NIL && local.pos != NULL)
    {
    local.pos += local.vars[local.j][1].size + 1

    if(local.ui[local.pos] != local.vars[local.j][2])
    {
    stuffsrv ("clientkickr " + getclientnum(local.p) + " " + "Kicked for using a unallowed cvar"
    break;
    }
    }

    else
    {
    waitframe
    local.player stufftext ("setu " + local.vars[local.j][1] + " " + local.vars[local.j][2])
    }

    // this is a little 'trick' to evenly throttle the number
    // of stufftexts per frame.
    //this will work for any number of players,
    // any number of vars and any number of n
    local.accum++
    local.accum = local.accum%local.n

    if(local.accum==0)
    {
    waitframe
    }
    }
    }
    wait 3
    }
    end

  7. #17
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,603

    Default

    Was planning to get the value using mid but I found it easier using string index.

  8. #18

    Default

    Quote Originally Posted by James View Post
    You guys can increase the wait duration and this will solve the laginess. if you have waitframe that only waits 1\20 of a second. So basically you have an endless loop running on your server almost every single frame per the number of users you have... In other words, yes it's excessive, but when I used this on my server for testing it was negligible... So my assumption is your CPU might not be able to handle it and you should raise the wait tile between each stufftext.
    Yes James your right, but even increasing a wait duration you will get lag if you put all those cvars commands into it. To work it properly we have to choose the best and most common cvars and also we must know which cvars commands are really needed, because alot are useless.

    But we can't raise too much the wait because then they could bind cvar and do a restart like ryback said. If we keep the wait close to a frame no one has the time to use the cvar and vid_restart, because when you do a vid_restart the command is already 0 again because of the force loop each frame.
    I manage to put it to work affecting almost nothing of the server and players ping.

    Need to work around the wait and the number of players you want to stufftext.
    Last edited by PacRac; July 20th, 2016 at 09:12 AM.

  9. #19

    Default

    Hello Friends of the Medal!
    The server was configured with some locks according to this topic. It happens that after changing the skin, the player is kicked. Print attachment.
    Errors are random.
    Click image for larger version. 

Name:	erro_2.JPG 
Views:	39 
Size:	48.5 KB 
ID:	1751

  10. #20

    Default

    because .userinfo string has a limit, when you exceed that limit you will get errors like that one.
    try removing some vars from the array.

Posting Permissions

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