Frage

I want to send hex data as GET request like somesite.com/page.php?test=hex_string. The data is generated data in hardware and then a GET request is send to a php file.

But when I have 0x00 (NULL) character in the request, it fails with 400 bad request message.

Is there a way I could send NUL character in GET request?

War es hilfreich?

Lösung

Yes. /?hexdecimal_nullbyte=%00

It fails because web server on the other side prevents null-byte attacks. So, the web server says you it's a 400 bad request, don't do this :)

Andere Tipps

I have the same problem before. The only solution I found is to convert those null bytes as a decimal before page.php reads it, then in that page.php I convert it back to byte before sending it to the hardware.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top