OXIESEC PANEL
- Current Dir:
/
/
opt
/
gsutil
/
third_party
/
pyasn1-modules
/
tools
Server IP: 2a02:4780:11:1594:0:ef5:22d7:a
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
12/11/2024 09:39:44 AM
rwxr-xr-x
📄
cmcdump.py
1.73 KB
03/03/2018 11:03:26 PM
rw-r--r--
📄
cmpdump.py
926 bytes
03/03/2018 11:03:26 PM
rw-r--r--
📄
crldump.py
1.05 KB
03/03/2018 11:03:26 PM
rw-r--r--
📄
crmfdump.py
795 bytes
03/03/2018 11:03:26 PM
rw-r--r--
📄
ocspclient.py
5.26 KB
03/03/2018 11:03:26 PM
rw-r--r--
📄
ocspreqdump.py
807 bytes
03/03/2018 11:03:26 PM
rw-r--r--
📄
ocsprspdump.py
804 bytes
03/03/2018 11:03:26 PM
rw-r--r--
📄
pkcs10dump.py
1.13 KB
03/03/2018 11:03:26 PM
rw-r--r--
📄
pkcs1dump.py
1.36 KB
03/03/2018 11:03:26 PM
rw-r--r--
📄
pkcs7dump.py
1.47 KB
03/03/2018 11:03:26 PM
rw-r--r--
📄
pkcs8dump.py
1.28 KB
03/03/2018 11:03:26 PM
rw-r--r--
📄
snmpget.py
1.41 KB
03/03/2018 11:03:26 PM
rw-r--r--
📄
x509dump-rfc5280.py
1.19 KB
03/03/2018 11:03:26 PM
rw-r--r--
📄
x509dump.py
1.11 KB
03/03/2018 11:03:26 PM
rw-r--r--
Editing: snmpget.py
Close
#!/usr/bin/env python # # This file is part of pyasn1-modules software. # # Copyright (c) 2005-2017, Ilya Etingof <etingof@gmail.com> # License: http://pyasn1.sf.net/license.html # # Generate SNMPGET request, parse response # import socket import sys from pyasn1.codec.ber import decoder from pyasn1.codec.ber import encoder from pyasn1_modules import rfc1157 if len(sys.argv) != 4: print("""Usage: $ %s <community> <host> <OID>""" % sys.argv[0]) sys.exit(-1) msg = rfc1157.Message() msg.setComponentByPosition(0) msg.setComponentByPosition(1, sys.argv[1]) # pdu pdus = msg.setComponentByPosition(2).getComponentByPosition(2) pdu = pdus.setComponentByPosition(0).getComponentByPosition(0) pdu.setComponentByPosition(0, 123) pdu.setComponentByPosition(1, 0) pdu.setComponentByPosition(2, 0) vbl = pdu.setComponentByPosition(3).getComponentByPosition(3) vb = vbl.setComponentByPosition(0).getComponentByPosition(0) vb.setComponentByPosition(0, sys.argv[3]) v = vb.setComponentByPosition(1).getComponentByPosition(1).setComponentByPosition(0).getComponentByPosition(0).setComponentByPosition(3).getComponentByPosition(3) print('sending: %s' % msg.prettyPrint()) sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.sendto(encoder.encode(msg), (sys.argv[2], 161)) substrate, _ = sock.recvfrom(2048) # noinspection PyRedeclaration rMsg, _ = decoder.decode(substrate, asn1Spec=msg) print('received: %s' % rMsg.prettyPrint())