Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ghost opened this issue Apr 4, 2019 · 13 comments
Open

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

ghost opened this issue Apr 4, 2019 · 13 comments
Labels

Comments

@ghost
Copy link

ghost commented Apr 4, 2019

! 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 Error use exploits #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 ghost changed the title TypeError: '>=' not supported between instances of 'tuple' and 'int' TypeError: '>=' not supported between instances of 'tuple' and 'int' #495 Apr 4, 2019
@ghost ghost changed the title TypeError: '>=' not supported between instances of 'tuple' and 'int' #495 TypeError: '>=' not supported between instances of 'tuple' and 'int' Apr 4, 2019
@iamleot
Copy link
Contributor

iamleot commented Apr 6, 2019

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

@xxghk
Copy link

xxghk commented Apr 9, 2019

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

@Xcaliburr101
Copy link

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 ^^

@hristoaz
Copy link

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

@internauta-maromba
Copy link

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

@jonasyumi
Copy link

Same problm😭

@ev1351
Copy link

ev1351 commented Jun 29, 2020

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'

@xxghk
Copy link

xxghk commented Jul 13, 2020 via email

@zee-071
Copy link

zee-071 commented Aug 18, 2020

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

@r03ky
Copy link

r03ky commented Jun 13, 2021

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?

@ByRodri
Copy link

ByRodri commented Mar 12, 2022

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

#577 (comment)

@COKOZAURIO7632
Copy link

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???

@enty8080
Copy link

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. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests