Skip to content

Instantly share code, notes, and snippets.

View cji's full-sized avatar

Craig Ingram cji

View GitHub Profile
@cji
cji / pwn.py
Created June 23, 2017 15:50 — forked from saelo/pwn.py
Solution for "assignment" of GoogleCTF 2017
#!/usr/bin/env python3
#
# Exploit for "assignment" of GoogleCTF 2017
#
# CTF-quality exploit...
#
# Slightly simplified and shortened explanation:
#
# The bug is a UAF of one or both values during add_assign() if a GC is
# triggered during allocate_value(). The exploit first abuses this to leak a
@cji
cji / gist:3722035
Created September 14, 2012 13:51 — forked from rbarrois/gist:3721801
Well behaving HTTP transport for suds
from suds.transport.http import HttpTransport as SudsHttpTransport
class WellBehavedHttpTransport(SudsHttpTransport):
"""HttpTransport which properly obeys the ``*_proxy`` environment variables."""
def u2handlers(self):
"""Return a list of specific handlers to add.
The urllib2 logic regarding ``build_opener(*handlers)`` is: