Pepitoh / VBad

VBA Obfuscation Tools combined with an MS office document generator
MIT License
531 stars 129 forks source link

Script not encrypted properly #42

Open L0G5 opened 6 years ago

L0G5 commented 6 years ago

Hello and thank you for this awesome tool. It seems that i have stuck somewhere or i am doing something wrong. I have been trying to encrypt this auto generated macro script VBA_original.txt by preparing it like this. VBA_prepared.txt However despite the success, image the resulted script looks like this VBA_result.txt with a compiling error. vba_error

So what am i missing here or doing wrong?

Pepitoh commented 5 years ago

Hi, Sorry for the response delay ;)

The problem is in the "trigger_function_name" which seems not be correctly set in your const.py, you should set it to "ahaa" that the script could understand this is the function it has to auto trigger.

In your VBA_result.txt, the VBA tries to autotrigger the function vLPLaMYjKLyKtLD which do not exist (as you probably forgot to mention it in your const.py), the error is legitimate from a VBA point of view.

Also, you can remove Sub AutoOpen() ahaa End Sub Sub Workbook_Open() ahaa End Sub Not usefull as it is directly dealed by Vbad.

Hope it helped.