social-engineer-toolkit icon indicating copy to clipboard operation
social-engineer-toolkit copied to clipboard

harvester issues with python3.8

Open swoth-f opened this issue 4 years ago • 27 comments

Expected Behaviour

Capture credentials when user navigates to spoofed site.

Actual Behaviour

Captures the email address and throws a bunch of exceptions. Output: [*] WE GOT A HIT! Printing the output: POSSIBLE USERNAME FIELD FOUND: session[username_or_email][email protected]

Exception happened during processing of request from ('', 43662)
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'

The only thing I was able to find when researching the above exceptions is that cgi.escape was removed in python3.8. I don't know if this helps but I thought I would share what I found.

Set Version = 8.0.3

Set in Kali

Ran apt update && apt full-upgrade

lsb_release -rdc output:

Description: Kali GNU/Linux Rolling Release: 2020.2 Codename: kali-rolling

swoth-f avatar Apr 17 '20 03:04 swoth-f

Im exatly in your same situation!

momobit avatar Apr 19 '20 15:04 momobit

you need to add "import html" under "import cgi" and then change "cgi.escape" to "html.escape"

neorampage avatar Apr 22 '20 02:04 neorampage

Will do. Thx

Sent from my iPhone

On Apr 21, 2020, at 9:51 PM, neorampage [email protected] wrote:



CAUTION:This email originated outside of Maryville University. Review links and attachments carefully before opening.

you need to add "import html" under "import cgi" and then change "cgi.escape" to "html.escape"

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/trustedsec/social-engineer-toolkit/issues/720#issuecomment-617517163, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APG7WV6VQTZC52OWPW5G76DRNZLQ7ANCNFSM4MKNAS6A.

swoth-f avatar Apr 22 '20 03:04 swoth-f

you need to add "import html" under "import cgi" and then change "cgi.escape" to "html.escap hi where should I add them ??

giovanni0013 avatar Apr 22 '20 23:04 giovanni0013

you need to add "import html" under "import cgi" and then change "cgi.escape" to "html.escap hi where should I add them ??

edit this file "/usr/share/set/src/webattack/harvester/harvester.py" and add "import html" under "import cgi" and then change "cgi.escape" to "html.escape

neorampage avatar Apr 22 '20 23:04 neorampage

you need to add "import html" under "import cgi" and then change "cgi.escape" to "html.escap

hi where should I add them ??

edit this file "/usr/share/set/src/webattack/harvester/harvester.py" and add "import html" under "import cgi" and then change "cgi.escape" to "html.escape

I added import html instead of import cgi and replaced cgi.escape with html.escape

but the problem remains Filewrite.write(cgi.escape(param: “ +Line + “\n”)) AttributeError: module ‘cgi’ has no attribute ‘escape’

giovanni0013 avatar Apr 23 '20 00:04 giovanni0013

you need to add "import html" under "import cgi" and then change "cgi.escape" to "html.escap

hi where should I add them ??

edit this file "/usr/share/set/src/webattack/harvester/harvester.py" and add "import html" under "import cgi" and then change "cgi.escape" to "html.escape

I added import html instead of import cgi and replaced cgi.escape with html.escape

but the problem remains Filewrite.write(cgi.escape(param: “ +Line + “\n”)) AttributeError: module ‘cgi’ has no attribute ‘escape’

in your file, you need to have something like this "import cgi import html" and Filewrite.write(html.escape(param: “ +Line + “\n”))

neorampage avatar Apr 23 '20 00:04 neorampage

yes I have them, but on set it keeps giving me the same error. Uploading 80046155... Uploading 80046163...

giovanni0013 avatar Apr 23 '20 00:04 giovanni0013

tell me where I can contact you so I put the photos

giovanni0013 avatar Apr 23 '20 00:04 giovanni0013

harvester.py.zip

For people who do not work making this change, here I leave my file, just replace it with the correct path.

neorampage avatar Apr 23 '20 02:04 neorampage

harvester.py.zip

For people who do not work making this change, here I leave my file, just replace it with the correct path.

Hello mate I have same problem of these guys...where i must replace this zip file? Thanks.

devilmen80 avatar May 01 '20 05:05 devilmen80

harvester.py.zip For people who do not work making this change, here I leave my file, just replace it with the correct path.

Hello mate I have same problem of these guys...where i must replace this zip file? Thanks.

see yo error and yo have an error in harvester.py, in that file path you are going to replace the file

neorampage avatar May 01 '20 12:05 neorampage

harvester.py.zip For people who do not work making this change, here I leave my file, just replace it with the correct path.

Hello mate I have same problem of these guys...where i must replace this zip file? Thanks.

see yo error and yo have an error in harvester.py, in that file path you are going to replace the file

Thanks for your help..I'm new...download this file in harrvester.py and exstract it in same folder and delete old file?? It's right?

devilmen80 avatar May 01 '20 12:05 devilmen80

harvester.py.zip For people who do not work making this change, here I leave my file, just replace it with the correct path.

Hello mate I have same problem of these guys...where i must replace this zip file? Thanks.

see yo error and yo have an error in harvester.py, in that file path you are going to replace the file

Thanks for your help..I'm new...download this file in harrvester.py and exstract it in same folder and delete old file?? It's right?

yes

neorampage avatar May 01 '20 12:05 neorampage

Thanks a lot mate... I will try just possible and i''ll let you know. Cheers:)

harvester.py.zip For people who do not work making this change, here I leave my file, just replace it with the correct path.

Hello mate I have same problem of these guys...where i must replace this zip file? Thanks.

see yo error and yo have an error in harvester.py, in that file path you are going to replace the file

Thanks for your help..I'm new...download this file in harrvester.py and exstract it in same folder and delete old file?? It's right?

yes

Thanks a lot mate... I will try just possible and i''ll let you know. Cheers:)

devilmen80 avatar May 01 '20 12:05 devilmen80

harvester.py.zip For people who do not work making this change, here I leave my file, just replace it with the correct path.

Hello mate I have same problem of these guys...where i must replace this zip file? Thanks.

see yo error and yo have an error in harvester.py, in that file path you are going to replace the file

Thanks for your help..I'm new...download this file in harrvester.py and exstract it in same folder and delete old file?? It's right?

yes

I don't understand. But the victim must be connected in our same net??bcuz if I open link out from my net in which making attack link don't working...thanks

devilmen80 avatar May 01 '20 18:05 devilmen80

exactly, you need something to use out od the net, for example ngrok

neorampage avatar May 01 '20 18:05 neorampage

exactly, you need something to use out od the net, for example

exactly, you need something to use out od the net, for example ngrok

Thanks mate anyway your zip file working good. I don't understand where save the file with password...ialso I have another question. With black eye I don't have any link...is bcuz I don't have ngrok? Thanks

devilmen80 avatar May 01 '20 18:05 devilmen80

you need to see very carefully setoolkit there can you see the file path where the credentials are save, i dont know about black eye

neorampage avatar May 01 '20 19:05 neorampage

you need to see very carefully setoolkit there can you see the file path where the credentials are save, i dont know about black eye

i have a new problem after replacing harvester.py.zip Screenshot_2020-05-04_01-45-59 it is not showing password

kushagra055 avatar May 03 '20 20:05 kushagra055

you need to see very carefully setoolkit there can you see the file path where the credentials are save, i dont know about black eye

i have a new problem after replacing harvester.py.zip Screenshot_2020-05-04_01-45-59 it is not showing password

It's probably your website problem..

you need to add "import html" under "import cgi" and then change "cgi.escape" to "html.escape"

It's worked for me when I use google template website

iTruth avatar May 04 '20 03:05 iTruth

anotationerror

keeps giving error, and now... help me UnboundLocalError: local avaliable 'html' referenced before assignment

LuciLua avatar May 19 '20 03:05 LuciLua

anotationerror

keeps giving error, and now... help me UnboundLocalError: local avaliable 'html' referenced before assignment

search that variable, i think is in line 416

neorampage avatar May 19 '20 03:05 neorampage

you need to see very carefully setoolkit there can you see the file path where the credentials are save, i dont know about black eye

i have a new problem after replacing harvester.py.zip Screenshot_2020-05-04_01-45-59 it is not showing password

use this haevester.py ist the most powerfull at this time..

https://github.com/trustedsec/social-engineer-toolkit/blob/master/src/webattack/harvester/harvester.py

TheRicky90 avatar Jul 23 '20 21:07 TheRicky90

you need to see very carefully setoolkit there can you see the file path where the credentials are save, i dont know about black eye

i have a new problem after replacing harvester.py.zip Screenshot_2020-05-04_01-45-59 it is not showing password

use this haevester.py ist the most powerfull at this time..

https://github.com/trustedsec/social-engineer-toolkit/blob/master/src/webattack/harvester/harvester.py

Hello mate. Make download of last version of setoolkit on githube then replace all old files with new. After replace again your file harvester...it works fine with me. Regards

devilmen80 avatar Jul 25 '20 15:07 devilmen80

hi I have the same issue, how i can replace the files

sarah199999 avatar Sep 05 '20 21:09 sarah199999

I think the issue is the same even after setting html.escape and the html first ,, the cloning is so bad

Amine07a avatar Dec 26 '23 20:12 Amine07a