file-run2

Published: July 20, 2023Updated: December 9, 2025

Description

Another simple binary: it expects one argument (`Hello!`). Provide it on the command line to print the flag.

Make the binary executable (`chmod +x run`).

Execute it with the required argument: `./run Hello!`.

chmod +x run
./run Hello!
./run Hello! | cut -d ' ' -f4

Solution

  1. Step 1Read the prompt carefully
    The description literally tells you to pass `Hello!`. Without the argument the program just prompts you again.
  2. Step 2Capture the flag
    Use `cut` to isolate the fourth space-delimited field for a clean flag string.

Flag

picoCTF{F1r57_4rgum3n7_be07...}

Introductory warm-up for command-line arguments.