- Sleeping Sheep Hackers… - http://sleepingsheephackers.org -

Small SNMP kung fu for Windows

Dieser Eintrag stammt von matti Am 9.10.2009 @ 13:19 In hacking | Keine Kommentare

.bat file:

::requires [1] http://www.elifulkerson.com/articles/net-snmp-windows-binary-unofficial.php
::requires [2] http://unxutils.sourceforge.net/
@echo off
snmpwalk.exe -O v -v 1 -c %2 %1 “.1.3.6.1.2.1.1.5″ | sed “s/STRING: /HOSTNAME:/” | sed “s/\”//g”
snmpwalk.exe -O v -v 1 -c %2 %1 “1.3.6.1.4.1.77.1.4.1″ | sed “s/STRING: /DOMAIN:/” | sed “s/\”//g”
snmpwalk.exe -O v -v 1 -c %2 %1 “.1.3.6.1.2.1.1.1″ | sed “s/STRING: /DESCRIPTION:/” | sed “s/\”//g”
snmpwalk.exe -O v -v 1 -c %2 %1 “1.3.6.1.2.1.1.3″ | sed “s/Timeticks: /UPTIME:/” | sed “s/\”//g”
snmpwalk.exe -O v -v 1 -c %2 %1 “1.3.6.1.4.1.77.1.2.25″ | sed “s/STRING: /USER:/” | sed “s/\”//g”
snmpwalk.exe -O v -v 1 -c %2 %1 “1.3.6.1.4.1.77.1.2.27″ | sed “s/STRING: /SHARE:/” | sed “s/\”//g”
snmpwalk.exe -O v -v 1 -c %2 %1 “1.3.6.1.4.1.77.1.2.3.1.1″ | sed “s/STRING: /SVC:/” | sed “s/\”//g”
snmpwalk.exe -O v -v 1 -c %2 %1 “1.3.6.1.2.1.25.4.2.1.2″ | sed “s/STRING: /PROCS:/” | sed “s/\”//g”
snmpwalk.exe -O v -v 1 -c %2 %1 “1.3.6.1.2.1.6.13.1.3″  | sed “s/INTEGER: /TCP:/” | sed “s/\”//g”
snmpwalk.exe -O v -v 1 -c %2 %1 “1.3.6.1.2.1.7.5.1.2.0.0.0.0″  | sed “s/INTEGER: /UDP:/” | sed “s/\”//g”
snmpwalk.exe -O v -v 1 -c %2 %1 “1.3.6.1.2.1.25.2.3.1.3″ | sed “s/STRING: /DISK:/” | sed “s/\”//g”
snmpwalk.exe -O v -v 1 -c %2 %1 “1.3.6.1.2.1.25.6.3.1.2″ | sed “s/STRING: /INSTALLED:/” | sed “s/\”//g”
snmpwalk.exe -O v -v 1 -c %2 %1 “.1.3.6.1.2.1.4.20″ | grep “IpAddress” | sed “s/IpAddress: /IP:/” | sed “s/\”//g”
snmpwalk.exe -v 1 -c %2 %1 “.1.3.6.1.2.1.4.21″ | grep “NextHop” | sed “s/.*NextHop./ROUTE:/” | sed “s/= IpAddress:/via/”


Dieser Artikel wurde ausgedruckt ab Sleeping Sheep Hackers…: http://sleepingsheephackers.org

URL zum Artikel: http://sleepingsheephackers.org/2009/10/09/small-snmp-kung-fu/

URLs in this post:
[1] http://www.elifulkerson.com/articles/net-snmp-windows-binary-unofficial.php: http://www.elifulkerson.com/articles/net-snmp-windows-binary-unofficial.php
[2] http://unxutils.sourceforge.net/: http://unxutils.sourceforge.net/

Klicken hier zum Drucken.