Skip to content

Commit 5978ad3

Browse files
committed
Merge branch 'development'
2 parents 6a546db + 52aa66d commit 5978ad3

42 files changed

Lines changed: 1721 additions & 10 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/static.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Deploy static content to Pages
44
on:
55
# Runs on pushes targeting the default branch
66
push:
7-
branches: ["documentation"]
7+
branches: ["main"]
88

99
# Allows you to run this workflow manually from the Actions tab
1010
workflow_dispatch:
@@ -36,7 +36,7 @@ jobs:
3636
- name: Upload artifact
3737
uses: actions/upload-pages-artifact@v3
3838
with:
39-
path: docs/sphinx/build/html
39+
path: "./docs/ctfsolver"
4040
- name: Deploy to GitHub Pages
4141
id: deployment
4242
uses: actions/deploy-pages@v4

README.md

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,34 @@
1-
How to install the project
1+
# CTFSolverScript
22

3-
```bash
4-
python setup.py bdist_wheel sdist
5-
```
3+
CTFSolverScript is a tool designed to assist in solving Capture The Flag (CTF) challenges. It provides utilities and scripts to streamline the process of solving various types of CTF problems.
4+
5+
## Features
66

7-
For local installation use:
7+
- **Automated Scripts**: Pre-built scripts for common CTF tasks.
8+
- **Modular Design**: Easily extendable to add custom scripts.
9+
- **Cross-Platform**: Works on Linux, macOS, and Windows.
10+
- **Lightweight**: Minimal dependencies for quick setup.
11+
12+
## Installation
13+
14+
[official pypi link](https://pypi.org/project/ctfsolver)
815

916
```bash
10-
pip install .
17+
pip install ctfsolver
1118
```
19+
20+
## Usage
21+
22+
Either as a class or as a command-line tool.
23+
More documentation on the way.
24+
For now the documentation is autogenerated from docstrings using pdoc3
25+
26+
[ctfsolver](https://nikolasfil.github.io/CTFSolverScript/ctfsolver/)
27+
28+
## License
29+
30+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
31+
32+
## Contact
33+
34+
Feel free to open a ticket on the [GitHub Issues page](https://github.com/nikolasfil/CTFSolverScript/issues) for any questions or suggestions.

app/ctfsolver.egg-info/PKG-INFO

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Requires-Dist: setuptools>=67.7.0
1919
Requires-Dist: wheel>=0.37.0
2020
Requires-Dist: dash_cytoscape>=1.0.2
2121
Requires-Dist: dash>=3.2.0
22+
Requires-Dist: colorama>=0.4.6
2223
Provides-Extra: dev
2324
Requires-Dist: pytest>=6.2.4; extra == "dev"
2425
Requires-Dist: twine>=3.4.2; extra == "dev"
@@ -34,6 +35,7 @@ Requires-Dist: sphinx-basic-ng>=1.0.0.beta2; extra == "docs"
3435
Requires-Dist: sphinx-rtd-theme>=3.0.2; extra == "docs"
3536
Requires-Dist: python-call-graph>=2.1.4; extra == "docs"
3637
Requires-Dist: sphinx-autoapi>=3.0.0; extra == "docs"
38+
Requires-Dist: pdoc3>=0.11.6; extra == "docs"
3739
Provides-Extra: docs-live
3840
Requires-Dist: sphinx-autobuild>=2024.9.3; extra == "docs-live"
3941
Dynamic: license-file

app/ctfsolver.egg-info/requires.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ setuptools>=67.7.0
66
wheel>=0.37.0
77
dash_cytoscape>=1.0.2
88
dash>=3.2.0
9+
colorama>=0.4.6
910

1011
[dev]
1112
pytest>=6.2.4
@@ -23,6 +24,7 @@ sphinx-basic-ng>=1.0.0.beta2
2324
sphinx-rtd-theme>=3.0.2
2425
python-call-graph>=2.1.4
2526
sphinx-autoapi>=3.0.0
27+
pdoc3>=0.11.6
2628

2729
[docs-live]
2830
sphinx-autobuild>=2024.9.3
9.32 KB
Binary file not shown.

dist/ctfsolver-0.0.13.tar.gz

8.1 KB
Binary file not shown.

docs/pdoc/html/ctfsolver/forensics/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<main>
3434
<article id="content">
3535
<header>
36-
<h1 class="title">Namespace <code>ctfsolver.forensics</code></h1>
36+
<h1 class="title">Module <code>ctfsolver.forensics</code></h1>
3737
</header>
3838
<section id="section-intro">
3939
</section>

docs/pdoc/html/ctfsolver/src/data/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<main>
3434
<article id="content">
3535
<header>
36-
<h1 class="title">Namespace <code>ctfsolver.src.data</code></h1>
36+
<h1 class="title">Module <code>ctfsolver.src.data</code></h1>
3737
</header>
3838
<section id="section-intro">
3939
</section>
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
Module ctfsolver.config.global_config
2+
=====================================
3+
Global configuration management for the CTFSolverScript package.
4+
5+
This module provides the `GlobalConfig` class, which handles the creation, initialization,
6+
and access of a global configuration file stored in the user's home directory. The configuration
7+
file is used to store persistent settings required by the CTFSolverScript inline tool.
8+
9+
Classes:
10+
GlobalConfig: Manages the global configuration file, including creation, initialization,
11+
reading, and attribute/dictionary-style access to configuration values.
12+
13+
Attributes:
14+
CONFIG (GlobalConfig): Singleton instance of the GlobalConfig class for global access.
15+
16+
Example:
17+
>>> from ctfsolver.config.global_config import CONFIG
18+
>>> from ctfsolver.config import CONFIG
19+
>>> CONFIG.initializing() # Initializes the global configuration
20+
21+
Typical usage involves initializing the configuration (creating the file and writing initial
22+
content if necessary) and accessing configuration values via attribute or dictionary-style access.
23+
24+
Raises:
25+
AttributeError: If an attribute is accessed that does not exist in the configuration.
26+
KeyError: If a key is accessed that does not exist in the configuration.
27+
28+
Classes
29+
-------
30+
31+
`GlobalConfig(*args, **kwargs)`
32+
: Initializes the global configuration for the CTF solver application.
33+
This constructor sets the path to the global configuration file and loads its content.
34+
35+
Attributes:
36+
global_config_file_path (Path): Path to the global configuration JSON file.
37+
38+
Raises:
39+
Any exceptions raised by `get_content()` will propagate.
40+
41+
### Methods
42+
43+
`creating(self)`
44+
: Creates a global configuration file in the user's home directory.
45+
46+
This method ensures that the required directories and configuration file exist,
47+
creating them if necessary. It is typically called during the initial run of the
48+
inline tool or when global configuration setup is required.
49+
50+
Args:
51+
None
52+
53+
Returns:
54+
None
55+
56+
Raises:
57+
OSError: If the directory or file cannot be created due to permission issues.
58+
59+
`get_content(self)`
60+
: Get the content of the global configuration file.
61+
This method reads the global configuration file and returns its content
62+
as a dictionary.
63+
If the file does not exist or is empty, it returns an empty dictionary.
64+
It is intended to be used to retrieve the current global configuration
65+
settings for use in the inline tool or other parts of the application.
66+
67+
68+
Returns:
69+
dict: The content of the global configuration file as a dictionary.
70+
71+
`initial_content(self)`
72+
: Sets the initial content of the global configuration file.
73+
74+
This method loads a configuration template from 'config_template.json' and writes it to the global
75+
configuration file if the file is empty or does not exist. If the template file is missing, a default
76+
initial content is used instead.
77+
78+
Args:
79+
None
80+
81+
Returns:
82+
None
83+
84+
Raises:
85+
FileNotFoundError: If the template file or global configuration file path does not exist.
86+
json.JSONDecodeError: If the template file contains invalid JSON.
87+
88+
Side Effects:
89+
Writes initial configuration content to the global configuration file if it is empty.
90+
Prints status messages to the console.
91+
92+
`initializing(self)`
93+
: Initialize global configuration settings.
94+
This method can be used to set up any necessary global configurations
95+
required by the inline tool.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Module ctfsolver.config
2+
=======================
3+
4+
Sub-modules
5+
-----------
6+
* ctfsolver.config.global_config

0 commit comments

Comments
 (0)