mirror of
https://github.com/aljazceru/recon-pipeline.git
synced 2025-12-21 00:04:24 +01:00
removed dependency on tool-dict.pkl (#93)
* removed tool_dict dependency * updated tests * updated go version * added defaults for failing iteration during tool installation * Update pythonapp.yml * updated docs
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import sys
|
||||
import pickle
|
||||
import typing
|
||||
import inspect
|
||||
import pkgutil
|
||||
import importlib
|
||||
@@ -10,13 +8,12 @@ from cmd2.ansi import style
|
||||
|
||||
from collections import defaultdict
|
||||
|
||||
from ..recon.config import defaults
|
||||
from ..tools import tools
|
||||
|
||||
|
||||
def meets_requirements(requirements, exception):
|
||||
""" Determine if tools required to perform task are installed. """
|
||||
tools = get_tool_state()
|
||||
|
||||
print(tools.items())
|
||||
for tool in requirements:
|
||||
if not tools.get(tool).get("installed"):
|
||||
if exception:
|
||||
@@ -29,14 +26,6 @@ def meets_requirements(requirements, exception):
|
||||
return True
|
||||
|
||||
|
||||
def get_tool_state() -> typing.Union[dict, None]:
|
||||
""" Load current tool state from disk. """
|
||||
tools = Path(defaults.get("tools-dir")) / ".tool-dict.pkl"
|
||||
|
||||
if tools.exists():
|
||||
return pickle.loads(tools.read_bytes())
|
||||
|
||||
|
||||
def get_scans():
|
||||
""" Iterates over the recon package and its modules to find all of the classes that end in [Ss]can.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user