Ekultek / Ekultek/Zeus-Scanner
Unhandled exception (95a2e391)
- Dominant language
- Python
- Stars
- 999
- Forks
- 245
- PR merge metrics
- No merged PRs in 30d
Description
Zeus version:
`1.5.2.21b875`
Firefox version:
`(56, 0)`
Geckodriver version:
`geckodriver-v0.18.0-linux64.tar.gz`
Error info:
```Traceback (most recent call last):
File "/home/insomnia/tools/Zeus-Scanner/var/search/selenium_search.py", line 268, in parse_search_results
tor=tor, batch=batch, xforward=forward_for
File "/home/insomnia/tools/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 "/home/insomnia/tools/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-5.1.0-parrot1-3t-amd64-x86_64-with-Parrot-4.7-stable`
Commands used:
`zeus.py -d inurl:.php?id=`
Log file info:
```2019-07-01 12:48:35,191;zeus-log;INFO;log file being saved to '/home/insomnia/tools/Zeus-Scanner/log/zeus-log-17.log'
2019-07-01 12:48:35,191;zeus-log;INFO;using default search engine
2019-07-01 12:48:35,191;zeus-log;INFO;starting dork scan with query 'inurl:.php?id='
2019-07-01 12:48:35,192;zeus-log;WARNING;will not parse webcache URL's (to parse webcache pass -W)
2019-07-01 12:48:35,192;zeus-log;WARNING;only pulling URLs with GET(query) parameters (to pull all URL's pass -E)
2019-07-01 12:48:35,192;zeus-log;INFO;attempting to gather query URL
2019-07-01 12:48:35,192;zeus-log;INFO;setting up virtual display to hide the browser
2019-07-01 12:48:35,310;zeus-log;INFO;setting the browser
2019-07-01 12:48:35,320;zeus-log;ERROR;[7;31;31mselenium_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 "/home/insomnia/tools/Zeus-Scanner/var/search/selenium_search.py", line 268, in parse_search_results
tor=tor, batch=batch, xforward=forward_for
File "/home/insomnia/tools/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 "/home/insomnia/tools/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-07-01 12:48:45,101;zeus-log;INFO;[32mZeus got an unexpected error and will automatically create an issue for this error, please wait[0m
2019-07-01 12:48:45,101;zeus-log;INFO;[32mgetting authorization[0m
2019-07-01 12:48:45,102;zeus-log;INFO;[32mextracting traceback from log file[0m
2019-07-01 12:48:45,103;zeus-log;INFO;[32mattempting to get firefox browser version[0m
```
Contributor guide
Research direction
Start in var/search/__init__.py around set_browser(), where the traceback shows whichcraft.which("geckodriver") being passed to Selenium, then trace the caller in var/search/selenium_search.py. Reproduce the reported command and inspect how the browser setup behaves when geckodriver is not found; done means the reported unhandled NoneType exception no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100