diff options
author | Ole Mathias Heggem <olemathias.aa.heggem@gmail.com> | 2023-04-26 22:22:31 +0200 |
---|---|---|
committer | Ole Mathias Heggem <olemathias.aa.heggem@gmail.com> | 2023-04-26 22:22:31 +0200 |
commit | 04862e4eebba26c6d90685fa63051d1f3cc81234 (patch) | |
tree | 6a09be476589c9ade8fe661103eeb6fd4b0f3682 /tools | |
parent | 1e83fed0a29559bfb019b93101a368d4606e7d98 (diff) |
TG23 🚀
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/strip-netconf.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/strip-netconf.sh b/tools/strip-netconf.sh index 5f8c834..bfb2d35 100755 --- a/tools/strip-netconf.sh +++ b/tools/strip-netconf.sh @@ -9,25 +9,28 @@ ls -1 *.conf | while read file; do -e 's/serial-number .+;/serial-number <removed>;/g' \ -e 's/community .+ /community <removed> /g' \ -e '/\/\* dat/d' \ + -e '/\/\* tad/d' \ -e 's/ecdsa-sha2-nistp256-key .+;/ecdsa-sha2-nistp256-key <removed>;/g' \ -e 's/collector .+;/collector <removed>;/g' \ -e 's/authentication-key ".+"/authentication-key "<removed>";/g' \ -e 's/LU[0-9]+/LU1337/g' \ -e 's/SB[0-9]+/SB1337/g' \ + -e 's/ssh-ed25519 .+;/ssh-ed25519 "<removed>";/g' \ + -e 's/contact .+;/contact "<removed>";/g' \ $file > tmp/$file # Remove SSH-host-info - sed -i tmp/$file \ + sed -i '' \ -e '/ssh-known-hosts {/ {' -e 'n; s/host .\+ {/host <removed> {/' -e '}' \ tmp/$file # Remove stuff from ACL's - sed -i tmp/$file \ + sed -i '' \ -e ':again' -e N -e '$!b again' \ -e 's/prefix-list mgmt-v4 {[^}]*}/prefix-list mgmt-v4 {\n }/g' \ tmp/$file - sed -i tmp/$file \ + sed -i '' \ -e ':again' -e N -e '$!b again' \ -e 's/prefix-list mgmt-v6 {[^}]*}/prefix-list mgmt-v6 {\n }/g' \ tmp/$file |