Dshield reporting
-
I report firewall activity to Dshield using their script "dshieldpfsense.php" on my Netgate 1100. After upgrading to 23.01 Beta this script fails with :
PHP ERROR: Type: 1, File: /root/bin/dshieldpfsense.php, Line: 158, Message: Uncaught TypeError: Cannot access offset of type string on string in /root/bin/dshieldpfsense.php:158.
I wanted to check if anyone knows if any libraries changed that would require additional includes for php scripts?
I have reported this to Dshield (ISC) as well.
Thanks
-
They need to update the code in their script to be compatible with PHP 8.1.
-
This I assume?
https://github.com/jullrich/dshieldpfsense -
@stephenw10 Yes.
-
@ltolbert I have modified the script to exclude records like "logfile turned over due to size" and new protocols like ",sctp,". These records seem to cause the function "parse_firewall_log_line" (in syslog.inc) to not populate index names in the array "flent" and that causes the error I noted above. I think Dshield needs to review the logic of this script. I have it working but any new protocol or unknown line in the flter.log will break it again. I will add it has been fun learning about php scripts as I am self trained so I'm sure I have made some mistakes..