Skip to content

Commit 1a8cfea

Browse files
authored
Update How.md
1 parent df9c808 commit 1a8cfea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

level04/resources/How.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ sub x {
1919
}
2020
x(param("x"));
2121
```
22-
**sub x** define a subroutine. In it, there's a variable **y** that takes the value of the first argument of the function. The back ticks mean for **print** that it has to execute the shell command `echo $y 2>&1` instead of print `echo $y 2>&1`. So we can conclude that **y** aka the first param will be executed. So the idea in this case is to pass `getflag` as argument to the **x** subroutine. To do so, we'll use that command:
22+
**sub x** defines a subroutine. In it, there's a variable **y** that takes the value of the first argument of the function. The back ticks mean for **print** that it has to execute the shell command `echo $y 2>&1` instead of print `echo $y 2>&1`. So we can conclude that **y** aka the first param will be executed. So the idea in this case is to pass `getflag` as argument to the **x** subroutine. To do so, we'll use that command:
2323

2424
`curl 'localhost:4747?x=$(getflag)'` gives us **`ne2searoevaevoem4ov4ar8ap`**
2525

0 commit comments

Comments
 (0)