Skip to content

Commit 2ce7e42

Browse files
committed
working on the installation
1 parent 2bfa868 commit 2ce7e42

8 files changed

Lines changed: 54 additions & 91 deletions

File tree

app/ctfsolver.egg-info/PKG-INFO

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@ Classifier: Programming Language :: Python :: 3.11
1010
Classifier: Operating System :: OS Independent
1111
Requires-Python: >=3.11
1212
Description-Content-Type: text/markdown
13-
Provides-Extra: dev
1413
License-File: LICENSE
14+
Requires-Dist: setuptools>=67.7.0
15+
Provides-Extra: dev
16+
Requires-Dist: pytest>=6.2.4; extra == "dev"
17+
Requires-Dist: twine>=3.4.2; extra == "dev"
18+
Provides-Extra: docs
19+
Requires-Dist: pdoc3>=0.11.4; extra == "docs"
1520

1621
Python Solver
1722

app/ctfsolver.egg-info/SOURCES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
LICENSE
22
README.md
3+
pyproject.toml
34
setup.cfg
45
setup.py
56
app/ctfsolver/__init__.py
@@ -25,6 +26,7 @@ app/ctfsolver/src/ctfsolver.py
2526
app/ctfsolver/src/manager_connections.py
2627
app/ctfsolver/src/manager_crypto.py
2728
app/ctfsolver/src/manager_file.py
29+
app/ctfsolver/src/manager_files_evtx.py
2830
app/ctfsolver/src/manager_files_pcap.py
2931
app/ctfsolver/template/__init__.py
3032
app/ctfsolver/template/__main__.py
Lines changed: 4 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,8 @@
1-
Jinja2>=3.1.4
2-
Mako>=1.3.5
3-
MarkupSafe>=2.1.5
4-
PyNaCl>=1.5.0
5-
PySocks>=1.7.1
6-
Pygments>=2.18.0
7-
ROPGadget>=7.4
8-
alabaster>=1.0.0
9-
babel>=2.16.0
10-
bcrypt>=4.2.0
11-
capstone>=5.0.3
12-
certifi>=2024.8.30
13-
cffi>=1.17.1
14-
charset-normalizer>=3.3.2
15-
colored-traceback>=0.4.2
16-
configparser>=4.0.2
17-
cryptography>=43.0.1
18-
docutils>=0.21.2
19-
evtx>=0.8.6
20-
hexdump>=3.3
21-
idna>=3.10
22-
imagesize>=1.4.1
23-
intervaltree>=3.1.0
24-
more-itertools>=5.0.0
25-
packaging>=24.1
26-
paramiko>=3.5.0
27-
plumbum>=1.8.3
28-
psutil>=6.0.0
29-
pwntools>=4.13.0
30-
pycparser>=2.22
31-
pyelftools>=0.31
32-
pyparsing>=2.4.7
33-
pyserial>=3.5
34-
python-dateutil>=2.9.0.post0
35-
python-evtx>=0.7.4
36-
requests>=2.32.3
37-
rpyc>=6.0.0
38-
scapy>=2.6.0
39-
six>=1.16.0
40-
snowballstemmer>=2.2.0
41-
sortedcontainers>=2.4.0
42-
unicorn>=2.1.0
43-
unix-ar>=0.2.1
44-
urllib3>=2.2.3
45-
zipp>=1.0.0
46-
zstandard>=0.23.0
1+
setuptools>=67.7.0
472

483
[dev]
494
pytest>=6.2.4
505
twine>=3.4.2
6+
7+
[docs]
8+
pdoc3>=0.11.4

build/lib/ctfsolver/src/manager_crypto.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -45,33 +45,6 @@ def decode_base64(self, text):
4545
print(e)
4646
return None
4747

48-
def searching_text_in_packets(self, text, packets=None, display=False):
49-
"""
50-
Description:
51-
Search for a text in the packets that have been opened with scapy
52-
53-
Args:
54-
text (str): Text to search in the packets
55-
packets (list, optional): List of packets to search in. Defaults to None.
56-
display (bool, optional): Display the packet if the text is found. Defaults to False.
57-
58-
Returns:
59-
str: Text found in the packet if found
60-
"""
61-
62-
# Todo : Transfer into a different class that will be mainly for packet analysis
63-
if not packets:
64-
packets = self.packets
65-
66-
for i, packet in enumerate(packets):
67-
if packet.haslayer("Raw"):
68-
if text.encode() in packet["Raw"].load:
69-
if display:
70-
print(f"Found {text} in packet {i}")
71-
print(packet.show())
72-
print(packet.summary())
73-
return packet["Raw"].load.decode("utf-8")
74-
7548
def re_match_base64_string(self, text: str, strict=False) -> list[str]:
7649
"""
7750
Description:

build/lib/ctfsolver/src/manager_file.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from pathlib import Path
22
import inspect
3-
from scapy.all import rdpcap
43
import os
54
import ast
65
from .manager_files_pcap import ManagerFilePcap
@@ -167,18 +166,6 @@ def exec_on_files(self, folder, func, *args, **kwargs):
167166
if save:
168167
return output
169168

170-
def pcap_open(self, file=None):
171-
"""
172-
Description:
173-
Open the pcap file with scapy and saves it in self.packets
174-
"""
175-
# Todo : Transfer into a different class that will be mainly for packet analysis
176-
177-
if not file:
178-
file = self.challenge_file
179-
180-
self.packets = rdpcap(file.as_posix())
181-
182169
def search_files(
183170
self, directory, exclude_dirs, search_string, save=False, display=False
184171
):
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import Evtx.Evtx as evtx
2+
3+
4+
class ManagerFileEvtx:
5+
def __init__(self, *args, **kwargs):
6+
pass
7+
8+
def initializing_all_ancestors(self, *args, **kwargs):
9+
"""
10+
Description:
11+
Initializes all the ancestors of the class
12+
"""
13+
pass

build/lib/ctfsolver/src/manager_files_pcap.py

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
from pathlib import Path
2-
import inspect
31
from scapy.all import rdpcap
4-
import os
5-
import ast
62

73

84
class ManagerFilePcap:
@@ -33,3 +29,29 @@ def pcap_open(self, file=None, save=False):
3329

3430
if save:
3531
return self.packets
32+
33+
def searching_text_in_packets(self, text, packets=None, display=False):
34+
"""
35+
Description:
36+
Search for a text in the packets that have been opened with scapy
37+
38+
Args:
39+
text (str): Text to search in the packets
40+
packets (list, optional): List of packets to search in. Defaults to None.
41+
display (bool, optional): Display the packet if the text is found. Defaults to False.
42+
43+
Returns:
44+
str: Text found in the packet if found
45+
"""
46+
47+
if packets is None:
48+
packets = self.packets
49+
50+
for i, packet in enumerate(packets):
51+
if packet.haslayer("Raw"):
52+
if text.encode() in packet["Raw"].load:
53+
if display:
54+
print(f"Found {text} in packet {i}")
55+
print(packet.show())
56+
print(packet.summary())
57+
return packet["Raw"].load.decode("utf-8")

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools>=42", "wheel"]
3+
build-backend = "setuptools.build_meta"

0 commit comments

Comments
 (0)