When use warnings is on and there is a null value in the monitor data it causes warnings. So add skip if __git_main is not defined.

This commit is contained in:
Isaac Connor 2017-01-02 12:49:37 -05:00
parent b063d8d6aa
commit ac88490338
1 changed files with 1 additions and 0 deletions

View File

@ -417,6 +417,7 @@ sub toPreset
# ip addresses, ports, usernames, etc. with generic placeholders # ip addresses, ports, usernames, etc. with generic placeholders
if (!$noregex) { if (!$noregex) {
foreach (@data) { foreach (@data) {
next if ! $_;
s/\b(?:\d{1,3}\.){3}\d{1,3}\b/<ip-address>/; # ip address s/\b(?:\d{1,3}\.){3}\d{1,3}\b/<ip-address>/; # ip address
s/<ip-address>:(6553[0-5]|655[0-2]\d|65[0-4]\d\d|6[0-4]\d{3}|[1-5]\d{4}|[1-9]\d{0,3}|0)$/<ip-address>:<port>/; # tcpip port s/<ip-address>:(6553[0-5]|655[0-2]\d|65[0-4]\d\d|6[0-4]\d{3}|[1-5]\d{4}|[1-9]\d{0,3}|0)$/<ip-address>:<port>/; # tcpip port
s/\/\/.*:.*@/\/\/<username>:<pwd>@/; # user & pwd preceding an ip address s/\/\/.*:.*@/\/\/<username>:<pwd>@/; # user & pwd preceding an ip address