otlite 1.0.0__py3-none-any.whl

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 (55) hide show
  1. otlite/__init__.py +1 -0
  2. otlite/__main__.py +4 -0
  3. otlite/banner.py +110 -0
  4. otlite/cli.py +2929 -0
  5. otlite/compat.py +49 -0
  6. otlite/config.py +139 -0
  7. otlite/crash_reports.py +246 -0
  8. otlite/data/examples/aliens-eye.txt +40 -0
  9. otlite/data/examples/auto-archiver.txt +3 -0
  10. otlite/data/examples/blackbird.txt +3 -0
  11. otlite/data/examples/dnstwist.txt +20 -0
  12. otlite/data/examples/edgar-tool.txt +4 -0
  13. otlite/data/examples/h8mail.txt +20 -0
  14. otlite/data/examples/holehe.txt +52 -0
  15. otlite/data/examples/instagram-location-search.txt +3 -0
  16. otlite/data/examples/maigret.txt +74 -0
  17. otlite/data/examples/neutrosint.txt +17 -0
  18. otlite/data/examples/sherlock.txt +60 -0
  19. otlite/data/examples/spiderfoot.txt +63 -0
  20. otlite/data/examples/telegram-phone-number-checker.txt +4 -0
  21. otlite/data/examples/telepathy.txt +4 -0
  22. otlite/data/examples/thebigbrother.txt +17 -0
  23. otlite/data/examples/theharvester.txt +62 -0
  24. otlite/data/examples/torbot.txt +13 -0
  25. otlite/data/examples/user-scanner.txt +113 -0
  26. otlite/data/examples/zen.txt +11 -0
  27. otlite/data/playbooks/domain-recon.yaml +6 -0
  28. otlite/data/playbooks/username-investigation.yaml +6 -0
  29. otlite/data/registry.yaml +1782 -0
  30. otlite/data/tlds.txt +1437 -0
  31. otlite/denylist.py +80 -0
  32. otlite/detect.py +283 -0
  33. otlite/diff.py +76 -0
  34. otlite/examples.py +1 -0
  35. otlite/extract.py +122 -0
  36. otlite/installer/__init__.py +19 -0
  37. otlite/installer/browsers.py +38 -0
  38. otlite/installer/core.py +260 -0
  39. otlite/installer/git_install.py +100 -0
  40. otlite/installer/pip_install.py +47 -0
  41. otlite/installer/process.py +135 -0
  42. otlite/installer/venv.py +45 -0
  43. otlite/keys.py +58 -0
  44. otlite/notice.py +54 -0
  45. otlite/registry.py +540 -0
  46. otlite/results.py +110 -0
  47. otlite/runner.py +415 -0
  48. otlite/state.py +263 -0
  49. otlite/updater.py +1 -0
  50. otlite-1.0.0.dist-info/METADATA +515 -0
  51. otlite-1.0.0.dist-info/RECORD +55 -0
  52. otlite-1.0.0.dist-info/WHEEL +4 -0
  53. otlite-1.0.0.dist-info/entry_points.txt +2 -0
  54. otlite-1.0.0.dist-info/licenses/LICENSE +176 -0
  55. otlite-1.0.0.dist-info/licenses/NOTICE +15 -0
