Skip to content

add shToElf handler#567

Open
neko782 wants to merge 2 commits intop2r3:masterfrom
neko782:elf
Open

add shToElf handler#567
neko782 wants to merge 2 commits intop2r3:masterfrom
neko782:elf

Conversation

@neko782
Copy link
Contributor

@neko782 neko782 commented Mar 20, 2026

a pretty crude method but works and im proud of it

@ConnorTippets
Copy link
Contributor

the xkcd reference is Krazy

@neko782
Copy link
Contributor Author

neko782 commented Mar 21, 2026

a number had to be chosen (with a very secure rng) :p

Comment on lines +8 to +9
// https://xkcd.com/221
int cmd_size = 1273991571;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there really no reason behind this number? Could this at least be a product of powers of two or something? Or really just some clean-ish number, or something chosen through some reason, rather than literally random?

I propose 1073741824 (or 1024^3), it's exactly 1 GiB and close to this value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there really no reason behind this number? Could this at least be a product of powers of two or something? Or really just some clean-ish number, or something chosen through some reason, rather than literally random?

the number is patched out by the js code with the real cmd size (important that its exact! we need to seek to the place in the binary where the shell script is located), i had to pick a number that i know wouldnt appear in the binary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants