Title
#core
theopolis

theopolis

12/28/2020, 3:59 PM
https://justine.lol/cosmopolitan/index.html this blew my mind this morning 😄
zwass

zwass

12/28/2020, 4:17 PM
Looks very interesting! Presumably this wouldn't just work directly with osquery due to a ton of code being gated by compile time flags?
theopolis

theopolis

12/28/2020, 7:23 PM
It definitely won’t work
terracatta

terracatta

12/28/2020, 7:53 PM
One thing they don't cover here is compilation time. I wonder if there is a big difference compared to a normal C executable.
7:57 PM
oh wow the hack they use to make this work is actually hilarious
7:58 PM
it all hinges on the fact the original Thompson Shell was written before shebangs were used. So you they can format the first bytes as a windows PE with MZ
theopolis

theopolis

12/28/2020, 9:02 PM
It reminded me of https://www.muppetlabs.com/~breadbox/software/tiny/teensy.html (really funny if you are into these things)
s

seph

12/30/2020, 3:37 AM
That sort of shebang stuff comes up a lot in the polyglot hackery corners.