Skip to content

Instantly share code, notes, and snippets.

@racterub
Created August 1, 2019 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save racterub/455e5acea401a06384f6d078ca3fac5e to your computer and use it in GitHub Desktop.
Save racterub/455e5acea401a06384f6d078ca3fac5e to your computer and use it in GitHub Desktop.
def parseParam():
parser = ArgumentParser()
parser.add_argument("-d", "--dir", help="Path to challenges", default="chal/", dest="path")
parser.add_argument("-p", "--port", help="Pwn challenges' starting port (Default => 6000)", type=int, default=6000, dest="port")
parser.add_argument("-i", "--img", help="Docker base image for your pwn challenges (Default => ubuntu:18.04) or do just do <img>:<tag>", default="ubuntu:18.04", dest="image")
parser.add_argument("-t", "--timeout", help="Set timeout limit", default=0, dest="time")
parser.add_argument("-g", "--gen-conf", help="Generate docker-compose.yml", action="store_true", dest="gen_conf")
parser.add_argument("-e", "--ex-libc", help="Export libc from container", action="store_true", dest="ex_libc")
args = parser.parse_args()
return args
if __name__ == "__main__":
arg = parseParam()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment