Pepitoh / VBad

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

How to resolve "Can't create vba module..." error? #30

Closed doctor-yes closed 7 years ago

doctor-yes commented 7 years ago

I kept getting this error. What does it mean? image

I checked, the "Trust VBA Project object model" is on, there is no special char in function name... And a few questions:

  1. Why do we need a template doc file? Can we just obfuscate the vbs file and I can copy the code to the file I want (docm)? I wasn't sure what the template doc for so I create a blank doc. Could it be the problem?
  2. Is there a way to let the script automatically obfuscate every code in the target vbs file? I want to skip adding [] markdown as it is quite a lot of work for long vbs.
  3. following #2, does "trigger_function_name" mean everything after such function will be obfuscated? "After" is in the sense of code location in vbs?

Thanks!

Pepitoh commented 7 years ago

Hi doctor-yes,

Here are my answers :

I see this error a lot and I did not manage to find were it comes from( when trust VBA is checked). Just kill all winword.exe processes and try to launch the script (some times, 1 or 2 times). Access to vba modules crash sometimes when the process is already launched.

Why do we need a template doc file? Can we just obfuscate the vbs file and I can copy the code to the file I want (docm)? I wasn't sure what the template doc for so I create a blank doc. Could it be the problem? => This was the v0 of my tool, at the beggining, the script generated vbs file and you had to copy/paste into word document. This task was very time consuming, that what VBad comes for. The template files are used as model by the tool, vbs code is integrated directly into this document. By doing this, you are able to generated as many file as you want, and all of them will have a uniq signature. That is the main purpose of the tool. You can create a blank template, it should not be a problem.

Is there a way to let the script automatically obfuscate every code in the target vbs file? I want to skip adding [] markdown as it is quite a lot of work for long vbs. => Nop, markdown are the only way to randomize function and variable names. It can't done automatically. My opinion is that it would generated too many error in VBA if it's done automaticly. I prefere let user choose what he wants to obfuscate, but you can code this option if you want 😄

_following #2, does "trigger_functionname" mean everything after such function will be obfuscated? "After" is in the sense of code location in vbs? => Nop, trigger_function_name is just name of the function you want to Auto trigger in final generated files.

Pepitoh

Pepitoh commented 7 years ago

I'm closing the issue