pwnlib.flag
— CTF Flag Management¶
-
pwnlib.flag.
submit_flag
(flag, exploit='unnamed-exploit', target='unknown-target', server='flag-submission-server', port='31337', proto='tcp', 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() ['flag', 'unnamed-exploit', 'unknown-target', 'unknown-team']