threat9 / routersploit

Exploitation Framework for Embedded Devices
Other
12.01k stars 2.31k forks source link

scanners/routers/router_scan #639

Open root2416 opened 4 years ago

root2416 commented 4 years ago

! ANY INCOMPLETE REPORT WILL BE CLOSED RIGHT AWAY !

Steps to Reproduce (for bugs)

1.use scanners/routers/router_scan 2.set target 192.168.1.1 3.run 4.

Your Environment

[*] 192.168.1.1 Starting vulnerablity check... Traceback (most recent call last): File "/root/routersploit/routersploit/interpreter.py", line 389, in command_run self.current_module.run() File "/root/routersploit/routersploit/modules/scanners/autopwn.py", line 77, in run for module in utils.iter_modules(directory): File "/root/routersploit/routersploit/core/exploit/utils.py", line 138, in iter_modules yield import_exploit(path) File "/root/routersploit/routersploit/core/exploit/utils.py", line 109, in import_exploit module = importlib.import_module(path) File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "/root/routersploit/routersploit/modules/exploits/generic/ssh_auth_keys.py", line 4, in from routersploit.core.ssh.ssh_client import SSHClient File "/root/routersploit/routersploit/core/ssh/ssh_client.py", line 2, in import paramiko File "/usr/lib/python3/dist-packages/paramiko/init.py", line 30, in from paramiko.transport import SecurityOptions, Transport File "/usr/lib/python3/dist-packages/paramiko/transport.py", line 65, in from paramiko.sftp_client import SFTPClient File "/usr/lib/python3/dist-packages/paramiko/sftp_client.py", line 41, in from paramiko.sftp_file import SFTPFile File "/usr/lib/python3/dist-packages/paramiko/sftp_file.py", line 66 self._close(async=True) ^ SyntaxError: invalid syntax

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "rsf.py", line 29, in routersploit(sys.argv) File "rsf.py", line 25, in routersploit rsf.start() File "/root/routersploit/routersploit/interpreter.py", line 125, in start command_handler(args, *kwargs) File "/root/routersploit/routersploit/core/exploit/utils.py", line 177, in wrapper return fn(self, args, *kwargs) File "/root/routersploit/routersploit/interpreter.py", line 394, in command_run print_error(traceback.format_exc(sys.exc_info())) File "/usr/lib/python3.7/traceback.py", line 167, in format_exc return "".join(format_exception(sys.exc_info(), limit=limit, chain=chain)) File "/usr/lib/python3.7/traceback.py", line 121, in format_exception type(value), value, tb, limit=limit).format(chain=chain)) File "/usr/lib/python3.7/traceback.py", line 508, in init capture_locals=capture_locals) File "/usr/lib/python3.7/traceback.py", line 337, in extract if limit >= 0: TypeError: '>=' not supported between instances of 'tuple' and 'int'

Expected Behavior

Run the scanner

Everything up to date, what should I do ?

root2416 commented 4 years ago

Common guys!

un1que00 commented 4 years ago

have you built and installed setup.py and then tried running it yet?

un1que00 commented 4 years ago

okay, well if you have not.. (BTW I am using Kali)

Try this (after cloning into routersploit) and do this in order (build before install):

cd routersploit (Make sure that you are in routersploit directory) ls (and you will see 'setup.py' in there among others) python3 setup.py build (may take a minute to complete) ...THEN... python3 setup.py install (may throw a few things at you, just ignore that for now, work on them later)

Now try and run it: (you can run it the way you have tried already and it should work now after building and then installing setup.py) & you can try:

routersploit
rsf > use scanners/autopwn
rsf (AutoPwn) > set target [IPV4 or IPV6 address] [+] target => [will show IPV4 or IPV6 address you entered above] rsf (AutoPwn) > run

May tell you some stuff needs fixing when it runs (fix it after) but it should work for the most part after this.

hope this helps!

COKOZAURIO7632 commented 1 year ago

okay, well if you have not.. (BTW I am using Kali)

Try this (after cloning into routersploit) and do this in order (build before install):

cd routersploit (Make sure that you are in routersploit directory) ls (and you will see 'setup.py' in there among others) python3 setup.py build (may take a minute to complete) ...THEN... python3 setup.py install (may throw a few things at you, just ignore that for now, work on them later)

Now try and run it: (you can run it the way you have tried already and it should work now after building and then installing setup.py) & you can try:

routersploit rsf > use scanners/autopwn rsf (AutoPwn) > set target [IPV4 or IPV6 address] [+] target => [will show IPV4 or IPV6 address you entered above] rsf (AutoPwn) > run

May tell you some stuff needs fixing when it runs (fix it after) but it should work for the most part after this.

hope this helps!

It doesn't work, It's the same thing, I have the same problem that he have and I prove what you say but it didn't work :(