Closed C0deH4cker closed 3 weeks ago
Implemented in #31, which is now merged to dev
!
See this example: https://github.com/C0deH4cker/PwnableHarness/blob/dev/examples/GimmeArgs/Build.mk
examples/GimmeArgs (dev)$ nc localhost 32323
argv[0] = "/home/gimme-args/gimme-args"
argv[1] = "--foo"
argv[2] = "haha"
As discussed in #25, there's currently no easy way to pass custom arguments to the challenge binary when it is run to handle a new connection. This is normally not needed if a challenge is developed from scratch using PwnableHarness. However, I can see how it could be useful if the challenge binary is some existing program that the challenge author would like to make accessible over a socket connection.
A new
Build.mk
variable likeDOCKER_CHALLENGE_ARGS
could be added that gets passed ontopwnable_server
, likely after a--
sentinel. Then,pwnable_server
can pass along these arguments directly to the challenge binary when it gets executed on an incoming connection.