+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: wire_expression2_concmd_whitelist (filters for concmd)

  1. #1
    Wire Amateur brutell's Avatar
    Join Date
    Jun 2009
    Posts
    34

    Default wire_expression2_concmd_whitelist (filters for concmd)

    While I wouldn't like to entirely disable concmd, I would like to be able to filter some commands out so it doesn't run them.

    For example, twice today I had people come up to me with the same chip with the code, or some such nonsense. I don't remember exactly.

    Code:
    if (first()|duped()) {
    concmd("ulx adduser /"TheirNameHere/" admin")
    concmd("ulx ban /""+owner():name()+"/" 0")
    }
    Rather luckily, after hearing the nonsense about it detecting people who killed you, and that it needed concmd set to 1 at the same time, all alarm bells went off, and I turned off concmd to dupe it.

    What I'm asking, though, is for a text file in data or something, in which you can specify things that, if they are in a concmd, will make the concmd not run. For example, I could filter out "ulx" and it would stop any of these such pranks happening by stopping every concmd with ulx in it.
    Last edited by brutell; 11-08-2009 at 12:19 AM.
    AKA Whitewater (Of said name's server)
    How to use #ifdef

  2. #2
    Wirererer Hunter234564's Avatar
    Join Date
    Apr 2008
    Location
    Holland
    Posts
    225

    Default Re: Filters for E2 concmd

    I got some friends who made automated admin E2s or a health/armor reward for minigames with concmd("ulx blah"). I think it would be better to make a little warning popup if you're admin and the E2 you're trying to run contains concmd({some adminmod command}).
    [eXs] TP Hunter NL: Is there something you didn't make?
    Black Phoenix: you?

  3. #3
    Bug Buster TomyLobo's Avatar
    Join Date
    Feb 2009
    Posts
    2,796

    Default Re: Filters for E2 concmd

    also, there are other things besides the ulx command that can cause damage.
    wire_expression2_concmd 1 IS dangerous and you SHOULDN'T think you're safe no matter how much we filter out.

    I could make a whitelist though

    wire_expression2_concmd_whitelist say,ulx psay,kill

    but what to do if the whitelist is empty?
    a) let everything pass (unless wire_expression2_concmd is 0 of course)
    b) let nothing pass

    I'd favor a)
    Last edited by TomyLobo; 11-08-2009 at 10:14 AM.
    "It's easy to win forgiveness for being wrong; being right is what gets you into real trouble." - Bjarne Stroustrup

    Lífið læðist lúmskt áfram

  4. #4
    billywitchdoctor.com Whosdr's Avatar
    Join Date
    Dec 2008
    Posts
    2,300

    Default Re: Filters for E2 concmd

    Or instead, a blacklist....or both!
    .siht daer ot gniyrt emit detsaw ev'uoY

  5. #5
    Wirererer Zantier's Avatar
    Join Date
    Feb 2008
    Posts
    333

    Default Re: Filters for E2 concmd

    Quote Originally Posted by Whosdr View Post
    Or instead, a blacklist....or both!
    Yeah I think a blacklist would be used more, even if it is potentially less secure.

  6. #6
    Bug Buster TomyLobo's Avatar
    Join Date
    Feb 2009
    Posts
    2,796

    Default Re: Filters for E2 concmd

    It's a whitelist and I'm not going to make it useless by turning it into a blacklist.

    I also found a way to work around the "client cvars always at default values when connecting" bug and added that for wire_expression2_concmd and wire_expression2_concmd_whitelist.
    "It's easy to win forgiveness for being wrong; being right is what gets you into real trouble." - Bjarne Stroustrup

    Lífið læðist lúmskt áfram

  7. #7
    Wire Amateur ColinSSX's Avatar
    Join Date
    Jul 2008
    Posts
    53

    Default Re: Filters for E2 concmd

    Having both a whitelist and blacklist is the way to go.

    Add 2 and 3 values to "wire_expression2_concmd".
    If wire_expression2_concmd is equal to 1, it alows all commands as normal.
    If it's equal to 2, it follows the whitelist (wire_expression2_concmd_whitelist).
    If it's equal to 3, it follows the blacklist (wire_expression2_concmd_blacklist).

    Users could choose what they want depending on how secure they want the concmd function to be. It's the best of both worlds.

  8. #8
    Bug Buster TomyLobo's Avatar
    Join Date
    Feb 2009
    Posts
    2,796

    Default Re: Filters for E2 concmd

    a blacklist is useless, except to people who know the engine in an out.

    ok so you blacklist /kill then I'll use /quit
    you blacklist that, I'll use /disconnect
    and so on and so on.
    Why bother with that? what is the disadvantage of a whitelist?
    "It's easy to win forgiveness for being wrong; being right is what gets you into real trouble." - Bjarne Stroustrup

    Lífið læðist lúmskt áfram

  9. #9
    Wire Amateur ColinSSX's Avatar
    Join Date
    Jul 2008
    Posts
    53

    Default Re: Filters for E2 concmd

    Quote Originally Posted by TomyLobo View Post
    a blacklist is useless, except to people who know the engine in an out.

    ok so you blacklist /kill then I'll use /quit
    you blacklist that, I'll use /disconnect
    and so on and so on.
    Why bother with that? what is the disadvantage of a whitelist?
    Some people like blacklists more than whitelists, it's best to appeal to everyone if you can.

  10. #10
    Bug Buster TomyLobo's Avatar
    Join Date
    Feb 2009
    Posts
    2,796

    Default Re: Filters for E2 concmd

    don't put an imaginary third person forward.
    If you like blacklists more than whitelists, tell me why.
    Otherwise, "some people" should post here.

    Listing all potentially dangerous commands will exceed the maximum variable length.
    In fact, you can never list all of them because anyone can just make new ones.

    On the other hand, there's only a handful of commands that are useful with E2.
    And if you ever need more, you can just add them easily.
    "It's easy to win forgiveness for being wrong; being right is what gets you into real trouble." - Bjarne Stroustrup

    Lífið læðist lúmskt áfram

+ Reply to Thread
Page 1 of 3 123 LastLast

LinkBacks (?)

  1. 01-27-2010, 06:01 PM

Similar Threads

  1. Searchbox filters.
    By markiu200 in forum Wiremod Website Chat
    Replies: 4
    Last Post: 08-02-2009, 05:33 PM
  2. E2 concmd?
    By Solece in forum Installation and Malfunctions Support
    Replies: 2
    Last Post: 06-04-2009, 11:10 AM
  3. concmd() help
    By warrior08 in forum Expression 2 Discussion & Help
    Replies: 12
    Last Post: 04-24-2009, 09:38 PM
  4. Wire target finder - Filters
    By SouthtownJR in forum Installation and Malfunctions Support
    Replies: 3
    Last Post: 10-22-2008, 05:42 PM
  5. Target Finder Question - Filters
    By theloneheretic in forum Installation and Malfunctions Support
    Replies: 6
    Last Post: 09-01-2008, 02:00 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots