Skip to content

Instantly share code, notes, and snippets.

@boogy
Created January 18, 2015 18:57
Show Gist options
  • Select an option

  • Save boogy/4b89efd0db7af207382f to your computer and use it in GitHub Desktop.

Select an option

Save boogy/4b89efd0db7af207382f to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from scapy.all import *
r = rdpcap("cloudfs.pcap")
l = len(r)
print l
D = []
for i in range(0, l):
if ICMP in r[i]:
print 'OK'
print r[i][ICMP].summary()
if r[i][ICMP].type == 8 : # ICMP request
d = str(r[i][Raw]).encode('hex')
if d not in D:
D.append(d)
f = open('flag.bin', 'w')
f.write(''.join(D))
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment