Skip to content

Commit 70279b7

Browse files
committed
Routersploit online
1 parent 79bd716 commit 70279b7

7 files changed

Lines changed: 53 additions & 3 deletions

File tree

Config.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
source "$BR2_EXTERNAL_BLACKHAT_PATH/package/blackhat/Config.in"
22
source "$BR2_EXTERNAL_BLACKHAT_PATH/package/python-routersploit/Config.in"
3+
source "$BR2_EXTERNAL_BLACKHAT_PATH/package/python-pycryptodome/Config.in"

configs/flipper_blackhat_a33_defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
3636
BR2_PACKAGE_BINUTILS=y
3737
BR2_PACKAGE_DOS2UNIX=y
3838
BR2_PACKAGE_GAWK=y
39+
BR2_PACKAGE_GIT=y
3940
BR2_PACKAGE_GPERF=y
4041
BR2_PACKAGE_GREP=y
4142
BR2_PACKAGE_MAKE=y
43+
BR2_PACKAGE_PATCH=y
4244
BR2_PACKAGE_SED=y
4345
BR2_PACKAGE_E2FSPROGS=y
4446
BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
@@ -116,6 +118,7 @@ BR2_PACKAGE_NMAP=y
116118
BR2_PACKAGE_NMAP_NCAT=y
117119
BR2_PACKAGE_NMAP_NMAP=y
118120
BR2_PACKAGE_NMAP_NPING=y
121+
BR2_PACKAGE_NTP=y
119122
BR2_PACKAGE_TCPDUMP=y
120123
BR2_PACKAGE_WPA_SUPPLICANT=y
121124
BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT=y
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
config BR2_PACKAGE_PYTHON_PYCRYPTODOME
2+
bool "python-pycryptodome"
3+
help
4+
PyCryptodome is a self-contained Python package of low-level cryptographic primitives.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
################################################################################
2+
#
3+
# python‑pycryptodome
4+
#
5+
################################################################################
6+
7+
PYTHON_PYCRYPTODOME_VERSION = v3.22.0
8+
9+
PYTHON_PYCRYPTODOME_SITE = https://github.com/Legrandin/pycryptodome
10+
PYTHON_PYCRYPTODOME_SITE_METHOD = git
11+
PYTHON_PYCRYPTODOME_LICENSE = BSD-3-Clause
12+
PYTHON_PYCRYPTODOME_LICENSE_FILES = LICENSE
13+
14+
PYTHON_PYCRYPTODOME_SETUP_TYPE = pep517
15+
16+
$(eval $(python-package))
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/routersploit/core/exploit/utils.py b/routersploit/core/exploit/utils.py
2+
index 420db6d..e75cb14 100644
3+
--- a/routersploit/core/exploit/utils.py
4+
+++ b/routersploit/core/exploit/utils.py
5+
@@ -92,7 +92,7 @@ def index_modules(modules_directory: str = MODULES_DIR) -> list:
6+
for root, dirs, files in os.walk(modules_directory):
7+
_, package, root = root.rpartition("routersploit/modules/".replace("/", os.sep))
8+
root = root.replace(os.sep, ".")
9+
- files = filter(lambda x: not x.startswith("__") and x.endswith(".py"), files)
10+
+ files = filter(lambda x: not x.startswith("__") and x.endswith(".pyc"), files)
11+
modules.extend(map(lambda x: ".".join((root, os.path.splitext(x)[0])), files))
12+
13+
return modules
14+
diff --git a/routersploit/interpreter.py b/routersploit/interpreter.py
15+
index d65f981..cf037b4 100644
16+
--- a/routersploit/interpreter.py
17+
+++ b/routersploit/interpreter.py
18+
@@ -229,7 +229,7 @@ class RoutersploitInterpreter(BaseInterpreter):
19+
self.module_commands.extend(self.global_commands)
20+
self.module_commands.sort()
21+
22+
- self.modules = index_modules()
23+
+ self.modules = index_modules("/usr/lib/python3.12/site-packages/routersploit")
24+
self.modules_count = Counter()
25+
self.modules_count.update([module.split('.')[0] for module in self.modules])
26+
self.main_modules_dirs = [module for module in os.listdir(MODULES_DIR) if not module.startswith("__")]

package/python-routersploit/Config.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ config BR2_PACKAGE_PYTHON_ROUTERSPLOIT
66
select BR2_PACKAGE_PYTHON_REQUESTS
77
select BR2_PACKAGE_PYTHON_PARAMIKO
88
select BR2_PACKAGE_PYTHON_PYSNMP
9-
select BR2_PACKAGE_PYTHON_PYCRYPTODOMEX
9+
select BR2_PACKAGE_PYTHON_PYCRYPTODOME
1010
select BR2_PACKAGE_PYTHON_TELNETLIB3

package/python-routersploit/python-routersploit.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ PYTHON_ROUTERSPLOIT_DEPENDENCIES = \
1717
python-requests \
1818
python-paramiko \
1919
python-pysnmp \
20-
python-pycryptodomex \
21-
python-telnetlib3
20+
python-pycryptodome \
21+
python-telnetlib3 \
2222

2323
$(eval $(python-package))

0 commit comments

Comments
 (0)