firegex 5.0.2__tar.gz → 5.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. firegex-5.1.0/PKG-INFO +47 -0
  2. firegex-5.1.0/README.md +27 -0
  3. {firegex-5.0.2 → firegex-5.1.0}/firegex/__init__.py +1 -1
  4. firegex-5.1.0/firegex.egg-info/PKG-INFO +47 -0
  5. {firegex-5.0.2 → firegex-5.1.0}/pyproject.toml +1 -1
  6. {firegex-5.0.2 → firegex-5.1.0}/setup.py +1 -1
  7. firegex-5.0.2/PKG-INFO +0 -69
  8. firegex-5.0.2/README.md +0 -49
  9. firegex-5.0.2/firegex.egg-info/PKG-INFO +0 -69
  10. {firegex-5.0.2 → firegex-5.1.0}/MANIFEST.in +0 -0
  11. {firegex-5.0.2 → firegex-5.1.0}/firegex/__main__.py +0 -0
  12. {firegex-5.0.2 → firegex-5.1.0}/firegex/cli.py +0 -0
  13. {firegex-5.0.2 → firegex-5.1.0}/firegex/pyfilters/__init__.py +0 -0
  14. {firegex-5.0.2 → firegex-5.1.0}/firegex/pyfilters/internals/__init__.py +0 -0
  15. {firegex-5.0.2 → firegex-5.1.0}/firegex/pyfilters/internals/data.py +0 -0
  16. {firegex-5.0.2 → firegex-5.1.0}/firegex/pyfilters/internals/exceptions.py +0 -0
  17. {firegex-5.0.2 → firegex-5.1.0}/firegex/pyfilters/internals/models.py +0 -0
  18. {firegex-5.0.2 → firegex-5.1.0}/firegex/pyfilters/internals/zstd_compat.py +0 -0
  19. {firegex-5.0.2 → firegex-5.1.0}/firegex/pyfilters/models/__init__.py +0 -0
  20. {firegex-5.0.2 → firegex-5.1.0}/firegex/pyfilters/models/http.py +0 -0
  21. {firegex-5.0.2 → firegex-5.1.0}/firegex/pyfilters/models/tcp.py +0 -0
  22. {firegex-5.0.2 → firegex-5.1.0}/firegex/pyfilters/proxysim/__init__.py +0 -0
  23. {firegex-5.0.2 → firegex-5.1.0}/firegex/regex/__init__.py +0 -0
  24. {firegex-5.0.2 → firegex-5.1.0}/firegex/regex/sim.py +0 -0
  25. {firegex-5.0.2 → firegex-5.1.0}/firegex.egg-info/SOURCES.txt +0 -0
  26. {firegex-5.0.2 → firegex-5.1.0}/firegex.egg-info/dependency_links.txt +0 -0
  27. {firegex-5.0.2 → firegex-5.1.0}/firegex.egg-info/entry_points.txt +0 -0
  28. {firegex-5.0.2 → firegex-5.1.0}/firegex.egg-info/requires.txt +0 -0
  29. {firegex-5.0.2 → firegex-5.1.0}/firegex.egg-info/top_level.txt +0 -0
  30. {firegex-5.0.2 → firegex-5.1.0}/llhttp/LICENSE.pyllhttp +0 -0
  31. {firegex-5.0.2 → firegex-5.1.0}/llhttp/PROVENANCE.md +0 -0
  32. {firegex-5.0.2 → firegex-5.1.0}/llhttp/lib/LICENSE.llhttp +0 -0
  33. {firegex-5.0.2 → firegex-5.1.0}/llhttp/lib/api.c +0 -0
  34. {firegex-5.0.2 → firegex-5.1.0}/llhttp/lib/http.c +0 -0
  35. {firegex-5.0.2 → firegex-5.1.0}/llhttp/lib/llhttp.c +0 -0
  36. {firegex-5.0.2 → firegex-5.1.0}/llhttp/lib/llhttp.h +0 -0
  37. {firegex-5.0.2 → firegex-5.1.0}/llhttp/llhttp_module.c +0 -0
  38. {firegex-5.0.2 → firegex-5.1.0}/setup.cfg +0 -0
