blob: e10faf290009fd08e7fad9ae18dbb8097025354f [file] [log] [blame]
Christina Quastb8946912015-05-12 16:02:48 +02001#!/usr/bin/env python
2
3from scapy.all import IP, UDP, sr1
4
5ip="127.0.0.1"
6port=4729
7sp=58621
8data=("\x02\x04\x04"+"\x00"*13+"\x9f\x16\xa0\xc0\x00\x00\x16", "\x9f\x16\xa0\xc0\x00\x00\x16")
9
10p=IP(dst=ip, src=ip)/UDP(sport=sp, dport=port)/data[0]
11
12if p:
13 p.show()
14
15ans = sr1(p, timeout=2)
16if ans:
17 print(a)