otlite/__init__.py ADDED
@@ -0,0 +1 @@
1
+ __version__ = "1.0.0"
otlite/__main__.py ADDED
@@ -0,0 +1,4 @@
1
+ from otlite.cli import run_cli
2
+
3
+ if __name__ == "__main__":
4
+ run_cli()
otlite/banner.py ADDED
@@ -0,0 +1,110 @@
1
+ """Startup banner shown by init, about and a bare invocation."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import os
6
+ import sys
7
+
8
+ from rich.align import Align
9
+ from rich.console import Console, Group
10
+ from rich.panel import Panel
11
+ from rich.text import Text
12
+
13
+ from otlite import __version__
14
+ from otlite.config import env_value
15
+
16
+ WIDE_ART = r"""
17
+ ██████╗ ████████╗██╗ ██╗████████╗███████╗
18
+ ██╔═══██╗╚══██╔══╝██║ ██║╚══██╔══╝██╔════╝
19
+ ██║ ██║ ██║ ██║ ██║ ██║ █████╗
20
+ ██║ ██║ ██║ ██║ ██║ ██║ ██╔══╝
21
+ ╚██████╔╝ ██║ ███████╗██║ ██║ ███████╗
22
+ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ ╚══════╝
23
+ """.strip("\n")
24
+
25
+ NARROW_ART = r"""
26
+ __ ___ __
27
+ ____/ /_/ (_) /____
28
+ / __ \/ __/ / / __/ _ \
29
+ / /_/ / /_/ / / /_/ __/
30
+ \____/\__/_/_/\__/\___/
31
+ """.strip("\n")
32
+
33
+ # Top-to-bottom gradient, one color per art row.
34
+ GRADIENT = ["#00e5ff", "#00b8ff", "#4d8bff", "#8a5cff", "#c03cff", "#ff2bd6"]
35
+
36
+ TAGLINE = "Install, run, update and remove open-source tools by name"
37
+ CREDITS = [
38
+ ("Sushant Koul", "https://www.linkedin.com/in/sushantkoul07"),
39
+ ("Dheeraj Yadav", "https://x.com/dheerajydv19"),
40
+ ]
41
+ ORG = ("OSINTverse", "https://osintverse.com/")
42
+
43
+ WIDE_MIN_COLUMNS = len(WIDE_ART.splitlines()[0]) + 4
44
+ NARROW_MIN_COLUMNS = max(len(line) for line in NARROW_ART.splitlines()) + 4
45
+
46
+
47
+ def banner_enabled(json_output: bool = False) -> bool:
48
+ """The banner is for people at a terminal, never for pipes, scripts or --json."""
49
+ if json_output or env_value("NO_BANNER"):
50
+ return False
51
+ return sys.stdout.isatty()
52
+
53
+
54
+ def pick_art(columns: int) -> str | None:
55
+ if columns >= WIDE_MIN_COLUMNS:
56
+ return WIDE_ART
57
+ if columns >= NARROW_MIN_COLUMNS:
58
+ return NARROW_ART
59
+ return None
60
+
61
+
62
+ def _gradient_art(art: str, color: bool) -> Text:
63
+ text = Text()
64
+ lines = art.splitlines()
65
+ for i, line in enumerate(lines):
66
+ # Spread the palette evenly whatever the number of rows.
67
+ shade = GRADIENT[round(i * (len(GRADIENT) - 1) / max(len(lines) - 1, 1))]
68
+ text.append(line + "\n", style=f"bold {shade}" if color else "")
69
+ text.rstrip()
70
+ return text
71
+
72
+
73
+ def _info_line(color: bool) -> Text:
74
+ return Text(TAGLINE, style="italic" if color else "", justify="center")
75
+
76
+
77
+ def _credits_line(color: bool) -> Text:
78
+ line = Text(justify="center")
79
+ line.append(f"v{__version__}", style="bold #00e5ff" if color else "")
80
+ line.append(" · ", style="dim" if color else "")
81
+ for name, url in CREDITS:
82
+ line.append(name, style=f"bold link {url}" if color else "")
83
+ line.append(" · ", style="dim" if color else "")
84
+ line.append(ORG[0], style=f"bold #ff2bd6 link {ORG[1]}" if color else "")
85
+ return line
86
+
87
+
88
+ def render_banner(console: Console, *, color: bool = True) -> None:
89
+ """Print the banner, choosing an art size that fits the terminal."""
90
+ color = color and not os.environ.get("NO_COLOR") and console.color_system is not None
91
+ art = pick_art(console.width)
92
+
93
+ parts: list = []
94
+ if art:
95
+ parts.append(Align.center(_gradient_art(art, color)))
96
+ parts.append(Text(""))
97
+ else:
98
+ parts.append(Text("otlite", style="bold" if color else "", justify="center"))
99
+ parts.append(_info_line(color))
100
+ parts.append(_credits_line(color))
101
+
102
+ console.print()
103
+ console.print(
104
+ Panel(
105
+ Group(*parts),
106
+ border_style="#8a5cff" if color else "",
107
+ padding=(1, 2),
108
+ expand=art is not WIDE_ART,
109
+ )
110
+ )