bats3c / darkarmour

Windows AV Evasion
https://blog.dylan.codes/bypassing-av-via/
MIT License
727 stars 119 forks source link

local variable 'crypt' referenced before assignment #4

Open exc0rk opened 4 years ago

exc0rk commented 4 years ago

Hi,

When trying to use the script, I run into the following error that only appears when using the --jmp option. Please see following output


kali@kali:/opt/darkarmour$ ./darkarmour.py -f evil.exe --encrypt XOR  --loop 5 --jmp -o notevil.exe

[i] Started armouring evil.exe (73802 bytes)
[i] Configuring to use JMP loader
[i] Begining encryption via XOR
Traceback (most recent call last): key (0)                              
  File "./darkarmour.py", line 116, in <module>
    darkarmour.run(vars(ap.parse_args()))
  File "./darkarmour.py", line 96, in run
    self._do_crypt()
  File "./darkarmour.py", line 90, in _do_crypt
    self._do_jmp()
  File "./darkarmour.py", line 43, in _do_jmp
    bytes, length, keys_used = self._do_encrypt()
  File "./darkarmour.py", line 33, in _do_encrypt
    bytes, len, key = crypt.crypt_file(True, crypt.key, infile=self.in_file)
UnboundLocalError: local variable 'crypt' referenced before assignment
bats3c commented 4 years ago

This is a bug, I will fix it in the next few days