updated config logic to read from one file

This commit is contained in:
venus
2026-04-14 03:36:14 -05:00
parent 3007d07d62
commit be093ed3b3
4 changed files with 37 additions and 16 deletions

View File

@@ -3,11 +3,31 @@
import argparse
from ctf.utils import state
state.testVal = 123
state.testVal2 = 123
def setArguments():
parser = argparse.ArgumentParser( #type:ignore
prog="ctf",
description="A collection of cli tools to improve your ctf workflow",
epilog="")
parser.add_argument('action') # positional argument, action to be taken
parser.add_argument('-c', '--count') # option that takes a value
parser.add_argument('-v', '--verbose', action='store_true') # on/off flag
args = parser.parse_args()
return args
def main():
print("Hello from ctf!")
print(f"Stored: {state.testVal}")
state.info = "me"
# Parse arguments
# Current Ctf
# Current Challenge
# Validate args
# Call library functiions
# Set Ctf
args = setArguments()
if args.action == set:
print(f"setting ctf to{args.ctf}")
if __name__ == "__main__":