routersploit icon indicating copy to clipboard operation
routersploit copied to clipboard

Exception occurring during scan

Open anao00 opened this issue 7 years ago • 2 comments

! ANY INCOMPLETE REPORT WILL BE CLOSED RIGHT AWAY !

Steps to Reproduce (for bugs)

  1. Launch routersploit
  2. Set it to use scanners/routers/router_scan
  3. Wait for exception whilst scanning

Your Environment

  • RouterSploit Version used: 3.4.1
  • Operating System and version: Linux 4.15.0.51-generic, Ubuntu 16
  • Python Version: 3.6.8
  • Python Environment:
aiohttp==3.5.4
aiohttp-socks==0.2.2
aiorpcX==0.17.0
altgraph==0.16.1
asn1crypto==0.24.0
astroid==2.2.5
async-timeout==3.0.1
attrs==17.4.0
bcrypt==3.1.6
beautifulsoup4==4.6.0
binwalk==2.1.1
capstone==4.0.1
catfish==1.4.4
certifi==2019.3.9
cffi==1.12.2
chardet==3.0.4
Click==7.0
command-not-found==0.3
cryptography==2.6.1
cupshelpers==1.0
cycler==0.10.0
decorator==4.1.2
defer==1.0.6
distro-info===0.18ubuntu0.18.04.1
dnspython==1.16.0
ecdsa==0.13.2
Electrum==3.3.5
ffmulticonverter==1.8.0
Flask==1.0.2
future==0.17.1
html5lib==0.999999999
httplib2==0.9.2
idna==2.8
idna-ssl==1.1.0
impacket==0.9.19
isort==4.3.21
itsdangerous==1.1.0
Jinja2==2.10.1
jsonrpclib-pelix==0.4.0
kazam==1.4.5
keyring==10.6.0
keyrings.alt==3.0
language-selector==0.1
lazy-object-proxy==1.4.1
ldap3==2.5.1
ldapdomaindump==0.9.1
lxml==4.2.1
macholib==1.11
MarkupSafe==1.1.1
matplotlib==2.1.1
mccabe==0.6.1
mock==3.0.4
multidict==4.5.2
mypy==0.560
netifaces==0.10.4
nose==1.3.7
numpy==1.13.3
olefile==0.45.1
paramiko==2.4.2
pefile==2018.8.8
pexpect==4.7.0
pgpdump3==1.5.2
Pillow==6.0.0
ply==3.11
powerline-status===2.7.dev9999-git.b-5d82d544f3366a214732aeb8f781d50ced38ceef-
protobuf==3.7.1
psutil==5.6.2
ptyprocess==0.6.0
py-pgp==0.0.1
pyaes==1.6.1
pyarmor==5.3.11
pyasn1==0.4.5
PyAudio==0.2.11
pycairo==1.16.2
pycparser==2.19
pycrypto==2.6.1
pycryptodomex==3.8.1
pycups==1.9.73
Pygments==2.2.0
pygobject==3.26.1
PyInstaller==3.4
pylint==2.3.1
pymssql==2.1.4
PyNaCl==1.3.0
pynput==1.4.2
PyOpenGL==3.1.0
pyOpenSSL==19.0.0
pyparsing==2.2.0
pyPEG2==2.15.2
pyqtgraph==0.10.0
pysine==0.9.2
pysmi==0.3.4
pysnmp==4.4.10
python-apt==1.6.4
python-dateutil==2.6.1
python-debian==0.1.32
python-magic==0.4.15
python-xlib==0.25
pytz==2018.3
pyxattr==0.6.0
pyxdg==0.25
PyYAML==3.12
QDarkStyle==2.6.8
qrcode==6.1
qutebrowser==1.1.1
reportlab==3.4.0
requests==2.21.0
requests-unixsocket==0.1.5
ruamel.yaml==0.15.34
scipy==0.19.1
SecretStorage==2.3.1
six==1.12.0
systemd-python==234
termcolor==1.1.0
typed-ast==1.4.0
typing-extensions==3.7.2
ubuntu-drivers-common==0.0.0
ufw==0.36
unattended-upgrades==0.1
urllib3==1.24.1
webencodings==0.5
Werkzeug==0.15.2
wrapt==1.11.2
xkit==0.0.0
yarl==1.3.0
youtube-dl==2019.7.16
zope.interface==4.6.0

Current Behavior

The program is trying to obtain a username and password but instead, something else is being loaded into the variable data. It scans and finishes without exiting, but the exception below occurs mid-scan:

Exception in thread thread-2:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/user/Programs/routersploit/routersploit/modules/creds/generic/ssh_default.py", line 53, in target_function
    username, password = data.next().split(":")
ValueError: too many values to unpack (expected 2)

Expected Behavior

modules/creds/generic/ssh_default.py should behave without data.next().split(":") returning more than 2 values.

anao00 avatar Aug 01 '19 12:08 anao00

I fixed this by editing the defaults.txt file and removing the erroneous ':' on line 10.

this file is located at ./routersploit/routersploit/resources/wordlists/defaults.txt

jsquaredz avatar Aug 13 '19 13:08 jsquaredz

I can confirm removing the tailing ":" from line 10 reading "888888:888888:" , or just delete line 10 in ./routersploit/routersploit/resources/wordlists/defaults.txt as it's redudant to the line above, fixes the problem.

OverlordAdmin avatar Aug 13 '19 20:08 OverlordAdmin