routersploit icon indicating copy to clipboard operation
routersploit copied to clipboard

TypeError: '>=' not supported between instances of 'tuple' and 'int'

Open ghost opened this issue 6 years ago • 13 comments
trafficstars

! ANY INCOMPLETE REPORT WILL BE CLOSED RIGHT AWAY !

Steps to Reproduce (for bugs)

  1. Sudo python3 rsf.py
  2. Use exploits/routers/linksys/eseries_themoon_rce
  3. Set target 192.168.1.1
  4. Run
  5. Set payload reverse_tcp
  6. Enter
  7. Run
  8. Profit.

Your Environment

  • RouterSploit Version used: Version: 3.4.0

  • Operating System and version: Chrome OS: Version 72.0.3626.122 (Official Build) (32-bit) crouton: version 1-20190403182822~master:174af0eb release: sid architecture: arm64 kernel: Linux localhost 3.18.0-18747-gdea8d908bd77 #1 SMP PREEMPT Sun Mar 3 23:04:46 PST 2019 aarch64 GNU/Linux

  • Python Version: Python 3.7.3

  • Python Environment: asn1crypto==0.24.0 bcrypt==3.1.6 Brlapi==0.6.7 certifi==2018.8.24 cffi==1.12.2 chardet==3.0.4 cryptography==2.6.1 cupshelpers==1.0 distro-info==0.21 entrypoints==0.3 future==0.17.1 idna==2.6 keyring==17.1.1 keyrings.alt==3.1.1 louis==3.9.0 paramiko==2.4.2 ply==3.11 pyasn1==0.4.5 pycairo==1.16.2 pycparser==2.19 pycrypto==2.6.1 pycryptodome==3.8.1 pycryptodomex==3.8.1 pycups==1.9.73 pycurl==7.43.0.2 PyGObject==3.30.4 PyNaCl==1.3.0 pysmbc==1.0.15.6 pysmi==0.3.3 pysnmp==4.4.6 python-apt==1.8.4 python-debian==0.1.34 pyxattr==0.6.1 pyxdg==0.25 requests==2.21.0 SecretStorage==2.3.1 six==1.12.0 unattended-upgrades==0.1 urllib3==1.24.1 youtube-dl==2019.1.17

Current Behavior

Instead of executing the selected exploit on the target device, it fails with the error:

Traceback (most recent call last): File "/home/delsin/Desktop/Exploits/routersploit/routersploit/interpreter.py", line 369, in command_run self.current_module.run() File "/home/delsin/Desktop/Exploits/routersploit/routersploit/modules/exploits/routers/linksys/eseries_themoon_rce.py", line 54, in run shell(self, architecture="mipsle", method="wget", location="/tmp") File "/home/delsin/Desktop/Exploits/routersploit/routersploit/core/exploit/shell.py", line 128, in shell data = payload.generate() File "/home/delsin/Desktop/Exploits/routersploit/routersploit/modules/payloads/mipsle/reverse_tcp.py", line 21, in generate reverse_ip = utils.convert_ip(self.lhost) File "/home/delsin/Desktop/Exploits/routersploit/routersploit/core/exploit/utils.py", line 67, in convert_ip res += bytes([int(i)]) ValueError: invalid literal for int() with base 10: ''

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "rsf.py", line 26, in routersploit() File "rsf.py", line 22, in routersploit rsf.start() File "/home/delsin/Desktop/Exploits/routersploit/routersploit/interpreter.py", line 117, in start command_handler(args) File "/home/delsin/Desktop/Exploits/routersploit/routersploit/core/exploit/utils.py", line 175, in wrapper return fn(self, *args, **kwargs) File "/home/delsin/Desktop/Exploits/routersploit/routersploit/interpreter.py", line 374, 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

Should attempt to execute the exploit on the target device.

ghost avatar Apr 04 '19 19:04 ghost

JFTR, I think this is a duplicate of #571.

iamleot avatar Apr 06 '19 10:04 iamleot

Install missing libraries Next compile setup.py Python setup.py --help ➜ routersploit git:(master) python setup.py --help Common commands: (see '--help-commands' for more) setup.py build will build the package underneath 'build/' setup.py install will install the package Python setup.py build Python setup.py install problem solved Python rsf.py

xxghk avatar Apr 09 '19 20:04 xxghk

I still don't know how to fix this... What am I supposed to do? I do not think I'm supposed to make builds it should just work right ^^

Xcaliburr101 avatar Feb 14 '20 21:02 Xcaliburr101

same here, i just built and installed setup.py but i'm getting the exact same error as before

hristoaz avatar Feb 15 '20 16:02 hristoaz

Works for me: First download the newest version

sudo su chmod +x setup.py exit

sudo apt-get install python3 sudo python3 setup.sh install sudo python3 rsf.py

internauta-maromba avatar May 24 '20 08:05 internauta-maromba

Same problm😭

jonasyumi avatar May 26 '20 06:05 jonasyumi

how to slove this File "/data/data/com.termux/files/home/routersploit/routersploit/core/exploit/utils.py", line 109, in import_exploit module = importlib.import_module(path) File "/data/data/com.termux/files/usr/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "/data/data/com.termux/files/home/routersploit/routersploit/modules/exploits/routers/technicolor/tc7200_password_disclosure_v2.py", line 3, in from Crypto.Cipher import AES File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/Crypto/Cipher/init.py", line 27, in from Crypto.Cipher._mode_ecb import _create_ecb_cipher File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/Crypto/Cipher/_mode_ecb.py", line 29, in from Crypto.Util._raw_api import (load_pycryptodome_raw_lib, File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/Crypto/Util/_raw_api.py", line 33, in from Crypto.Util.py3compat import byte_string ImportError: cannot import name 'byte_string' from 'Crypto.Util.py3compat' (/data/data/com.termux/files/usr/lib/python3.8/site-packages/Crypto/Util/py3compat.py) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/data/data/com.termux/files/home/routersploit/routersploit/interpreter.py", line 389, in command_run self.current_module.run() File "/data/data/com.termux/files/home/routersploit/routersploit/modules/scanners/autopwn.py", line 77, in run for module in utils.iter_modules(directory): File "/data/data/com.termux/files/home/routersploit/routersploit/core/exploit/utils.py", line 138, in iter_modules yield import_exploit(path) File "/data/data/com.termux/files/home/routersploit/routersploit/core/exploit/utils.py", line 120, in import_exploit raise RoutersploitException( routersploit.core.exploit.exceptions.RoutersploitException: Error during loading 'routersploit/modules/exploits/routers/technicolor/tc7200_password_disclosure_v2' Error: cannot import name 'byte_string' from 'Crypto.Util.py3compat' (/data/data/com.termux/files/usr/lib/python3.8/site-packages/Crypto/Util/py3compat.py) It should be valid path to the module. Use key multiple times for completion. 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 "/data/data/com.termux/files/home/routersploit/routersploit/interpreter.py", line 125, in start command_handler(args, **kwargs) File "/data/data/com.termux/files/home/routersploit/routersploit/core/exploit/utils.py", line 177, in wrapper return fn(self, *args, **kwargs) File "/data/data/com.termux/files/home/routersploit/routersploit/interpreter.py", line 394, in command_run print_error(traceback.format_exc(sys.exc_info())) File "/data/data/com.termux/files/usr/lib/python3.8/traceback.py", line 167, in format_exc return "".join(format_exception(*sys.exc_info(), limit=limit, chain=chain)) File "/data/data/com.termux/files/usr/lib/python3.8/traceback.py", line 120, in format_exception return list(TracebackException( File "/data/data/com.termux/files/usr/lib/python3.8/traceback.py", line 493, in init context = TracebackException( File "/data/data/com.termux/files/usr/lib/python3.8/traceback.py", line 509, in init self.stack = StackSummary.extract( File "/data/data/com.termux/files/usr/lib/python3.8/traceback.py", line 340, in extract if limit >= 0: TypeError: '>=' not supported between instances of 'tuple' and 'int'

ev1351 avatar Jun 29 '20 07:06 ev1351

Install missing libraries Next compile setup.py


From: Xcaliburr101 [email protected] Sent: Saturday, February 15, 2020 5:07:35 AM To: threat9/routersploit [email protected] Cc: xxghk [email protected]; Comment [email protected] Subject: Re: [threat9/routersploit] TypeError: '>=' not supported between instances of 'tuple' and 'int' (#577)

I still don't know how to fix this... What am I supposed to do? I do not think I'm supposed to make builds it should just work right ^^

― You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/threat9/routersploit/issues/577?email_source=notifications&email_token=ALZKX6NMS6CVHBRG7FPOY63RC4BZPA5CNFSM4HDWBWHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL2N3VQ#issuecomment-586472918, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALZKX6NIXCHZB42HGB3CCKLRC4BZPANCNFSM4HDWBWHA.

xxghk avatar Jul 13 '20 14:07 xxghk

Instal pustaka yang hilang Berikutnya compile setup.py Python setup.py --help ➜ routersploit git: (master) python setup.py --help Perintah umum: (lihat '--help-commands' untuk lebih lanjut) setup.py build akan membangun paket di bawah 'build /' setup.py install akan menginstal paket Python setup.py build Python setup.py masalah install solved Python rsf.py

Hmm

zee-071 avatar Aug 18 '20 15:08 zee-071

Works for me: First download the newest version

sudo su chmod +x setup.py exit

sudo apt-get install python3 sudo python3 setup.sh install sudo python3 rsf.py

this works for me in kali thanx, what about MAC os to fix this issue, i cant use the same command to fix it there?

r03ky avatar Jun 13 '21 19:06 r03ky

Be careful, you have written it wrong and it can cause confusion, you have to put setup.py and not setup.sh

i hope it works for you all

https://github.com/threat9/routersploit/issues/577#issuecomment-633197142

ByRodri avatar Mar 12 '22 17:03 ByRodri

Install missing libraries Next compile setup.py Python setup.py --help ➜ routersploit git:(master) python setup.py --help Common commands: (see '--help-commands' for more) setup.py build will build the package underneath 'build/' setup.py install will install the package Python setup.py build Python setup.py install problem solved Python rsf.py

And how I do that???

COKOZAURIO7632 avatar Apr 11 '23 03:04 COKOZAURIO7632

I fixed this bug here few years ago - #736. I don't know why didn't they merge it. Maybe they want their tool to remain buggy. :(

enty8080 avatar Apr 29 '23 22:04 enty8080