Giter VIP home page Giter VIP logo

Comments (4)

Torndeco avatar Torndeco commented on August 13, 2024

Its the ([0-9a-f]{32}) thats causing it to fail on a match....

{32} means to match the previous char 32 times in a row
But if u do
{3,32} means it just needs to only match the previous char 3 times (up to 32 times)

Also u haven't added matches for white-spaces or : or # in there aswell...
So it can only match against the last few numbers after :
So that's normal 1-3 numbers only i believe

Try www.pythonregex.com to test out your filter code against, since its using the python regrex library (same as pyBEscanner)


Also i am just back from work really, so i am not 100% sure what u are attempting to-do here exactly...

Basicly the application works like

Original Log entries
Remove White-listed Entries
Remove Kick-listed Entries (add players to list to be kicked)
Remove Black-listed Entries (add players to list to be kicked)
Whatever entries are left -> Unknown Logs

Original Log entries
Spam Filters (aren't effected by other filters basicly)



U could whitelist the shot & boltsteel entries.
And then in the banlist do a catch all ban
.*
Which will result in same thing...
Note sure why i haven't done that already, since i think about it more now..

The only difference between the 2 methods
Is with yours the unknown logs will have shot entries logged in it....
Either way is good really

If u want commit whichever u think is better... gonna grab some coffee

from pybescanner.

Torndeco avatar Torndeco commented on August 13, 2024

Also have no idea where u picked the number 32 from :)

Just clear it up incase i didn't mention it...

The following example of a line entry in a log file

19.12.2012 12:14:52: Player Name (IP:Port) GUID - #0 49:247 BoltSteelF 49:226 z_villager1 43 [0,0,0]

Only the code part of the log is matched against a regrex filter, helps stop false banning / kicks over a players name.
i.e

#0 49:247 BoltSteelF 49:226 z_villager1 43 [0,0,0]

from pybescanner.

k4n30 avatar k4n30 commented on August 13, 2024

"Note sure why i haven't done that already, since i think about it more now.." hahahaha, now I understand more about it it makes sense now.

Original Log entries
Remove White-listed Entries
Remove Kick-listed Entries (add players to list to be kicked)
Remove Black-listed Entries (add players to list to be kicked)
Whatever entries are left -> Unknown Logs

Does this mean it goes through ALL the whitelists first then moves on, or does it do a set of filters at a time?

The ([0-9a-f]{32}) was from another program similar to this and I wanted to test their filters versus ours. The 32 from what I can gather matches the GUID (I'm assuming which is used for the ban input later on). Now that I know pyBEscanner only matches from # onwards, it makes sense why it doesn't work. Because of this the setpos.log is a bad example (it seemed easiest at the time). I'll implement what you suggest and test it for a bit before creating a pull request.

I have other regex expressions for all the other log files, so when your free on IRC I'll discuss it with you on there :)

from pybescanner.

Torndeco avatar Torndeco commented on August 13, 2024

Yeah the app scans all whitelist filters first & then kicklists & banlists
so if u had

dayz-default, dayz-weapons-default

Original Log entries
Remove White-listed Entries (dayz-default, dayz-weapons-default)
Remove Kick-listed Entries (dayz-default, dayz-weapons-default)
Remove Black-listed Entries (dayz-default, dayz-weapons-default)
Whatever entries are left -> Unknown Logs

from pybescanner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.