From 23d1c5f47529d3284c9d7cc61ee29c484bfa5841 Mon Sep 17 00:00:00 2001 From: "Z. Cliffe Schreuders" Date: Tue, 7 Oct 2025 11:23:25 +0100 Subject: [PATCH] Fix command syntax in scanning lab documentation - Corrected command syntax for sending messages and checking port connectivity in the scanning lab, ensuring accurate execution of examples. - Updated formatting for consistency and clarity in code snippets throughout the document. --- _labs/introducing_attacks/5_scanning.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_labs/introducing_attacks/5_scanning.md b/_labs/introducing_attacks/5_scanning.md index b418260..1ddd65c 100644 --- a/_labs/introducing_attacks/5_scanning.md +++ b/_labs/introducing_attacks/5_scanning.md @@ -278,7 +278,7 @@ nc -lvp 4444 Leave that running, and from another terminal (hint: press Ctl-Shift-T), ==action: send a message using the cat command:== ```bash -cat \>/dev/tcp/localhost/4444 +cat > /dev/tcp/localhost/4444 ``` Type in a message, and check the other tab to see that it was sent through. Ctl-D to end (only press it once or you may close your terminal window). @@ -294,7 +294,7 @@ echo $? ==action: If you try to connect to a port that is not open:== ```bash -echo \>/dev/tcp/localhost/7777 +echo > /dev/tcp/localhost/7777 ``` The $? will report failure: @@ -333,7 +333,7 @@ echo `date` >> $ip_address.open_ports for port in {1..65535} do # use a short timeout, and write to the port on the IP address - timeout 1 echo >/dev/tcp/$ip_address/$port + timeout 1 echo > /dev/tcp/$ip_address/$port # if that succeeded (checks the return value stored in $?) if [ $? -eq 0 ] then