fix pyopenssl issue when using ssl

This commit is contained in:
TrustedSec 2016-12-05 19:02:00 -05:00
parent b8d7c002a5
commit daf5baa089
3 changed files with 20 additions and 12 deletions

View file

@ -1,3 +1,9 @@
~~~~~~~~~~~~~~~~
version 7.4.3
~~~~~~~~~~~~~~~~
* add a patch to pyopenssl through zipimporter - looks like a bug in pyopenssl when paths are specified
~~~~~~~~~~~~~~~~
version 7.4.2
~~~~~~~~~~~~~~~~

View file

@ -1 +1 @@
7.4.2
7.4.3

View file

@ -25,12 +25,21 @@ import threading
import datetime
import shutil
# detect openssl module
try:
# from OpenSSL import SSL
from OpenSSL import SSL
# handle import error that openssl is not there
except Exception as err:
print("Python OpenSSL wasn't detected or PEM file not found, note that SSL compatibility will be affected.")
print_status("Printing error: " + str(err))
pass
# get path to normal
definepath = os.getcwd()
sys.path.append(definepath)
from src.core.setcore import *
sys.path.append("/etc/setoolkit")
from set_config import APACHE_SERVER as apache_check
from set_config import WEBATTACK_EMAIL as webattack_email
@ -39,17 +48,9 @@ from set_config import HARVESTER_LOG as logpath
sys.path.append(definepath)
if track_email == True:
print_status(
"You have selected to track user accounts, Apache will automatically be turned on to handle tracking of users.")
print_status("You have selected to track user accounts, Apache will automatically be turned on to handle tracking of users.")
apache_check = True
# detect openssl module
try:
from OpenSSL import SSL
# handle import error that openssl is not there
except Exception:
print("Python OpenSSL wasn't detected or has an installation issue, note that SSL compatibility is now turned off")
############################################
# Credential harvester #
############################################
@ -650,6 +651,7 @@ try:
# if we are using ssl
if ssl_flag == 'true':
print "GOAT"
ssl_server()
# if we aren't using ssl