diff --git a/README.md b/README.md index fa91613..c44bb42 100644 --- a/README.md +++ b/README.md @@ -27,3 +27,9 @@ Creates prompt for AI to generate a write up showing your process # Misc the end goal is to create a methodology solid enough to build out a full AI tool chain around it while allowing tight human integration + + +## features +- Cyberchef like decoding and magic feature +- regexing input text for flag + - flag selection and filtering with remembered prev. flags diff --git a/src/ctf/commands.py b/src/ctf/commands.py index c6718de..1460ac2 100644 --- a/src/ctf/commands.py +++ b/src/ctf/commands.py @@ -1,7 +1,5 @@ # functions for commands needed # src/commands.py -import os -from ctf.utils import state from pathlib import path def test(): diff --git a/src/ctf/forensics.py b/src/ctf/forensics.py new file mode 100644 index 0000000..c6b7626 --- /dev/null +++ b/src/ctf/forensics.py @@ -0,0 +1,2 @@ +# src/forensics.py +# Library for forensic analysis diff --git a/src/ctf/main.py b/src/ctf/main.py index 6e394da..6446630 100644 --- a/src/ctf/main.py +++ b/src/ctf/main.py @@ -2,6 +2,7 @@ # Parses and calls commands import argparse +from os import setregid from pathlib import Path from ctf.utils import * @@ -19,7 +20,8 @@ def set_arguments(): def main(): - print("running main") + args = set_arguments() + print(args) diff --git a/src/ctf/utils.py b/src/ctf/utils.py index 620859f..40e7822 100644 --- a/src/ctf/utils.py +++ b/src/ctf/utils.py @@ -1,20 +1,20 @@ # src/ctf/utils.py # basic utilities -import tomllib -import json import toml from pathlib import Path from platformdirs import user_config_dir -# Parse config file +# Parse the config file, returning a config dictionary with relevant config options +# Load the config from file and parse with TOML def load_config(config = f"{user_config_dir()}/ctf-config.toml") -> dict: p = Path(config) if p.exists(): return toml.load(p) return{} +# Write a dictionary to the config file def write_config(data: dict, config = f"{user_config_dir()}/ctf"): with open(config, "w") as f: toml.dump(data, f) @@ -39,11 +39,7 @@ def active_competitions(dir: str) -> dict: print(comps[item]) return comps -# Class for a competition, defining active catagories, challenges completed, etc -class competition(): - def __init__(self, p: Path): - pass - +# Load variables to export config = load_config("/home/venus/code/ctf/config.toml") competition = config["Competition"] enviroment = config["Enviroment"]