updated config logic to read from one file
This commit is contained in:
@@ -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__":
|
||||
|
||||
Reference in New Issue
Block a user