pwnlib.flag
— CTF Flag Management
- pwnlib.flag.submit_flag(flag, exploit='unnamed-exploit', target='unknown-target', server='flag-submission-server', port='31337', team='unknown-team')[source]
Submits a flag to the game server
- Parameters
Optional arguments are inferred from the environment, or omitted if none is set.
- Returns
A string indicating the status of the key submission, or an error code.
Doctest:
>>> l = listen() >>> _ = submit_flag('flag', server='localhost', port=l.lport) >>> c = l.wait_for_connection() >>> c.recvall().split() [b'flag', b'unnamed-exploit', b'unknown-target', b'unknown-team']