qol changes

This commit is contained in:
venus
2026-07-13 21:11:27 -05:00
parent fbda1dd079
commit 4b16a69b1a
5 changed files with 15 additions and 11 deletions

View File

@@ -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

View File

@@ -1,7 +1,5 @@
# functions for commands needed
# src/commands.py
import os
from ctf.utils import state
from pathlib import path
def test():

2
src/ctf/forensics.py Normal file
View File

@@ -0,0 +1,2 @@
# src/forensics.py
# Library for forensic analysis

View File

@@ -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)

View File

@@ -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"]