RZA-PT | KilroyPT
- Joined
- Aug 27, 2007
- Messages
- 936
- Reaction score
- 85
Hi All
Just wrote up a fairly simple blackuser deleter tool (its in PHP till i get my C# down pat)
Whilst the one many of us use is good, you need to manually activate it, and you cant adjust the interval. (5 minutes is good, but would be nice to change it)
I've attached the tool and a shortcut.
The shortcut is to powershell which executes the php script along with the variables parsed.
default is to run on 2 minute intervals, no logging and non verbose.
The shortcut has been specified for logging, verbose and 1 minute intervals.
Place the BUDeleter.php in your PT-Server folder (I.E. C:\PT-Server\)
If that is not where your PT-Server folder lives, then adjust the target for the shortcut
right click -> Properties -> target
This is the default I put for the shortcut.
-s specifies sleep period (in minutes)
-l specifies logging (logging is sent to a csv file in the PT-Server folder, entries are one line per file deleted, starting with the date it deleted).
-v specifies verbose
If you're unsure and want to test, specify -t
If you run it in command and type -h it will give you all the help information too.
It's pretty basic but it works,
It does require PHP to be running (if you've not already got it)
And for PHP to be configured properly (that means, if you open CMD and type php it should be able to execute commands, if not, you need to set up php in your system environment variables)
I built this for my server as I have it start with windows as a service (using nssm), i hope its of use to others here.
If you choose to edit the code, do so but please give credit where credits due please (to me for the attached code base)
View attachment BUDeleter.zip
Just wrote up a fairly simple blackuser deleter tool (its in PHP till i get my C# down pat)
Whilst the one many of us use is good, you need to manually activate it, and you cant adjust the interval. (5 minutes is good, but would be nice to change it)
I've attached the tool and a shortcut.
The shortcut is to powershell which executes the php script along with the variables parsed.
default is to run on 2 minute intervals, no logging and non verbose.
The shortcut has been specified for logging, verbose and 1 minute intervals.
Place the BUDeleter.php in your PT-Server folder (I.E. C:\PT-Server\)
If that is not where your PT-Server folder lives, then adjust the target for the shortcut
right click -> Properties -> target
Code:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe "php 'C:\PT-Server\BUDeleter.php' -s 1 -l -v"
-s specifies sleep period (in minutes)
-l specifies logging (logging is sent to a csv file in the PT-Server folder, entries are one line per file deleted, starting with the date it deleted).
-v specifies verbose
If you're unsure and want to test, specify -t
If you run it in command and type -h it will give you all the help information too.
It's pretty basic but it works,
It does require PHP to be running (if you've not already got it)
And for PHP to be configured properly (that means, if you open CMD and type php it should be able to execute commands, if not, you need to set up php in your system environment variables)
I built this for my server as I have it start with windows as a service (using nssm), i hope its of use to others here.
If you choose to edit the code, do so but please give credit where credits due please (to me for the attached code base)
View attachment BUDeleter.zip
Attachments
You must be registered for see attachments list