mirror of
https://github.com/trustedsec/social-engineer-toolkit
synced 2024-11-25 14:00:18 +00:00
Allow import cgi on older python versions
This commit is contained in:
parent
02ed2e8f11
commit
64c33fe632
1 changed files with 6 additions and 2 deletions
|
@ -4,7 +4,11 @@ import sys
|
||||||
import html
|
import html
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import cgi
|
|
||||||
|
try:
|
||||||
|
from cgi import escape
|
||||||
|
except ImportError:
|
||||||
|
from html import escape
|
||||||
|
|
||||||
# need for python2 -> 3
|
# need for python2 -> 3
|
||||||
try:
|
try:
|
||||||
|
@ -332,7 +336,7 @@ class SETHandler(BaseHTTPRequestHandler):
|
||||||
else:
|
else:
|
||||||
line = ""
|
line = ""
|
||||||
counter = 1
|
counter = 1
|
||||||
filewrite.write(html.escape("PARAM: " + line + "\n"))
|
filewrite.write(escape("PARAM: " + line + "\n"))
|
||||||
filewrite2.write(line + "\n")
|
filewrite2.write(line + "\n")
|
||||||
# if a counter hits at 0 then print this line
|
# if a counter hits at 0 then print this line
|
||||||
if counter == 0:
|
if counter == 0:
|
||||||
|
|
Loading…
Reference in a new issue