Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ -z "$1" ]; then
- echo "[*] Simple Automated snmpwalk Script"
- echo "[*] Usage: $0 <file of ip addresses>"
- exit
- fi
- IFS=$'\n' # make newlines the only separator
- set -f # disable globbing
- for ip in $(cat $1); do
- echo "[*] Trying SNMP Walk for $ip..."
- for line in $(cat mib-values); do
- value=$(echo $line | cut -d' ' -f1)
- parameter=$(echo $line | cut -d' ' -f2-)
- echo "[*] Trying $parameter"
- snmpwalk -c public -v1 $ip $value | cut -d' ' -f4-
- echo
- done
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement