oddcod3 / Phantom-Evasion

Python antivirus evasion tool
GNU General Public License v3.0
1.39k stars 334 forks source link

AttributeError: module 'OpenSSL.crypto' has no attribute 'PKCS12Type' #77

Closed boxyvision closed 4 years ago

boxyvision commented 4 years ago

Hi, Anyone can help me to fix my issue ?

[>] Sign Executable

Traceback (most recent call last): File "phantom-evasion.py", line 396, in Phantom_lib.CmdlineLauncher(sys.argv) File "Setup/Phantom_lib.py", line 1309, in CmdlineLauncher ModuleLauncher(M_type,ModOpt) File "Setup/Phantom_lib.py", line 964, in ModuleLauncher ExeSigner(ModOpt["Outfile"],ModOpt["SpoofCert"],ModOpt["descr"]) File "Setup/Phantom_lib.py", line 439, in ExeSigner pfx = crypto.PKCS12Type() AttributeError: module 'OpenSSL.crypto' has no attribute 'PKCS12Type'

0XAXSDD commented 4 years ago

我也是这个问题

anonymous187 commented 4 years ago

Hi, Anyone can help me to fix my issue ?

[>] Sign Executable

Traceback (most recent call last): File "phantom-evasion.py", line 396, in Phantom_lib.CmdlineLauncher(sys.argv) File "Setup/Phantom_lib.py", line 1309, in CmdlineLauncher ModuleLauncher(M_type,ModOpt) File "Setup/Phantom_lib.py", line 964, in ModuleLauncher ExeSigner(ModOpt["Outfile"],ModOpt["SpoofCert"],ModOpt["descr"]) File "Setup/Phantom_lib.py", line 439, in ExeSigner pfx = crypto.PKCS12Type() AttributeError: module 'OpenSSL.crypto' has no attribute 'PKCS12Type'

I am having the same issue, any help??

Txoka commented 4 years ago

Changing:

pfx = crypto.PKCS12Type()

to

try:
    pfx = crypto.PKCS12()
except AttributeError:
    pfx = crypto.PKCS12Type()

in Exesigner function in the file "/Setup/Phantom_lib.py" solves the signing error. (At least for me)

ayashgupta commented 4 years ago

It didn't worked, anyone else has any solution for this? I typed what Txoka said in the setup/Phantom_lib.py and it made the program to even stop working. developer?

Txoka commented 4 years ago

Please add log of ur error.

2igzpeter commented 4 years ago

HI! I have a problem. name 'crypto' is not defined!

I have this on code: from OpenSSL import crypto

console error:

///////////////////////////////////////////////////////////////////////////////////////////////////////// File "phantom-evasion.py", line 401, in CompleteMenu() File "phantom-evasion.py", line 124, in CompleteMenu Phantom_lib.ModuleLauncher(module_type) File "Setup/Phantom_lib.py", line 963, in ModuleLauncher ExeSigner(ModOpt["Outfile"],ModOpt["SpoofCert"],ModOpt["descr"]) File "Setup/Phantom_lib.py", line 424, in ExeSigner x509 = crypto.load_certificate(crypto.FILETYPE_PEM, online_cert) NameError: name 'crypto' is not defined

////////////////////////////////////////////////////////////////////////////////////////////////////////////

someone can u help me? thx

DigvijayBhosale1729 commented 4 years ago

Changing:

pfx = crypto.PKCS12Type()

to

try:
    pfx = crypto.PKCS12()
except AttributeError:
    pfx = crypto.PKCS12Type()

in Exesigner function in the file "/Setup/Phantom_lib.py" solves the signing error. (At least for me)

This worked for me. Excellent Idea man. Created an account just to thank you for your help.

DigvijayBhosale1729 commented 4 years ago

Try installing openssl sudo pip install pyopenssl

boxyvision commented 4 years ago

Changing:

pfx = crypto.PKCS12Type()

to

try:
    pfx = crypto.PKCS12()
except AttributeError:
    pfx = crypto.PKCS12Type()

in Exesigner function in the file "/Setup/Phantom_lib.py" solves the signing error. (At least for me)

This worked for me. Excellent Idea man. Created an account just to thank you for your help.

Worked for me too! Thank you!