Getting this error with py2.7 as well as with py3.7

Getting this error with py2.7 as well as with py3.7

enter code here

Exception happened during processing of request from ('10.0.2.15', 41994)
Traceback (most recent call last): File "/usr/lib/python3.8/socketserver.py", line 650, in process_request_thread self.finish_request(request, client_address) File "/usr/lib/python3.8/socketserver.py", line 360, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/lib/python3.8/socketserver.py", line 720, in __init__ self.handle() File "/usr/lib/python3.8/http/server.py", line 427, in handle self.handle_one_request() File "/usr/lib/python3.8/http/server.py", line 415, in handle_one_request method() File "/usr/share/set/src/webattack/harvester/harvester.py", line 334, in do_POST filewrite.write(cgi.escape("PARAM: " + line + "\n"))
AttributeError: module 'cgi' has no attribute 'escape'

2 Answers

I think, you need to add import html under import cgi and then change cgi.escape to html.escape. You need to do that in /usr/share/set/src/webattack/harvester/harvester.py (for details you can check this link - )

0
import html
html.escape(string_).encode('ascii', 'xmlcharrefreplace')
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like