mirror of
https://github.com/trustedsec/social-engineer-toolkit
synced 2024-11-27 06:50:18 +00:00
fix python2 issues with credential harvester
This commit is contained in:
parent
2b44452797
commit
bd44b868cd
4 changed files with 27 additions and 14 deletions
|
@ -1,3 +1,9 @@
|
|||
~~~~~~~~~~~~~~~~
|
||||
version 7.0.1
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
* fixed an issue where harvester would error out when using python2 - worked fine in python3 - added backwards compatibility
|
||||
|
||||
~~~~~~~~~~~~~~~~
|
||||
version 7.0
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
|
|
@ -4,13 +4,22 @@ import sys
|
|||
import os
|
||||
import re
|
||||
import cgi
|
||||
import http.server
|
||||
import http.server
|
||||
# need for python2 -> 3
|
||||
try:
|
||||
from http.server import *
|
||||
|
||||
except ImportError:
|
||||
from BaseHTTPServer import *
|
||||
|
||||
import socket
|
||||
from socketserver import BaseServer
|
||||
from http.server import SimpleHTTPRequestHandler
|
||||
from http.server import HTTPServer, BaseHTTPRequestHandler
|
||||
from socketserver import ThreadingMixIn
|
||||
|
||||
# needed for python2 -> 3
|
||||
try:
|
||||
from socketserver import *
|
||||
|
||||
except ImportError:
|
||||
from SocketServer import *
|
||||
|
||||
import threading
|
||||
import datetime
|
||||
import shutil
|
||||
|
@ -218,12 +227,12 @@ class SETHandler(BaseHTTPRequestHandler):
|
|||
"""Handle an error gracefully. May be overridden.
|
||||
The default is to print a traceback and continue.
|
||||
"""
|
||||
print('-' * 40)
|
||||
print('Exception happened during processing of request from', end=' ')
|
||||
#print('-' * 40)
|
||||
#print('Exception happened during processing of request from', end=' ')
|
||||
print(client_address)
|
||||
import traceback
|
||||
traceback.print_exc() # XXX But this goes to stderr!
|
||||
print('-' * 40)
|
||||
#import traceback
|
||||
#traceback.print_exc() # XXX But this goes to stderr!
|
||||
#print('-' * 40)
|
||||
pass
|
||||
|
||||
counter = 0
|
||||
|
|
|
@ -4,7 +4,7 @@ import os
|
|||
import sys
|
||||
import re
|
||||
import subprocess
|
||||
import urllib.parse
|
||||
import urllib
|
||||
import shutil
|
||||
from src.core.setcore import *
|
||||
|
||||
|
|
|
@ -10,9 +10,7 @@ import sys
|
|||
import time
|
||||
import re
|
||||
import shutil
|
||||
#import urllib.request, urllib.parse, urllib.error
|
||||
import urllib
|
||||
|
||||
operating_system = check_os()
|
||||
definepath = os.getcwd()
|
||||
|
||||
|
|
Loading…
Reference in a new issue