Skip to content

Commit

Permalink
updated the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolasfil committed Dec 17, 2024
1 parent ddb5694 commit f8bdf29
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 43 deletions.
7 changes: 4 additions & 3 deletions app/ctfsolver.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: ctfsolver
Version: 0.0.7
Version: 0.0.8
Summary: An all in one library for solving CTF challenges
Home-page: https://github.com/nikolasfil/CTFSolverScript
Author: Nikolas Filippatos
Expand All @@ -11,10 +11,11 @@ Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: setuptools>=67.7.0
Requires-Dist: build>=0.7.0
Requires-Dist: wheel>=0.37.0
Requires-Dist: pwntools>=4.0.0
Requires-Dist: scapy>=2.0.0
Requires-Dist: setuptools>=67.7.0
Requires-Dist: wheel>=0.37.0
Provides-Extra: dev
Requires-Dist: pytest>=6.2.4; extra == "dev"
Requires-Dist: twine>=3.4.2; extra == "dev"
Expand Down
5 changes: 3 additions & 2 deletions app/ctfsolver.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
setuptools>=67.7.0
build>=0.7.0
wheel>=0.37.0
pwntools>=4.0.0
scapy>=2.0.0
setuptools>=67.7.0
wheel>=0.37.0

[dev]
pytest>=6.2.4
Expand Down
27 changes: 25 additions & 2 deletions build/lib/ctfsolver/src/manager_connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,34 @@ def connect(self, *args, **kwargs) -> None:
Connects to the challenge based on the connection type.
If the connection type is remote, it connects to the url and port provided.
If the connection type is local, it starts a process with the file provided.
local:
kwargs :
argv: Any | None = None,
shell: bool = False,
executable: Any | None = None,
cwd: Any | None = None,
env: Any | None = None,
ignore_environ: Any | None = None,
stdin: int = PIPE,
stdout: PTY | int = PTY if not IS_WINDOWS else PIPE,
stderr: int = STDOUT,
close_fds: bool = True,
preexec_fn: Any = lambda : None,
raw: bool = True,
aslr: Any | None = None,
setuid: Any | None = None,
where: str = 'local',
display: Any | None = None,
alarm: Any | None = None,
creationflags: int = 0
"""
if self.conn_type == "remote" and self.url and self.port:
self.conn = pwn.remote(self.url, self.port)
self.conn = self.pwn.remote(self.url, self.port)
elif self.conn_type == "local" and self.file:
self.conn = pwn.process(str(self.challenge_file))
self.conn = self.pwn.process(str(self.challenge_file), **kwargs)

def recv_menu(self, number=1, display=False, save=False):
"""
Expand Down
17 changes: 14 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
## Pdoc
## Documentation

Autodocumentation with pdoc
### Module ctfsolver documentation :

pdoc ctfsolver --html -o ./docs/pdoc_html/
[ctfsolver](https://nikolasfil.github.io/CTFSolverScript/ctfsolver/)

Uses modules :

- pwntools
- scapy

### Module ctfsolver bash commands

find_usage: Finds the python files where ctfsolver is used
folders: Creates the folders (data, files, payloads)
run: Runs the python file payloads/solution.py if it exists
templ: Creates a python payloads/solution.py template for usage
2 changes: 1 addition & 1 deletion docs/TODO.md → docs/TODO/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

## Publish in pip ?

## Autoamted solver
## Automated solver

- ~Automate the sphynx api documentation ( perhaps a git precommit )~

Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions docs/pdoc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Pdoc

Autodocumentation with pdoc

pdoc ctfsolver --html -o ./docs/pdoc_html/

32 changes: 0 additions & 32 deletions docs/usage/current.md

This file was deleted.

0 comments on commit f8bdf29

Please sign in to comment.