Created
November 15, 2014 05:19
-
-
Save themson/7931b3261f3f338cb4d1 to your computer and use it in GitHub Desktop.
readvar_Mode_6_AMP_test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from scapy.all import * | |
import logging | |
import sys | |
logging.getLogger("scapy.runtime").setLevel(logging.ERROR) | |
dest_ip = sys.argv[1] | |
ntp6_readvar = (IP(dst=dest_ip)/UDP(dport=123)/Raw(load='\x16\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')) | |
print("\nNTP readvar_Mode_6 Packet Built") | |
print("** Sending {} Bytes **\n".format(len(ntp6_readvar))) | |
response = sr1(ntp6_readvar) | |
print("\n** Recieved {} Byte Reply from: {} **".format(len(response), dest_ip)) | |
if response.load: | |
print("\nRead Variables from: {}\n".format(dest_ip)) | |
for var in response.load.split(','): | |
print("{}".format(var)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment