WEB “ping-station”

LOBYI
Jan 19, 2024

--

Insert IP and I get the ping response.

But when I type “127.0.0.1", I got the wrong response.

Let’s see the code.

There’s a regex logic that prevents insert the usual ip address, such as 127.0.0.1, 255.255.255.255,….etc.

You can verify the logic by the link below.

And, I can use subprocess.check_output() to use command execution.

So, I inserted the ip address as “127.0.\.1; ls” and it worked.

At last, I inserted “127.0.\.1; cat flag” and got the flag.

--

--