khafir

Battleye Parser and Exception Generator (Linux)

20 posts in this topic

I got tired of manually constructing battleye exceptions for scripts.txt so I wrote a Perl script to parse battleye/scripts.log, display the exception number and suggested exception text for entry into battleye/scripts.txt. I've been using this without issue and I figured I would share. Using this in CentOS-7. 

Future Goals:

  • Option to backup battleye/scripts.txt (automated).
  • Option to add exceptions (automated) by user, IP, GUID, or ALL.
  • Option to select which exceptions to add (automated).
  • Flag to display full information about exception source (user, IP, GUID, etc).  Added!

Github link here.

Usage Syntax:

[steam@localhost arma3]$ ./bparse.pl

Use: ./bparse.pl full_path_to_battleye_scripts_log_file
ex:  ./bparse.pl /home/steam/steamcmd/arma3/battleye/scripts.log

Example Default Output:

[steam@localhost arma3]$ ./bparse.pl /home/steam/steamcmd/arma3/battleye/scripts.log
#38,!="(_this\nselect\n0)\nexecVM\n\"\A3\Structures_F\Wrecks\Scripts\Wreck_Heli_Attack_01.sqf\""
#38,!="(_this\nselect\n0)\nexecVM\n\"\A3\Structures_F\Wrecks\Scripts\Wreck_Heli_Attack_01.sqf\""

Total Entries parsed from /home/steam/steamcmd/arma3/battleye/scripts.log: 2

Optional Paramaters

You may elect to include additional information in the output such as the date, IP, user, GUID, or all aforementioned fields in addition to the exception number and the recommended exception text.

To display additional information use the following syntax for the secondary arguement: -d[diuga]
Example: ./bparse/home/steam/steamcmd/arma3/battleye/scripts.log -du
Example: ./bparse/home/steam/steamcmd/arma3/battleye/scripts.log -dgi

 

Edited by khafir

Share this post


Link to post
Share on other sites

Administrative note: I'll be unable to respond to replies to this thread and address issues until the first of May as I'll be travelling.

Edited by khafir

Share this post


Link to post
Share on other sites
Advertisement
4 hours ago, Tobias Solem said:

Any chance that the output can filter out copies of the same exception, ie. only show one instance regardless of how many kicks for one reason there were?

I just added the feature but I'm out of time to document it on the Git, use the -dU <-- case sensitive as the second argument. 

Example: ./bparse.pl /home/steam/steamcmd/arma3/battleye/scripts.log -dU

I will update Git when I return, enjoy.

Github/readme updated.

Edited by khafir
  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, Tobias Solem said:

Any chance that the output can filter out copies of the same exception, ie. only show one instance regardless of how many kicks for one reason there were?

Another reason I didn't make it automatically parse out duplicates was for in the event an admin wanted to see a pattern of say fault or BE penetration activity in the logs. 

Share this post


Link to post
Share on other sites

Thank you 'khafir' makes things simpler for me. :)

 

A (dangerous) but interesting feature might be to have it add the exceptions to the end of the relative lines in scripts.txt... that would make it completely automated. But if so, it should be like you did this, like a modifier that people would have to add on their own risk.

Edited by Tobias Solem

Share this post


Link to post
Share on other sites
6 hours ago, Tobias Solem said:

Thank you 'khafir' makes things simpler for me. :)

 

A (dangerous) but interesting feature might be to have it add the exceptions to the end of the relative lines in scripts.txt... that would make it completely automated. But if so, it should be like you did this, like a modifier that people would have to add on their own risk.

My intent is to add a feature that will auto-add exceptions as well as one where users can select which to add. 

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.