sharkit 0.1.2__tar.gz → 0.2.0.dev1__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.2 → sharkit-0.2.0.dev1}/PKG-INFO +3 -3
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/README.md +2 -2
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/pyproject.toml +1 -1
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/src/sharkit/__init__.py +1 -1
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/src/sharkit/app.py +13 -10
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/src/sharkit/commands/base.py +2 -2
- sharkit-0.2.0.dev1/src/sharkit/commands/builtins.py +775 -0
- sharkit-0.2.0.dev1/src/sharkit/config/__init__.py +17 -0
- sharkit-0.2.0.dev1/src/sharkit/console/completion.py +61 -0
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/src/sharkit/console/prompt.py +5 -5
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/src/sharkit/console/repl.py +22 -18
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/src/sharkit/exceptions.py +12 -12
- sharkit-0.2.0.dev1/src/sharkit/history/__init__.py +3 -0
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/src/sharkit/output/renderer.py +14 -4
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/src/sharkit/output/theme.py +9 -0
- sharkit-0.2.0.dev1/src/sharkit/tools/__init__.py +23 -0
- {sharkit-0.1.2/src/sharkit/modules → sharkit-0.2.0.dev1/src/sharkit/tools}/base.py +35 -5
- sharkit-0.2.0.dev1/src/sharkit/tools/blackbird.py +198 -0
- sharkit-0.2.0.dev1/src/sharkit/tools/loader.py +58 -0
- sharkit-0.2.0.dev1/src/sharkit/tools/manager.py +99 -0
- sharkit-0.2.0.dev1/src/sharkit/tools/registry.py +73 -0
- sharkit-0.1.2/src/sharkit/commands/builtins.py +0 -522
- sharkit-0.1.2/src/sharkit/config/__init__.py +0 -0
- sharkit-0.1.2/src/sharkit/console/completion.py +0 -41
- sharkit-0.1.2/src/sharkit/history/__init__.py +0 -0
- sharkit-0.1.2/src/sharkit/modules/__init__.py +0 -13
- sharkit-0.1.2/src/sharkit/modules/loader.py +0 -58
- sharkit-0.1.2/src/sharkit/modules/registry.py +0 -73
- sharkit-0.1.2/src/sharkit/modules/testing/__init__.py +0 -0
- sharkit-0.1.2/src/sharkit/modules/testing/demo/__init__.py +0 -0
- sharkit-0.1.2/src/sharkit/modules/testing/demo/echo.py +0 -92
- sharkit-0.1.2/src/sharkit/modules/testing/http/__init__.py +0 -0
- sharkit-0.1.2/src/sharkit/modules/testing/http/metadata.py +0 -83
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/.gitignore +0 -0
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/LICENSE +0 -0
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/src/sharkit/__main__.py +0 -0
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/src/sharkit/commands/__init__.py +0 -0
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/src/sharkit/commands/registry.py +0 -0
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/src/sharkit/config/manager.py +0 -0
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/src/sharkit/config/paths.py +0 -0
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/src/sharkit/console/__init__.py +0 -0
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/src/sharkit/history/manager.py +0 -0
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/src/sharkit/network/__init__.py +0 -0
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/src/sharkit/network/client.py +0 -0
- {sharkit-0.1.2 → sharkit-0.2.0.dev1}/src/sharkit/output/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: sharkit
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0.dev1
|
|
4
4
|
Summary: OSINT / HUMINT / GEOINT research framework
|
|
5
5
|
Project-URL: Homepage, https://github.com/sshsrv/sharkit
|
|
6
6
|
Project-URL: Repository, https://github.com/sshsrv/sharkit
|
|
@@ -45,9 +45,9 @@ Description-Content-Type: text/markdown
|
|
|
45
45
|
|
|
46
46
|
### Features
|
|
47
47
|
- A terminal framework for OSINT / HUMINT / GEOINT work.
|
|
48
|
-
-
|
|
48
|
+
- Tools expose a `run` method, options, and metadata; the shell loads them as you need them.
|
|
49
49
|
- 15 built-in commands: `use`, `run`, `set`, `search`, `history`, `clear`, `exit`, and a few more.
|
|
50
|
-
-
|
|
50
|
+
- Tools are discovered automatically from `src/sharkit/tools/`.
|
|
51
51
|
- `sharkit --version` shows the exact build you have, dev pre-releases included.
|
|
52
52
|
- State lives in `~/.config/sharkit` and runs fine on Termux / Android.
|
|
53
53
|
- To wipe it completely: `uv tool uninstall sharkit` and `rm -rf ~/.config/sharkit`.
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
|
|
18
18
|
### Features
|
|
19
19
|
- A terminal framework for OSINT / HUMINT / GEOINT work.
|
|
20
|
-
-
|
|
20
|
+
- Tools expose a `run` method, options, and metadata; the shell loads them as you need them.
|
|
21
21
|
- 15 built-in commands: `use`, `run`, `set`, `search`, `history`, `clear`, `exit`, and a few more.
|
|
22
|
-
-
|
|
22
|
+
- Tools are discovered automatically from `src/sharkit/tools/`.
|
|
23
23
|
- `sharkit --version` shows the exact build you have, dev pre-releases included.
|
|
24
24
|
- State lives in `~/.config/sharkit` and runs fine on Termux / Android.
|
|
25
25
|
- To wipe it completely: `uv tool uninstall sharkit` and `rm -rf ~/.config/sharkit`.
|
|
@@ -9,10 +9,11 @@ from sharkit.config.manager import ConfigManager
|
|
|
9
9
|
from sharkit.console.repl import Console
|
|
10
10
|
from sharkit.exceptions import SharkitError
|
|
11
11
|
from sharkit.history.manager import HistoryManager
|
|
12
|
-
from sharkit.modules.loader import discover_modules
|
|
13
|
-
from sharkit.modules.registry import ModuleRegistry
|
|
14
12
|
from sharkit.network.client import HttpClient
|
|
15
13
|
from sharkit.output.renderer import Renderer
|
|
14
|
+
from sharkit.tools.loader import discover_tools
|
|
15
|
+
from sharkit.tools.manager import ToolManager
|
|
16
|
+
from sharkit.tools.registry import ToolRegistry
|
|
16
17
|
|
|
17
18
|
NON_LINUX_MESSAGE = (
|
|
18
19
|
"sharkit is a shark.\n"
|
|
@@ -37,18 +38,19 @@ def main() -> int:
|
|
|
37
38
|
renderer = Renderer()
|
|
38
39
|
|
|
39
40
|
if sys.platform != "linux":
|
|
40
|
-
renderer.banner(
|
|
41
|
+
renderer.banner(tool_count=0, message=NON_LINUX_MESSAGE)
|
|
41
42
|
return 1
|
|
42
43
|
|
|
43
44
|
config_manager = ConfigManager()
|
|
44
45
|
|
|
45
46
|
history_manager = HistoryManager()
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
tool_registry = ToolRegistry()
|
|
49
|
+
tool_manager = ToolManager()
|
|
50
|
+
tools_dir = Path(__file__).parent / "tools"
|
|
51
|
+
discovered = discover_tools(tools_dir)
|
|
52
|
+
for tool_class, tool_path in discovered:
|
|
53
|
+
tool_registry.register_tool(tool_class, tool_path)
|
|
52
54
|
|
|
53
55
|
command_registry = CommandRegistry()
|
|
54
56
|
for command_class in BUILTIN_COMMANDS:
|
|
@@ -56,12 +58,13 @@ def main() -> int:
|
|
|
56
58
|
|
|
57
59
|
http_client = HttpClient()
|
|
58
60
|
|
|
59
|
-
renderer.banner(
|
|
61
|
+
renderer.banner(tool_count=len(discovered))
|
|
60
62
|
print()
|
|
61
63
|
|
|
62
64
|
console = Console(
|
|
63
65
|
command_registry=command_registry,
|
|
64
|
-
|
|
66
|
+
tool_registry=tool_registry,
|
|
67
|
+
tool_manager=tool_manager,
|
|
65
68
|
config_manager=config_manager,
|
|
66
69
|
history_manager=history_manager,
|
|
67
70
|
renderer=renderer,
|
|
@@ -8,8 +8,8 @@ from typing import Any
|
|
|
8
8
|
@dataclass
|
|
9
9
|
class CommandContext:
|
|
10
10
|
session: dict[str, Any] = field(default_factory=dict)
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
tools: list[Any] = field(default_factory=list)
|
|
12
|
+
current_tool: str | None = None
|
|
13
13
|
output: Any = None
|
|
14
14
|
|
|
15
15
|
|