firegex-5.1.0/PKG-INFO ADDED
@@ -0,0 +1,47 @@
1
+ Metadata-Version: 2.4
2
+ Name: firegex
3
+ Version: 5.1.0
4
+ Summary: Firegex client
5
+ Author-email: Pwnzer0tt1 <pwnzer0tt1@poliba.it>
6
+ Project-URL: Homepage, https://github.com/pwnzer0tt1/firegex
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
9
+ Requires-Python: >=3.10
10
+ Description-Content-Type: text/markdown
11
+ Requires-Dist: typer
12
+ Requires-Dist: rich
13
+ Requires-Dist: pydantic>=2
14
+ Requires-Dist: typing-extensions>=4.7.1
15
+ Requires-Dist: pycryptodome
16
+ Requires-Dist: watchfiles
17
+ Requires-Dist: websockets
18
+ Requires-Dist: brotli>=1.2.1
19
+ Requires-Dist: zstandard; python_version < "3.14"
20
+
21
+ # Firegex Python Library and CLI
22
+
23
+ The library for [Firegex](https://github.com/Pwnzer0tt1/firegex), a firewall for CTF
24
+ Attack-Defense competitions. It provides `firegex.pyfilters` (write [Python
25
+ filters](../docs/pyfilter.md)), `firegex.regex` (pattern rulesets), and the `fgex` CLI to
26
+ try both locally without a running Firegex.
27
+
28
+ ```bash
29
+ pip install -U firegex # `fgex` is an alias package
30
+ ```
31
+
32
+ ```bash
33
+ fgex pyfilters filter.py 127.0.0.1 8080 # run a Python filter in front of a service
34
+ fgex regex check rules.json # does the ruleset compile?
35
+ fgex regex test rules.json --sample req.txt # what would it do to this?
36
+ fgex regex proxy rules.json 10.60.3.1 8080 # a local proxy applying it
37
+ ```
38
+
39
+ Regex matching needs `libhs` (vectorscan) installed — the same engine Firegex uses; without
40
+ it the tools stop rather than guess.
41
+
42
+ - **[Python filters](../docs/pyfilter.md)** — the decorator, every model, settings, examples.
43
+ - **[Services](../docs/services.md)** — what a Firegex instance does with them.
44
+ - **[Firewall Rules](../docs/firewall.md)**
45
+
46
+ A Firegex instance is started from a clone with `python3 run.py`. In 5.0.0 `firegex.nfproxy`
47
+ became `firegex.pyfilters`.
@@ -0,0 +1,27 @@
1
+ # Firegex Python Library and CLI
2
+
3
+ The library for [Firegex](https://github.com/Pwnzer0tt1/firegex), a firewall for CTF
4
+ Attack-Defense competitions. It provides `firegex.pyfilters` (write [Python
5
+ filters](../docs/pyfilter.md)), `firegex.regex` (pattern rulesets), and the `fgex` CLI to
6
+ try both locally without a running Firegex.
7
+
8
+ ```bash
9
+ pip install -U firegex # `fgex` is an alias package
10
+ ```
11
+
12
+ ```bash
13
+ fgex pyfilters filter.py 127.0.0.1 8080 # run a Python filter in front of a service
14
+ fgex regex check rules.json # does the ruleset compile?
15
+ fgex regex test rules.json --sample req.txt # what would it do to this?
16
+ fgex regex proxy rules.json 10.60.3.1 8080 # a local proxy applying it
17
+ ```
18
+
19
+ Regex matching needs `libhs` (vectorscan) installed — the same engine Firegex uses; without
20
+ it the tools stop rather than guess.
21
+
22
+ - **[Python filters](../docs/pyfilter.md)** — the decorator, every model, settings, examples.
23
+ - **[Services](../docs/services.md)** — what a Firegex instance does with them.
24
+ - **[Firewall Rules](../docs/firewall.md)**
25
+
26
+ A Firegex instance is started from a clone with `python3 run.py`. In 5.0.0 `firegex.nfproxy`
27
+ became `firegex.pyfilters`.
@@ -1,6 +1,6 @@
1
1
 
2
2
  def _get_version():
3
- v = "5.0.2" if "{" not in "5.0.2" else "0.0.0"
3
+ v = "5.1.0" if "{" not in "5.1.0" else "0.0.0"
4
4
  if v == "0.0.0":
5
5
  import os
6
6
  env_v = os.getenv("FIREGEX_VERSION")
@@ -0,0 +1,47 @@
1
+ Metadata-Version: 2.4
2
+ Name: firegex
3
+ Version: 5.1.0
4
+ Summary: Firegex client
5
+ Author-email: Pwnzer0tt1 <pwnzer0tt1@poliba.it>
6
+ Project-URL: Homepage, https://github.com/pwnzer0tt1/firegex
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
9
+ Requires-Python: >=3.10
10
+ Description-Content-Type: text/markdown
11
+ Requires-Dist: typer
12
+ Requires-Dist: rich
13
+ Requires-Dist: pydantic>=2
14
+ Requires-Dist: typing-extensions>=4.7.1
15
+ Requires-Dist: pycryptodome
16
+ Requires-Dist: watchfiles
17
+ Requires-Dist: websockets
18
+ Requires-Dist: brotli>=1.2.1
19
+ Requires-Dist: zstandard; python_version < "3.14"
20
+
21
+ # Firegex Python Library and CLI
22
+
23
+ The library for [Firegex](https://github.com/Pwnzer0tt1/firegex), a firewall for CTF
24
+ Attack-Defense competitions. It provides `firegex.pyfilters` (write [Python
25
+ filters](../docs/pyfilter.md)), `firegex.regex` (pattern rulesets), and the `fgex` CLI to
26
+ try both locally without a running Firegex.
27
+
28
+ ```bash
29
+ pip install -U firegex # `fgex` is an alias package
30
+ ```
31
+
32
+ ```bash
33
+ fgex pyfilters filter.py 127.0.0.1 8080 # run a Python filter in front of a service
34
+ fgex regex check rules.json # does the ruleset compile?
35
+ fgex regex test rules.json --sample req.txt # what would it do to this?
36
+ fgex regex proxy rules.json 10.60.3.1 8080 # a local proxy applying it
37
+ ```
38
+
39
+ Regex matching needs `libhs` (vectorscan) installed — the same engine Firegex uses; without
40
+ it the tools stop rather than guess.
41
+
42
+ - **[Python filters](../docs/pyfilter.md)** — the decorator, every model, settings, examples.
43
+ - **[Services](../docs/services.md)** — what a Firegex instance does with them.
44
+ - **[Firewall Rules](../docs/firewall.md)**
45
+
46
+ A Firegex instance is started from a clone with `python3 run.py`. In 5.0.0 `firegex.nfproxy`
47
+ became `firegex.pyfilters`.
@@ -12,7 +12,7 @@ authors = [{ name = "Pwnzer0tt1", email = "pwnzer0tt1@poliba.it" }]
12
12
  requires-python = ">=3.10"
13
13
  classifiers = [
14
14
  "Programming Language :: Python :: 3",
15
- "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
15
+ "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
16
16
  ]
17
17
  dependencies = [
18
18
  "typer",
@@ -26,7 +26,7 @@ LLHTTP = setuptools.Extension(
26
26
  # Everything else about the package is in pyproject.toml. The version stays here because
27
27
  # the release workflow writes the tag over the placeholder, which is not a valid version
28
28
  # until it has.
29
- VERSION = "5.0.2"
29
+ VERSION = "5.1.0"
30
30
 
31
31
  setuptools.setup(
32
32
  version=VERSION if "{" not in VERSION else "0.0.0", #uv pip install -U . --no-cache-dir for testing
firegex-5.0.2/PKG-INFO DELETED
@@ -1,69 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: firegex
3
- Version: 5.0.2
4
- Summary: Firegex client
5
- Author-email: Pwnzer0tt1 <pwnzer0tt1@poliba.it>
6
- Project-URL: Homepage, https://github.com/pwnzer0tt1/firegex
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
9
- Requires-Python: >=3.10
10
- Description-Content-Type: text/markdown
11
- Requires-Dist: typer
12
- Requires-Dist: rich
13
- Requires-Dist: pydantic>=2
14
- Requires-Dist: typing-extensions>=4.7.1
15
- Requires-Dist: pycryptodome
16
- Requires-Dist: watchfiles
17
- Requires-Dist: websockets
18
- Requires-Dist: brotli>=1.2.1
19
- Requires-Dist: zstandard; python_version < "3.14"
20
-
21
- # Firegex Python Library and CLI
22
-
23
- This is the Python library for [Firegex](https://github.com/Pwnzer0tt1/firegex), a firewall built for CTF Attack-Defense competitions. It provides `firegex.pyfilters` — the package you write [Python filters](../docs/pyfilter.md) against — `firegex.regex` for pattern rulesets, the `fgex` CLI, and local simulators for both, so a filter can be tried before it ever reaches a running Firegex.
24
-
25
- ## Installation
26
-
27
- ```bash
28
- pip install -U firegex
29
- ```
30
-
31
- `fgex` is an alias package for `firegex`: installing either one gives you the same `firegex` module and the `fgex`/`firegex` CLI commands.
32
-
33
- ## Documentation
34
-
35
- It carries `firegex.regex`, which binds the same hyperscan firegex matches with, so
36
- a **pattern ruleset** can be checked and tried without a running instance:
37
-
38
- ```bash
39
- fgex regex check rules.json # does it compile? what is in it?
40
- fgex regex test rules.json --sample req.txt # what would it do to this?
41
- fgex regex proxy rules.json 10.60.3.1 8080 # a local proxy applying it
42
- ```
43
-
44
- The ruleset file is the same shape firegex uses. Matching needs `libhs` (vectorscan)
45
- installed; without it the tools say so and stop rather than answering with a different
46
- engine, because a tester that disagrees with production is worse than none.
47
-
48
- **➡️ [Writing and testing `@pyfilter` scripts](../docs/pyfilter.md)** — the `pyfilter` decorator, every data structure (`RawPacket`, `TCPInputStream`/`TCPOutputStream`, `HttpRequest`/`HttpResponse` and their variants, `HttpHistory`), packet statements, stream limits, the `fgex pyfilters` CLI simulator, and a full worked example.
49
-
50
- That page is also what's shown in the Firegex web UI itself (the docs button on the service pages) — both are generated from that single file, so they can never drift out of sync.
51
-
52
- ## The rest of Firegex
53
-
54
- This package is the part you write filters *with*. What runs them is a Firegex instance,
55
- started from a clone with `python3 run.py` — there is deliberately no deploy command here,
56
- because any second description of that script's arguments would drift from it.
57
-
58
- Two guides cover everything an instance does:
59
-
60
- - **[Services](../docs/services.md)** — a service is a **network layer** (NFQUEUE, the
61
- terminating proxy, or a hand-off to a proxy you wrote) plus an ordered chain of
62
- **filters** (hyperscan patterns, or the Python you write with this library). TLS, QUIC
63
- and every version of HTTP are protocols a service can speak rather than separate things
64
- to set up.
65
- - **[Firewall Rules](../docs/firewall.md)** — plain nftables allow/drop/reject rules.
66
-
67
- The modules this library used to list — `nfregex`, `nfproxy`, `porthijack` and `tls` —
68
- were folded into services as choices rather than modules in 5.0.0, which is also when
69
- `firegex.nfproxy` became `firegex.pyfilters`.
firegex-5.0.2/README.md DELETED
@@ -1,49 +0,0 @@
1
- # Firegex Python Library and CLI
2
-
3
- This is the Python library for [Firegex](https://github.com/Pwnzer0tt1/firegex), a firewall built for CTF Attack-Defense competitions. It provides `firegex.pyfilters` — the package you write [Python filters](../docs/pyfilter.md) against — `firegex.regex` for pattern rulesets, the `fgex` CLI, and local simulators for both, so a filter can be tried before it ever reaches a running Firegex.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- pip install -U firegex
9
- ```
10
-
11
- `fgex` is an alias package for `firegex`: installing either one gives you the same `firegex` module and the `fgex`/`firegex` CLI commands.
12
-
13
- ## Documentation
14
-
15
- It carries `firegex.regex`, which binds the same hyperscan firegex matches with, so
16
- a **pattern ruleset** can be checked and tried without a running instance:
17
-
18
- ```bash
19
- fgex regex check rules.json # does it compile? what is in it?
20
- fgex regex test rules.json --sample req.txt # what would it do to this?
21
- fgex regex proxy rules.json 10.60.3.1 8080 # a local proxy applying it
22
- ```
23
-
24
- The ruleset file is the same shape firegex uses. Matching needs `libhs` (vectorscan)
25
- installed; without it the tools say so and stop rather than answering with a different
26
- engine, because a tester that disagrees with production is worse than none.
27
-
28
- **➡️ [Writing and testing `@pyfilter` scripts](../docs/pyfilter.md)** — the `pyfilter` decorator, every data structure (`RawPacket`, `TCPInputStream`/`TCPOutputStream`, `HttpRequest`/`HttpResponse` and their variants, `HttpHistory`), packet statements, stream limits, the `fgex pyfilters` CLI simulator, and a full worked example.
29
-
30
- That page is also what's shown in the Firegex web UI itself (the docs button on the service pages) — both are generated from that single file, so they can never drift out of sync.
31
-
32
- ## The rest of Firegex
33
-
34
- This package is the part you write filters *with*. What runs them is a Firegex instance,
35
- started from a clone with `python3 run.py` — there is deliberately no deploy command here,
36
- because any second description of that script's arguments would drift from it.
37
-
38
- Two guides cover everything an instance does:
39
-
40
- - **[Services](../docs/services.md)** — a service is a **network layer** (NFQUEUE, the
41
- terminating proxy, or a hand-off to a proxy you wrote) plus an ordered chain of
42
- **filters** (hyperscan patterns, or the Python you write with this library). TLS, QUIC
43
- and every version of HTTP are protocols a service can speak rather than separate things
44
- to set up.
45
- - **[Firewall Rules](../docs/firewall.md)** — plain nftables allow/drop/reject rules.
46
-
47
- The modules this library used to list — `nfregex`, `nfproxy`, `porthijack` and `tls` —
48
- were folded into services as choices rather than modules in 5.0.0, which is also when
49
- `firegex.nfproxy` became `firegex.pyfilters`.
@@ -1,69 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: firegex
3
- Version: 5.0.2
4
- Summary: Firegex client
5
- Author-email: Pwnzer0tt1 <pwnzer0tt1@poliba.it>
6
- Project-URL: Homepage, https://github.com/pwnzer0tt1/firegex
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
9
- Requires-Python: >=3.10
10
- Description-Content-Type: text/markdown
11
- Requires-Dist: typer
12
- Requires-Dist: rich
13
- Requires-Dist: pydantic>=2
14
- Requires-Dist: typing-extensions>=4.7.1
15
- Requires-Dist: pycryptodome
16
- Requires-Dist: watchfiles
17
- Requires-Dist: websockets
18
- Requires-Dist: brotli>=1.2.1
19
- Requires-Dist: zstandard; python_version < "3.14"
20
-
21
- # Firegex Python Library and CLI
22
-
23
- This is the Python library for [Firegex](https://github.com/Pwnzer0tt1/firegex), a firewall built for CTF Attack-Defense competitions. It provides `firegex.pyfilters` — the package you write [Python filters](../docs/pyfilter.md) against — `firegex.regex` for pattern rulesets, the `fgex` CLI, and local simulators for both, so a filter can be tried before it ever reaches a running Firegex.
24
-
25
- ## Installation
26
-
27
- ```bash
28
- pip install -U firegex
29
- ```
30
-
31
- `fgex` is an alias package for `firegex`: installing either one gives you the same `firegex` module and the `fgex`/`firegex` CLI commands.
32
-
33
- ## Documentation
34
-
35
- It carries `firegex.regex`, which binds the same hyperscan firegex matches with, so
36
- a **pattern ruleset** can be checked and tried without a running instance:
37
-
38
- ```bash
39
- fgex regex check rules.json # does it compile? what is in it?
40
- fgex regex test rules.json --sample req.txt # what would it do to this?
41
- fgex regex proxy rules.json 10.60.3.1 8080 # a local proxy applying it
42
- ```
43
-
44
- The ruleset file is the same shape firegex uses. Matching needs `libhs` (vectorscan)
45
- installed; without it the tools say so and stop rather than answering with a different
46
- engine, because a tester that disagrees with production is worse than none.
47
-
48
- **➡️ [Writing and testing `@pyfilter` scripts](../docs/pyfilter.md)** — the `pyfilter` decorator, every data structure (`RawPacket`, `TCPInputStream`/`TCPOutputStream`, `HttpRequest`/`HttpResponse` and their variants, `HttpHistory`), packet statements, stream limits, the `fgex pyfilters` CLI simulator, and a full worked example.
49
-
50
- That page is also what's shown in the Firegex web UI itself (the docs button on the service pages) — both are generated from that single file, so they can never drift out of sync.
51
-
52
- ## The rest of Firegex
53
-
54
- This package is the part you write filters *with*. What runs them is a Firegex instance,
55
- started from a clone with `python3 run.py` — there is deliberately no deploy command here,
56
- because any second description of that script's arguments would drift from it.
57
-
58
- Two guides cover everything an instance does:
59
-
60
- - **[Services](../docs/services.md)** — a service is a **network layer** (NFQUEUE, the
61
- terminating proxy, or a hand-off to a proxy you wrote) plus an ordered chain of
62
- **filters** (hyperscan patterns, or the Python you write with this library). TLS, QUIC
63
- and every version of HTTP are protocols a service can speak rather than separate things
64
- to set up.
65
- - **[Firewall Rules](../docs/firewall.md)** — plain nftables allow/drop/reject rules.
66
-
67
- The modules this library used to list — `nfregex`, `nfproxy`, `porthijack` and `tls` —
68
- were folded into services as choices rather than modules in 5.0.0, which is also when
69
- `firegex.nfproxy` became `firegex.pyfilters`.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes