Skip to content
This repository has been archived by the owner on May 25, 2021. It is now read-only.

Error: Traceback (most recent call last): #24

Closed
MelissaMV opened this issue Jan 15, 2018 · 20 comments
Closed

Error: Traceback (most recent call last): #24

MelissaMV opened this issue Jan 15, 2018 · 20 comments

Comments

@MelissaMV
Copy link

MelissaMV commented Jan 15, 2018

@Juniorn1003 Heyyy how do I solve this error?

I'm using Kali Linux

I installed Selenium

I have Geckodriver in /usr/bin/geckodriver

But I'm still getting this error:

[ ok ] Restarting tor (via systemctl): tor.service.
[ ok ] Successfully Scanned Password : 872860B76453A77D60CA2BB8C1A7042072093276A3D701AD684053EC4C
Traceback (most recent call last):
File "faitagram", line 299, in
main()
File "faitagram", line 79, in main
Bruter(service, username, wordlist, delay).execute()
File "faitagram", line 131, in execute
if self.usercheck(self.username, self.service) == 1:
File "faitagram", line 148, in usercheck
driver = webdriver.Firefox()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 158, in init
keep_alive=True)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 154, in init
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 243, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 237, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities

I edited line 148 and still got this error:

[ ok ] Restarting tor (via systemctl): tor.service.
[ ok ] Successfully Scanned Password : 872860B76453A77D60CA2BB8C1A7042072093276A3D701AD684053EC4C
Traceback (most recent call last):
File "faitagram", line 299, in
main()
File "faitagram", line 79, in main
Bruter(service, username, wordlist, delay).execute()
File "faitagram", line 131, in execute
if self.usercheck(self.username, self.service) == 1:
File "faitagram", line 148, in usercheck
driver = webdriver.Firefox(executable_path="/usr/bin/geckodriver")
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 148, in init
self.service.start()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 83, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.

What else needs to be done?

@complexpotato
Copy link
Owner

Are you sure Geckodriver is in /usr/local/bin?

@complexpotato
Copy link
Owner

Or it just may be the version problem, (Selenium 3.40 + Geckodriver 0.16.0 + Firefox 53.0) Works Ok, under that firefox will not function properly.

@MelissaMV
Copy link
Author

I have two versions of Firefox in Kali Linux - The version that came with Kali Linux and the the latest version I manually installed. Should I remove the old Kali Linux version of Firefox? I also have updated versions of Selenium and Geckodriver 0.18..0

@vanguard71
Copy link

vanguard71 commented Jan 15, 2018

MelissaMv,
Looking at your error output, it looks like selinium looking for geckodriver in /usr/bin. You probably installed it in /usr/local/bin. I guess you can just create a symlink to solve the problem

Solution 1:
su -
ln -s /usr/local/bin/geckodriver /usr/bin/geckodriver

solution 2:
Also, do you have the latest code for faitagram; because Justin is calling

driver = webdriver.Firefox()

your local version appears to be calling as

driver = webdriver.Firefox(executable_path="/usr/bin/geckodriver")

You can update code by doing

git pull

in your local repository

@complexpotato
Copy link
Owner

I think this problem is solved, according to selenium issues #3884, ( SeleniumHQ/selenium#3884 ) It was just about the version of the geckodriver. I changed the geckodriver v.13 install to v.19 latest. So it will work now.

@MelissaMV
Copy link
Author

MelissaMV commented Jan 17, 2018

RE: driver = webdriver.Firefox(executable_path="/usr/bin/geckodriver")
Re: /usr/local/bin

@vanguard71 @Juniorn1003 I added that line to the script to see if it would work but no luck I also corrected the path location "/usr/local/bin/geckodriver" still no luck...I think I give up lol it appears to be working with others except me :( and I think its prolly because I'm using a 32 bit operating system not sure. I installed Selenium and Geckodriver and followed the instructions but...no luck. At least I tried lol hopefully I will get a script to work lol but I think this tool is awesome tho.

@vanguard71
Copy link

what is the most recent error?

@MelissaMV
Copy link
Author

MelissaMV commented Jan 17, 2018

Heyy @vanguard71 this is the error i'm getting with or without the added script:
driver = webdriver.Firefox(executable_path="/usr/local/bin/geckodriver")

[ ok ] Restarting tor (via systemctl): tor.service.
[ ok ] Successfully Scanned Password : 872860B76453A77D60CA2BB8C1A7042072093276A3D701AD684053EC4C
Traceback (most recent call last):
File "faitagram", line 299, in
main()
File "faitagram", line 79, in main
Bruter(service, username, wordlist, delay).execute()
File "faitagram", line 131, in execute
if self.usercheck(self.username, self.service) == 1:
File "faitagram", line 148, in usercheck
driver = webdriver.Firefox(executable_path="/usr/local/bin/geckodriver")
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 158, in init
keep_alive=True)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 154, in init
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 243, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 237, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities

root@kali:~/Desktop/Faitagram#

@complexpotato complexpotato reopened this Jan 18, 2018
@complexpotato
Copy link
Owner

@MelissaMV According to selenium issue SeleniumHQ/selenium#3884 , this is an issue of the version.... Are you sure you have the correct version?

@vanguard71
Copy link

vanguard71 commented Jan 18, 2018

try to output and ensure you are running right version with following

https://askubuntu.com/questions/261499/how-do-i-check-the-version-of-the-selenium-api-installed

Also, following line is incorrect. You want the directory; not the full path of executable

webdriver.Firefox(executable_path="/usr/local/bin/geckodriver")

you want

webdriver.Firefox(executable_path="/usr/local/bin/")

BTW, do not share your password in the forum and public media when you are putting exception details. you should change that phrase.

[ ok ] Successfully Scanned Password : 872860B76453A77D60CA2BB8C1A7042072093276A3D701AD684053EC4C

@complexpotato
Copy link
Owner

@vanguard71 Thanks for your correction. And also, the hashed password is okay to share, since it is not that important, and you can change it easily and generate a new one easily.

@MelissaMV
Copy link
Author

MelissaMV commented Jan 18, 2018

@Juniorn1003 @vanguard71 these are the versions I'm using:

root@kali:~# python -c "import selenium; print(selenium.version)"
3.8.1

root@kali:~# geckodriver
1516239285388 geckodriver INFO geckodriver 0.19.0
1516239285455 geckodriver INFO Listening on 127.0.0.1:4444

@vanguard71 the Hash password is incorrect but thx for your advice and concern :)

@Juniorn1003 setup.py is configured to install Geckodriver 64 Bit: "geckodriver-v0.19.0-linux64.tar.gz" but some folks still has a 32 Bit Operating system - I suggest you revert to the original script and let folks manually install Geckodriver 32 Bit or 64 Bit.

@MelissaMV
Copy link
Author

MelissaMV commented Jan 18, 2018

@Juniorn1003 For some reason its not executing tonight, i'm getting this error:

root@kali:~/Desktop/Faitagram# ls
faitagram LICENSE README.md setup.py wlist

root@kali:~/Desktop/Faitagram# python faitagram -h

Traceback (most recent call last):
File "faitagram", line 25, in
controller = Controller.from_port(port=9051)
File "/usr/local/lib/python2.7/dist-packages/stem/control.py", line 1026, in from_port
control_port = stem.socket.ControlPort(address, port)
File "/usr/local/lib/python2.7/dist-packages/stem/socket.py", line 376, in init
self.connect()
File "/usr/local/lib/python2.7/dist-packages/stem/socket.py", line 247, in connect
self._socket = self._make_socket()
File "/usr/local/lib/python2.7/dist-packages/stem/socket.py", line 405, in _make_socket
raise stem.SocketError(exc)
stem.SocketError: [Errno 111] Connection refused

root@kali:~/Desktop/Faitagram#

@vanguard71
Copy link

netstat -nltp

Is anything running on 9051

@SpartanKing4
Copy link

Have you tried restarting tor ?

Just use /etc/init.d/tor restart , it worked for me

Though I’m still getting an error ( I’m going to make an issue soon)

@MelissaMV
Copy link
Author

@vanguard71 nope nothings running on 9051
@SpartanKing4 thx for the tip - i restarted tor but same error.

@complexpotato
Copy link
Owner

Oh, Thats the proxy problem.

@complexpotato
Copy link
Owner

script updated. This script will go until you encounter the proxy problem.

@complexpotato
Copy link
Owner

Also Added a function that makes the setup.py calculate the OS bit, and installs the right geckodriver.

@complexpotato
Copy link
Owner

I think this problem is fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Add-Proxy
  
Done
Development

No branches or pull requests

4 participants