diff options
author | Ole Mathias Heggem <olemathias.aa.heggem@gmail.com> | 2023-01-21 19:07:38 +0100 |
---|---|---|
committer | Ole Mathias Heggem <olemathias.aa.heggem@gmail.com> | 2023-01-21 19:07:38 +0100 |
commit | 709c78569b26677624e60588fa1166dc659ac93c (patch) | |
tree | 2bd5555af31b637d03693b8563fb24b41bf1f22b /tools/sql-strip.pl | |
parent | f5da0d943401e527f5162e9c6344deb65b19b045 (diff) |
chore: cleanup repo
Diffstat (limited to 'tools/sql-strip.pl')
-rw-r--r-- | tools/sql-strip.pl | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/tools/sql-strip.pl b/tools/sql-strip.pl deleted file mode 100644 index 0e2fec6..0000000 --- a/tools/sql-strip.pl +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/perl -use warnings; -use strict; - -my $ignore = "((([0-9a-f]{2}[:]){5}[0-9a-f]{2})|"; -$ignore .= "([0-9]{4}\-[0-9]{2}\-[0-9]{2} [0-9]{2}\:[0-9]{2}\:[0-9]{2})"; -$ignore .= ").*"; - -my $community = "<removed>"; -my $snmpv3 = 'SHA/<removed>/AES/<removed>'; - -my $skip = 0; - -open (SQL, $ARGV[0]) or die "Unable to open SQL-file"; -while (<SQL>) { - unless (/^$ignore$/){ - - if (/COPY (linknet_ping|ping|mbd_log|squeue|temppoll|ap_poll|polls)/){ - $skip = 1; - print; - } - - if (/\\\./){ - $skip = 0; - } - - unless ($skip){ - s/$community/<removed>/g; # community - s/PASSWORD '.+'/PASSWORD '<removed>'/g; # password for SQL-users - s/public$/<removed>/; # public-community -- assuming last column - #s/$snmpv3/SHA\/<removed>\/AES\/<removed>/g; # snmpv3 - print; - } - } -} |