Created
October 4, 2013 16:34
-
-
Save thepacketgeek/6828798 to your computer and use it in GitHub Desktop.
Clean up a scapy packet summary
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
def cleanPayload(p): | |
p = str(p) | |
# Clean up packet payload from scapy output | |
return p.split('Raw')[0].split("Padding")[0].replace('|','\n').strip('<')\ | |
.strip('bound method Ether.show of ').replace('>','').replace('[<','[')\ | |
.replace('\n<','<').replace('<','\n'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment