joker25000 / Hercules

Hercules - Automated VPN Connect ✔️
47 stars 22 forks source link

Error #1

Open yildirimserkan opened 6 years ago

yildirimserkan commented 6 years ago

/Downloads/hub/Hercules$ sudo python2 hercules.py

[+] ---> Downloading VPN-FREE

--2018-08-09 09:10:49-- http://www.vpnbook.com/free-openvpn-account/VPNBook.com-OpenVPN-US1.zip Resolving www.vpnbook.com (www.vpnbook.com)... 46.28.53.124 Connecting to www.vpnbook.com (www.vpnbook.com)|46.28.53.124|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: https://www.vpnbook.com/free-openvpn-account/VPNBook.com-OpenVPN-US1.zip [following] --2018-08-09 09:10:49-- https://www.vpnbook.com/free-openvpn-account/VPNBook.com-OpenVPN-US1.zip Connecting to www.vpnbook.com (www.vpnbook.com)|46.28.53.124|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 9219 (9.0K) [application/zip] Saving to: ‘VPNBook.com-OpenVPN-US1.zip.3’

VPNBook.com-OpenVPN 100%[===================>] 9.00K --.-KB/s in 0s

2018-08-09 09:10:50 (78.7 MB/s) - ‘VPNBook.com-OpenVPN-US1.zip.3’ saved [9219/9219]

[+] ---> Unzip File

Archive: VPNBook.com-OpenVPN-US1.zip replace vpnbook-us1-tcp80.ovpn? [y]es, [n]o, [A]ll, [N]one, [r]ename: A inflating: vpnbook-us1-tcp80.ovpn
inflating: vpnbook-us1-tcp443.ovpn
inflating: vpnbook-us1-udp53.ovpn
inflating: vpnbook-us1-udp25000.ovpn

**[+] ---> Getting New Password

Traceback (most recent call last): File "hercules.py", line 91, in main() File "hercules.py", line 84, in main getpass() File "hercules.py", line 76, in getpass \n'''.format(user, passwd) NameError: global name 'passwd' is not defined**

Sanix-Darker commented 5 years ago

Hi @yildirimserkan i looked the code, this project is pretty simple, and i like how it's work, this error is cause by the way the code grab the password on "http://www.vpnbook.com/freevpn" , if you look carefully the line 69 we have this :

joker = '''<li>Password: <strong>(.+?)</strong></li>'''

Or on the website, the password is an image now, so it's not able to grab it, have a look here: capture

That's what i just figured out, i hope @joker25000 will find a great way to resolve that too!!! By the way, you can write it manually in your code source and test again!!

PS: i like when code is simple like this case!

SANGED commented 5 years ago

i have the same error.

lomovial commented 5 years ago

es muy fácil Modifica estas dos lineas de código 255

#joker = '''<li>Password: <strong>(.+?)</strong></li>'''
    joker = '5bhea6u'

\n'''.format(user, '5bhea6u')
    #\n'''.format(user, passwd)

Con eso debería ser suficiente si tienes problemas me contactas lm-va@hotmail.com