Skip to content

Commit a4e0390

Browse files
authored
Check if the app is run in python3 (#438)
1 parent 9944047 commit a4e0390

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

routersploit/core/exploit/shell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def shell(exploit, architecture="", method="", payloads=None, **params):
131131
elf_binary = payload.generate_elf(data)
132132
communication = Communication(exploit, elf_binary, options, **params)
133133
if communication.wget() is False:
134-
print_error("Exploit failed to transfer payload")
134+
print_error("Exploit failed to transfer payload")
135135
continue
136136

137137
elif method == "echo":

rsf.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
from __future__ import print_function
4+
import sys
5+
if sys.version_info.major < 3:
6+
print("RouterSploit supports only Python3. Rerun application in Python3 environment.")
7+
exit(0)
48

59
import logging.handlers
6-
710
from routersploit.interpreter import RoutersploitInterpreter
811

912
log_handler = logging.handlers.RotatingFileHandler(filename="routersploit.log", maxBytes=500000)

0 commit comments

Comments
 (0)