cswl / tsu

Gain root shell on Termux.
ISC License
646 stars 155 forks source link

CRLF: Binary Data Corruption #78

Open alemariusnexus opened 3 years ago

alemariusnexus commented 3 years ago

I was testing the sudo provided by tsu (latest master), when I noticed that it seems to corrupt certain kinds of binary data.

Running the following:

$ sudo echo -ne "\n" | hexdump

I get this output:

0000000 0a0d 0000002

Only a single byte (LF, 0x0a) should be output, but it seems like tsu converts LF to CRLF, so there's an additional byte. This kind of conversion usually happens when data is read/written in text mode instead of binary mode, so maybe there's a wrong setting in the script somewhere?