https://github.com/osquery/osquery logo
Title
t

theopolis

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

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?
t

theopolis

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

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.
oh wow the hack they use to make this work is actually hilarious
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
:mind_blown: 1
t

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.