Skip to content

Commit 4f48f7a

Browse files
committed
chore: remove broken visual assets, fix mypy typing errors, and update README
1 parent 9a698b0 commit 4f48f7a

6 files changed

Lines changed: 51 additions & 57 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# Project Lethe
23

34
Project Lethe is a lightweight, dependency-free CLI for authorized WAF
@@ -44,6 +45,7 @@ python -m venv .venv
4445
source .venv/bin/activate
4546
pip install -e .
4647
```
48+
*(On Windows natively, use `.\.venv\Scripts\activate` instead)*
4749

4850
Confirm:
4951

@@ -357,6 +359,10 @@ Bad places to use Lethe:
357359

358360
See [SECURITY.md](SECURITY.md) for the full policy.
359361

362+
## Kali Linux Usage
363+
364+
For detailed instructions on using Lethe within Kali Linux, see [KALI_USAGE.md](KALI_USAGE.md).
365+
360366
## License
361367

362368
MIT. See [LICENSE](LICENSE).

assets/lethe-cli-preview.svg

Lines changed: 0 additions & 53 deletions
This file was deleted.

assets/lethe-goddess.png

12 MB
Loading

demo.tape

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Output assets/lethe-demo.gif
2+
3+
Set FontSize 14
4+
Set FontFamily "Fira Code"
5+
Set Width 1200
6+
Set Height 750
7+
Set TypingSpeed 45ms
8+
Set Margin 20
9+
Set BorderRadius 10
10+
Set Theme "TokyoNight"
11+
12+
# We hide the setup so the video starts directly at the Kali prompt
13+
Hide
14+
Type "zsh"
15+
Enter
16+
Sleep 1s
17+
Type "source .venv/bin/activate"
18+
Enter
19+
Type "clear"
20+
Enter
21+
Show
22+
23+
Sleep 1s
24+
# Explicitly using --banner to trigger the cinematic Lethe animation!
25+
Type "lethe generate --payload '<waf-test>' --profile xss --limit 5 --banner"
26+
Sleep 500ms
27+
Enter
28+
29+
# Give the animation time to fully cascade and render
30+
Sleep 8s
31+
32+
Type "clear"
33+
Enter
34+
Sleep 500ms
35+
36+
Type "lethe explain --payload '<waf-test>' --technique html_hex_entities"
37+
Sleep 500ms
38+
Enter
39+
40+
Sleep 6s

src/lethe/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ def handle_plan(args: argparse.Namespace, config: dict[str, object]) -> int:
742742

743743

744744
def handle_profile(args: argparse.Namespace, config: dict[str, object]) -> int:
745-
output_format = args.format or _config_value(config, "profile_format", "format", default="table")
745+
output_format = str(args.format or _config_value(config, "profile_format", "format", default="table"))
746746
timeout = args.timeout if args.timeout is not None else _config_float(
747747
config,
748748
"profile_timeout",
@@ -1147,7 +1147,7 @@ def _config_value(
11471147

11481148
def _config_int(config: dict[str, object], name: str, *, default: int) -> int:
11491149
value = config.get(name)
1150-
if value is None:
1150+
if not isinstance(value, (int, float, str)):
11511151
return default
11521152
try:
11531153
return int(value)
@@ -1162,7 +1162,7 @@ def _config_bool(config: dict[str, object], name: str, *, default: bool) -> bool
11621162

11631163
def _config_float(config: dict[str, object], name: str, *, default: float) -> float:
11641164
value = config.get(name)
1165-
if value is None:
1165+
if not isinstance(value, (int, float, str)):
11661166
return default
11671167
try:
11681168
return float(value)

src/lethe/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ def _strip_inline_comment(value: str) -> str:
117117

118118

119119
def _normalize_config(data: dict[str, Any]) -> dict[str, Any]:
120-
source = data.get("lethe") if isinstance(data.get("lethe"), dict) else data
120+
lethe_data = data.get("lethe")
121+
source: dict[str, Any] = lethe_data if isinstance(lethe_data, dict) else data
121122
result = {
122123
key: value
123124
for key, value in source.items()

0 commit comments

Comments
 (0)