diff options
author | Christina Quast <chrysh.ng+git@gmail.com> | 2015-05-12 16:02:48 +0200 |
---|---|---|
committer | Christina Quast <chrysh.ng+git@gmail.com> | 2015-05-12 16:03:23 +0200 |
commit | b89469184140ab44895fb43b519f70e42343d033 (patch) | |
tree | 2b465243275dc6da05968b164810a0b212de1531 | |
parent | 96025dbb696b5ae70e17bb1fa285ebf4edf60161 (diff) |
gsmtap.py: send example msg using scapy
The GSM message appears in wireshark when sniffing on localhost
-rw-r--r-- | usb_application/gsmtap.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/usb_application/gsmtap.py b/usb_application/gsmtap.py new file mode 100644 index 0000000..e10faf2 --- /dev/null +++ b/usb_application/gsmtap.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +from scapy.all import IP, UDP, sr1 + +ip="127.0.0.1" +port=4729 +sp=58621 +data=("\x02\x04\x04"+"\x00"*13+"\x9f\x16\xa0\xc0\x00\x00\x16", "\x9f\x16\xa0\xc0\x00\x00\x16") + +p=IP(dst=ip, src=ip)/UDP(sport=sp, dport=port)/data[0] + +if p: + p.show() + +ans = sr1(p, timeout=2) +if ans: + print(a) |