I created this because I always forget the command to enumerate snmp and I am often too lazy to read man pages 🙂
[codesyntax lang=”bash”]
#!/bin/bash # by Ed Wiget # This script takes an input ip or domain and performs a snmpwalk using common community strings # 20120204 - initial script function proghelp (){ echo "" echo "" echo "Help:" echo "./eds-smtpwalk.sh ip_address" echo "" echo "Example:" echo "./eds-smtpwalk.sh 127.0.0.1" echo "" echo "" } if [ $# -ne 1 ]; then clear proghelp exit fi # set up the first input value if [ "$1" == "" ]; then echo "What is the ip address to query?" read SVRIP else SVRIP=$1 fi if [ -f wordlist-common-snmp-community-strings.txt ]; then for COMSTG in `cat wordlist-common-snmp-community-strings.txt; do snmpwalk -v2c -c ${COMSTG} $1 system done else echo "wordlist-common-snmp-community-strings.txt does not exist.......fetching now......please wait" echo "" wget https://github.com/fuzzdb-project/fuzzdb/blob/master/wordlists-misc/wordlist-common-snmp-community-strings.txt echo "" echo "please run again....." fi
[/codesyntax]
Leave a Reply
You must be logged in to post a comment.