sharkit 0.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.
- sharkit-0.1.0/.gitignore +28 -0
- sharkit-0.1.0/LICENSE +21 -0
- sharkit-0.1.0/PKG-INFO +68 -0
- sharkit-0.1.0/README.md +40 -0
- sharkit-0.1.0/pyproject.toml +94 -0
- sharkit-0.1.0/src/sharkit/__init__.py +2 -0
- sharkit-0.1.0/src/sharkit/__main__.py +5 -0
- sharkit-0.1.0/src/sharkit/app.py +80 -0
- sharkit-0.1.0/src/sharkit/commands/__init__.py +10 -0
- sharkit-0.1.0/src/sharkit/commands/base.py +43 -0
- sharkit-0.1.0/src/sharkit/commands/builtins.py +493 -0
- sharkit-0.1.0/src/sharkit/commands/registry.py +32 -0
- sharkit-0.1.0/src/sharkit/config/__init__.py +0 -0
- sharkit-0.1.0/src/sharkit/config/manager.py +77 -0
- sharkit-0.1.0/src/sharkit/config/paths.py +34 -0
- sharkit-0.1.0/src/sharkit/console/__init__.py +3 -0
- sharkit-0.1.0/src/sharkit/console/completion.py +41 -0
- sharkit-0.1.0/src/sharkit/console/prompt.py +25 -0
- sharkit-0.1.0/src/sharkit/console/repl.py +181 -0
- sharkit-0.1.0/src/sharkit/exceptions.py +54 -0
- sharkit-0.1.0/src/sharkit/history/__init__.py +0 -0
- sharkit-0.1.0/src/sharkit/history/manager.py +83 -0
- sharkit-0.1.0/src/sharkit/modules/__init__.py +13 -0
- sharkit-0.1.0/src/sharkit/modules/base.py +55 -0
- sharkit-0.1.0/src/sharkit/modules/loader.py +58 -0
- sharkit-0.1.0/src/sharkit/modules/registry.py +61 -0
- sharkit-0.1.0/src/sharkit/modules/testing/__init__.py +0 -0
- sharkit-0.1.0/src/sharkit/modules/testing/demo/__init__.py +0 -0
- sharkit-0.1.0/src/sharkit/modules/testing/demo/echo.py +92 -0
- sharkit-0.1.0/src/sharkit/modules/testing/http/__init__.py +0 -0
- sharkit-0.1.0/src/sharkit/modules/testing/http/metadata.py +83 -0
- sharkit-0.1.0/src/sharkit/network/__init__.py +3 -0
- sharkit-0.1.0/src/sharkit/network/client.py +81 -0
- sharkit-0.1.0/src/sharkit/output/__init__.py +3 -0
- sharkit-0.1.0/src/sharkit/output/renderer.py +249 -0
- sharkit-0.1.0/src/sharkit/output/theme.py +9 -0
sharkit-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.omo
|
|
2
|
+
|
|
3
|
+
__pycache__/
|
|
4
|
+
*.py[cod]
|
|
5
|
+
*$py.class
|
|
6
|
+
*.egg-info/
|
|
7
|
+
dist/
|
|
8
|
+
build/
|
|
9
|
+
.eggs/
|
|
10
|
+
*.egg
|
|
11
|
+
|
|
12
|
+
.venv/
|
|
13
|
+
venv/
|
|
14
|
+
env/
|
|
15
|
+
|
|
16
|
+
.vscode/
|
|
17
|
+
.idea/
|
|
18
|
+
*.swp
|
|
19
|
+
*.swo
|
|
20
|
+
|
|
21
|
+
.pytest_cache/
|
|
22
|
+
.coverage
|
|
23
|
+
htmlcov/
|
|
24
|
+
|
|
25
|
+
.mypy_cache/
|
|
26
|
+
.ruff_cache/
|
|
27
|
+
|
|
28
|
+
*.pcap
|
sharkit-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sharkit Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
sharkit-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: sharkit
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: OSINT / HUMINT / GEOINT research framework
|
|
5
|
+
Project-URL: Homepage, https://github.com/sshtmp/sharkit
|
|
6
|
+
Project-URL: Repository, https://github.com/sshtmp/sharkit
|
|
7
|
+
Project-URL: Issues, https://github.com/sshtmp/sharkit/issues
|
|
8
|
+
Author: Sharkit Contributors
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: cli,framework,geoint,humint,osint,research
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Information Technology
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Security
|
|
23
|
+
Classifier: Topic :: Utilities
|
|
24
|
+
Requires-Python: >=3.11
|
|
25
|
+
Requires-Dist: httpx<1.0.0,>=0.27.0
|
|
26
|
+
Requires-Dist: prompt-toolkit<4.0.0,>=3.0.0
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
# Sharkit
|
|
30
|
+
|
|
31
|
+
OSINT / HUMINT / GEOINT research framework
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
uv tool install sharkit
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Usage
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
sharkit
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Development
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
uv sync
|
|
49
|
+
uv run sharkit
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Testing
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
uv run pytest
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Privacy
|
|
59
|
+
|
|
60
|
+
Sharkit does not include telemetry, analytics, tracking, or background network requests. Network activity only happens as a result of explicit user action.
|
|
61
|
+
|
|
62
|
+
## Disclaimer
|
|
63
|
+
|
|
64
|
+
Sharkit is intended for lawful OSINT research, authorized security testing, education, and legitimate investigations. Users are responsible for complying with applicable laws, permissions, and terms of service. Sharkit does not guarantee anonymity.
|
|
65
|
+
|
|
66
|
+
## License
|
|
67
|
+
|
|
68
|
+
MIT
|
sharkit-0.1.0/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Sharkit
|
|
2
|
+
|
|
3
|
+
OSINT / HUMINT / GEOINT research framework
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
uv tool install sharkit
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
sharkit
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Development
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
uv sync
|
|
21
|
+
uv run sharkit
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Testing
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
uv run pytest
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Privacy
|
|
31
|
+
|
|
32
|
+
Sharkit does not include telemetry, analytics, tracking, or background network requests. Network activity only happens as a result of explicit user action.
|
|
33
|
+
|
|
34
|
+
## Disclaimer
|
|
35
|
+
|
|
36
|
+
Sharkit is intended for lawful OSINT research, authorized security testing, education, and legitimate investigations. Users are responsible for complying with applicable laws, permissions, and terms of service. Sharkit does not guarantee anonymity.
|
|
37
|
+
|
|
38
|
+
## License
|
|
39
|
+
|
|
40
|
+
MIT
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "sharkit"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "OSINT / HUMINT / GEOINT research framework"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
requires-python = ">=3.11"
|
|
8
|
+
authors = [
|
|
9
|
+
{ name = "Sharkit Contributors" },
|
|
10
|
+
]
|
|
11
|
+
keywords = ["osint", "humint", "geoint", "research", "cli", "framework"]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 3 - Alpha",
|
|
14
|
+
"Environment :: Console",
|
|
15
|
+
"Intended Audience :: Developers",
|
|
16
|
+
"Intended Audience :: Information Technology",
|
|
17
|
+
"License :: OSI Approved :: MIT License",
|
|
18
|
+
"Operating System :: POSIX :: Linux",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3.11",
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
22
|
+
"Programming Language :: Python :: 3.13",
|
|
23
|
+
"Topic :: Security",
|
|
24
|
+
"Topic :: Utilities",
|
|
25
|
+
]
|
|
26
|
+
dependencies = [
|
|
27
|
+
"prompt_toolkit>=3.0.0,<4.0.0",
|
|
28
|
+
"httpx>=0.27.0,<1.0.0",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
[project.urls]
|
|
32
|
+
Homepage = "https://github.com/sshtmp/sharkit"
|
|
33
|
+
Repository = "https://github.com/sshtmp/sharkit"
|
|
34
|
+
Issues = "https://github.com/sshtmp/sharkit/issues"
|
|
35
|
+
|
|
36
|
+
[project.scripts]
|
|
37
|
+
sharkit = "sharkit.app:main"
|
|
38
|
+
|
|
39
|
+
[build-system]
|
|
40
|
+
requires = ["hatchling"]
|
|
41
|
+
build-backend = "hatchling.build"
|
|
42
|
+
|
|
43
|
+
[tool.hatch.build.targets.wheel]
|
|
44
|
+
packages = ["src/sharkit"]
|
|
45
|
+
|
|
46
|
+
[tool.hatch.build.targets.sdist]
|
|
47
|
+
include = [
|
|
48
|
+
"src/sharkit",
|
|
49
|
+
"README.md",
|
|
50
|
+
"LICENSE",
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
[dependency-groups]
|
|
54
|
+
dev = [
|
|
55
|
+
"pytest>=8.0.0,<9.0.0",
|
|
56
|
+
"pytest-asyncio>=1.0.0,<2.0.0",
|
|
57
|
+
"ruff>=0.6.0,<1.0.0",
|
|
58
|
+
"mypy>=1.11.0,<2.0.0",
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
[tool.ruff]
|
|
62
|
+
target-version = "py311"
|
|
63
|
+
line-length = 100
|
|
64
|
+
|
|
65
|
+
[tool.ruff.lint]
|
|
66
|
+
select = [
|
|
67
|
+
"E", # pycodestyle errors
|
|
68
|
+
"W", # pycodestyle warnings
|
|
69
|
+
"F", # pyflakes
|
|
70
|
+
"I", # isort
|
|
71
|
+
"N", # pep8-naming
|
|
72
|
+
"UP", # pyupgrade
|
|
73
|
+
"B", # flake8-bugbear
|
|
74
|
+
"SIM", # flake8-simplify
|
|
75
|
+
]
|
|
76
|
+
|
|
77
|
+
[tool.ruff.lint.isort]
|
|
78
|
+
known-first-party = ["sharkit"]
|
|
79
|
+
|
|
80
|
+
[tool.mypy]
|
|
81
|
+
python_version = "3.11"
|
|
82
|
+
strict = true
|
|
83
|
+
warn_return_any = true
|
|
84
|
+
warn_unused_configs = true
|
|
85
|
+
disallow_untyped_defs = true
|
|
86
|
+
disallow_incomplete_defs = true
|
|
87
|
+
check_untyped_defs = true
|
|
88
|
+
no_implicit_optional = true
|
|
89
|
+
warn_redundant_casts = true
|
|
90
|
+
warn_unused_ignores = true
|
|
91
|
+
|
|
92
|
+
[tool.pytest.ini_options]
|
|
93
|
+
testpaths = ["tests"]
|
|
94
|
+
pythonpath = ["src"]
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import sys
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
|
|
6
|
+
from sharkit.commands.builtins import BUILTIN_COMMANDS
|
|
7
|
+
from sharkit.commands.registry import CommandRegistry
|
|
8
|
+
from sharkit.config.manager import ConfigManager
|
|
9
|
+
from sharkit.console.repl import Console
|
|
10
|
+
from sharkit.exceptions import SharkitError
|
|
11
|
+
from sharkit.history.manager import HistoryManager
|
|
12
|
+
from sharkit.modules.loader import discover_modules
|
|
13
|
+
from sharkit.modules.registry import ModuleRegistry
|
|
14
|
+
from sharkit.network.client import HttpClient
|
|
15
|
+
from sharkit.output.renderer import Renderer
|
|
16
|
+
|
|
17
|
+
NON_LINUX_MESSAGE = (
|
|
18
|
+
"sharkit is a shark.\n"
|
|
19
|
+
"it was built for open water,\n"
|
|
20
|
+
"where it can actually swim.\n"
|
|
21
|
+
"\n"
|
|
22
|
+
"windows/mac is more of a glass aquarium.\n"
|
|
23
|
+
"tidy, bright, and a little too enclosed.\n"
|
|
24
|
+
"\n"
|
|
25
|
+
"the shark doesn't dislike the aquarium.\n"
|
|
26
|
+
"it just wasn't shaped for it,\n"
|
|
27
|
+
"and it shows.\n"
|
|
28
|
+
"\n"
|
|
29
|
+
"find us in linux.\n"
|
|
30
|
+
"mrrp :3"
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def main() -> int:
|
|
35
|
+
sys.stdout.write("\033[2J\033[3J\033[H")
|
|
36
|
+
sys.stdout.flush()
|
|
37
|
+
renderer = Renderer()
|
|
38
|
+
|
|
39
|
+
if sys.platform != "linux":
|
|
40
|
+
renderer.banner(module_count=0, message=NON_LINUX_MESSAGE)
|
|
41
|
+
return 1
|
|
42
|
+
|
|
43
|
+
config_manager = ConfigManager()
|
|
44
|
+
|
|
45
|
+
history_manager = HistoryManager()
|
|
46
|
+
|
|
47
|
+
module_registry = ModuleRegistry()
|
|
48
|
+
modules_dir = Path(__file__).parent / "modules"
|
|
49
|
+
discovered = discover_modules(modules_dir)
|
|
50
|
+
for module_class, module_path in discovered:
|
|
51
|
+
module_registry.register_module(module_class, module_path)
|
|
52
|
+
|
|
53
|
+
command_registry = CommandRegistry()
|
|
54
|
+
for command_class in BUILTIN_COMMANDS:
|
|
55
|
+
command_registry.register_command(command_class)
|
|
56
|
+
|
|
57
|
+
http_client = HttpClient()
|
|
58
|
+
|
|
59
|
+
renderer.banner(module_count=len(discovered))
|
|
60
|
+
print()
|
|
61
|
+
|
|
62
|
+
console = Console(
|
|
63
|
+
command_registry=command_registry,
|
|
64
|
+
module_registry=module_registry,
|
|
65
|
+
config_manager=config_manager,
|
|
66
|
+
history_manager=history_manager,
|
|
67
|
+
renderer=renderer,
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
try:
|
|
71
|
+
console.run()
|
|
72
|
+
except KeyboardInterrupt:
|
|
73
|
+
print()
|
|
74
|
+
except SharkitError as exc:
|
|
75
|
+
renderer.error(str(exc))
|
|
76
|
+
return 1
|
|
77
|
+
finally:
|
|
78
|
+
http_client.close()
|
|
79
|
+
|
|
80
|
+
return 0
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from sharkit.commands.base import Command, CommandContext
|
|
2
|
+
from sharkit.commands.builtins import BUILTIN_COMMANDS
|
|
3
|
+
from sharkit.commands.registry import CommandRegistry
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
"Command",
|
|
7
|
+
"CommandContext",
|
|
8
|
+
"CommandRegistry",
|
|
9
|
+
"BUILTIN_COMMANDS",
|
|
10
|
+
]
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from abc import ABC, abstractmethod
|
|
4
|
+
from dataclasses import dataclass, field
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@dataclass
|
|
9
|
+
class CommandContext:
|
|
10
|
+
session: dict[str, Any] = field(default_factory=dict)
|
|
11
|
+
modules: list[Any] = field(default_factory=list)
|
|
12
|
+
current_module: str | None = None
|
|
13
|
+
output: Any = None
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Command(ABC):
|
|
17
|
+
name: str
|
|
18
|
+
aliases: list[str] = []
|
|
19
|
+
description: str = ""
|
|
20
|
+
usage: str = ""
|
|
21
|
+
options: list[tuple[str, str]] = []
|
|
22
|
+
notes: str = ""
|
|
23
|
+
|
|
24
|
+
@abstractmethod
|
|
25
|
+
def execute(self, context: CommandContext, args: list[str]) -> str | None: ...
|
|
26
|
+
|
|
27
|
+
def validate_args(self, args: list[str]) -> tuple[bool, str | None]:
|
|
28
|
+
return True, None
|
|
29
|
+
|
|
30
|
+
def format_help(self) -> str:
|
|
31
|
+
usage = self.usage or self.name
|
|
32
|
+
lines = [f"Usage: {usage}", "", self.description]
|
|
33
|
+
if self.notes:
|
|
34
|
+
lines.append("")
|
|
35
|
+
lines.append(self.notes)
|
|
36
|
+
if self.options:
|
|
37
|
+
lines.append("")
|
|
38
|
+
lines.append("OPTIONS:")
|
|
39
|
+
lines.append("")
|
|
40
|
+
max_flag = max((len(f) for f, _ in self.options), default=0)
|
|
41
|
+
for flag, desc in self.options:
|
|
42
|
+
lines.append(f" {flag:<{max_flag}} {desc}")
|
|
43
|
+
return "\n".join(lines)
|