Skip to content

Instantly share code, notes, and snippets.

@sklam
Last active July 24, 2018 15:59
Show Gist options
  • Select an option

  • Save sklam/9610bad4e589c2c3d33f656b9aac10e9 to your computer and use it in GitHub Desktop.

Select an option

Save sklam/9610bad4e589c2c3d33f656b9aac10e9 to your computer and use it in GitHub Desktop.
Ugly Python3.5: Hello World
[
type(cc)(
type(getattr(cc, next(iter(k for k in dir(cc) if k.startswith("__co")))))(
*[
*lead,
bytes(nums[:-1]),
(None, "Hello World"),
("print",),
(),
"",
"obf",
1,
bytes(nums[-1:]),
]
),
{"__builtins__": __builtins__},
)
for np in [__import__("numpy")]
for lead in [[0, 0, 0, 2, 67]]
for cc in (lambda: [116, 25600, 1, 387, 256, 100, 21248, 256],)
for nums in [np.asarray(cc(), dtype=np.uint16)]
][0]()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment