Skip to content

Instantly share code, notes, and snippets.

@strayge
Created October 14, 2017 18:56
Show Gist options
  • Save strayge/46ffd0db386e1d4f6cfb241e85600ffc to your computer and use it in GitHub Desktop.
Save strayge/46ffd0db386e1d4f6cfb241e85600ffc to your computer and use it in GitHub Desktop.
diffmks = 0.1 * 10**6
for i in range(20):
p=sniff(count=1, lfilter=lambda x: x.haslayer(ICMP));
r=IP(dst=p[0][IP].src)/ICMP(type="echo-reply", code=p[0][ICMP].code, id=p[0][ICMP].id, seq=p[0][ICMP].seq)/p[0].load;
sec, mks = unpack('QQ', r.load[0:16]);
mks += diffmks;
load = pack('QQ', sec, mks) + r.load[16:];
r.load = load;
send(r, loop=0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment