0

When I run:

Python3 SubEvil.py -d facebook.com -ra | clip

I get this error:

PS C:\Users\UserName\subevil> Python3 SubEvil.py -d facebook.com -ra | clip
Traceback (most recent call last):
  File "C:\Users\UserName\subevil\SubEvil.py", line 54, in <module>
    print(Brand(versions))
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 28-38: character maps to <undefined>
PS C:\Users\UserName\subevil>

when I try to save the output to a text file I get the same error

PS C:\Users\UserName\subevil> Python3 SubEvil.py -d facebook.com -ra > output.txt
Traceback (most recent call last):
  File "C:\Users\UserName\subevil\SubEvil.py", line 54, in <module>
    print(Brand(versions))
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 28-38: character maps to <undefined>
PS C:\Users\UserName\subevil>

How can I fix this problem without modifying the original script? all I want to do is to be able to pipe the output of the script to a file or clipboard.

this is the python script I'm running https://github.com/Evil-Twins-X/SubEvil/blob/main/SubEvil.py

I replaced line 54 with this

print(Brand(versions).encode("utf-8")) 

but it didn't work. the question might be similar to another one but I can't use the answer to those questions to fix my problem.

Also tried entering these in the Powershell before running the script, didn't fix the problem either.

set PYTHONIOENCODING=utf-8
set PYTHONLEGACYWINDOWSSTDIO=utf-8

0 Answers0