Ekultek / Ekultek/Zeus-Scanner

Unhandled exception (c4bf8471)

Open
#741 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
999
Forks
245
PR merge metrics
No merged PRs in 30d

Description

Zeus version:
`1.5.2.f6a3ad`

Firefox version:
`(57, 0)`

Geckodriver version:
`geckodriver-v0.19.0-linux64.tar.gz`

Error info:
```Traceback (most recent call last):
File "/opt/zeus-scanner/var/search/selenium_search.py", line 268, in parse_search_results
tor=tor, batch=batch, xforward=forward_for
File "/opt/zeus-scanner/var/search/selenium_search.py", line 82, in get_urls
browser = var.search.SetBrowser(agent=user_agent, proxy=proxy, tor=tor, xforward=xforward).set_browser()
File "/opt/zeus-scanner/var/search/__init__.py", line 148, in set_browser
executable_path=whichcraft.which("geckodriver"))
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 144, in __init__
self.service.start()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 93, in start
(os.path.basename(self.path), self.start_error_message, str(e)))
File "/usr/lib/python2.7/posixpath.py", line 114, in basename
i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'
```

Running details:
`Linux-4.15.0-45-generic-x86_64-with-Ubuntu-16.04-xenial`

Commands used:
`zeus.py -d inurl:php?id= -s`

Log file info:
```2019-04-12 13:39:09,335;zeus-log;INFO;log file being saved to '/opt/zeus-scanner/log/zeus-log-12.log'
2019-04-12 13:39:09,335;zeus-log;INFO;using default search engine
2019-04-12 13:39:09,336;zeus-log;INFO;starting dork scan with query 'inurl:php?id='
2019-04-12 13:39:09,347;zeus-log;WARNING;will not parse webcache URL's (to parse webcache pass -W)
2019-04-12 13:39:09,348;zeus-log;WARNING;only pulling URLs with GET(query) parameters (to pull all URL's pass -E)
2019-04-12 13:39:09,348;zeus-log;INFO;attempting to gather query URL
2019-04-12 13:39:09,348;zeus-log;INFO;setting up virtual display to hide the browser
2019-04-12 13:39:09,836;zeus-log;INFO;setting the browser
2019-04-12 13:39:10,005;zeus-log;ERROR;selenium_search.pyc failed to gather the URL from search engine, caught exception ''NoneType' object has no attribute 'rfind'' exception has been logged to current log file
Traceback (most recent call last):
File "/opt/zeus-scanner/var/search/selenium_search.py", line 268, in parse_search_results
tor=tor, batch=batch, xforward=forward_for
File "/opt/zeus-scanner/var/search/selenium_search.py", line 82, in get_urls
browser = var.search.SetBrowser(agent=user_agent, proxy=proxy, tor=tor, xforward=xforward).set_browser()
File "/opt/zeus-scanner/var/search/__init__.py", line 148, in set_browser
executable_path=whichcraft.which("geckodriver"))
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 144, in __init__
self.service.start()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 93, in start
(os.path.basename(self.path), self.start_error_message, str(e)))
File "/usr/lib/python2.7/posixpath.py", line 114, in basename
i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'

2019-04-12 13:39:19,636;zeus-log;INFO;Zeus got an unexpected error and will automatically create an issue for this error, please wait
2019-04-12 13:39:19,638;zeus-log;INFO;getting authorization
2019-04-12 13:39:19,664;zeus-log;INFO;extracting traceback from log file
2019-04-12 13:39:19,668;zeus-log;INFO;attempting to get firefox browser version
```

Contributor guide

Open the contributing guide

Research direction

Start with var/search/__init__.py around line 148, where the Firefox browser is configured, and trace how selenium_search.py reaches that call. Reproduce the reported command in the stated Ubuntu environment and verify that browser setup no longer raises the NoneType rfind error and the scan can gather URLs.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python, ubuntu
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.