Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not defined Sub or Function #34

Closed
zeal0t35 opened this issue Aug 3, 2017 · 5 comments
Closed

Not defined Sub or Function #34

zeal0t35 opened this issue Aug 3, 2017 · 5 comments

Comments

@zeal0t35
Copy link

zeal0t35 commented Aug 3, 2017

After generate the files, this message popups when i open the .doc

imagen

upload the vbas and the const.py
const.py.txt
orignal_vba.txt
original_vba_prepared.txt

Please help me.
Thanks in advice

@Pepitoh
Copy link
Owner

Pepitoh commented Aug 4, 2017

Hi,

Just keep your "Debugging()" function in original_vba_prepared.txt:
original_vba_prepared (1).txt

You should delete references to Autoopen or Document_open() function in your prepared vba, VBAd will automaticly included good autopen function related to the document you are creating, it sometimes messes up when you try to add others autotrigger function.

Try this and let met know if it works.

Pepitoh.

@zeal0t35
Copy link
Author

zeal0t35 commented Aug 4, 2017

Thanks Pepitoh,
I've deleted all references to the AutoOpen and DocumentOpen. In fact i've used the txt you uploaded.
Then generate file OK,
imagen
but same error is rising.
imagen

@zeal0t35
Copy link
Author

zeal0t35 commented Aug 4, 2017

UPDATE: I've changed the powershell to another (in txt file attached), and now getting this error.

imagen

original_vba_prepared.txt

Thanks.

@Pepitoh
Copy link
Owner

Pepitoh commented Aug 11, 2017

hi @zeal0t35,

So there are many problems relative to your issue, I manage to, I think, fix them all :

  • First of all I think you misunderstood the markdown implemented for VBad. In your first file, you are for example trying to randomize Dim :
    [rdm::15]Dim str As string
    Of course, it will cause a crash in your final VBA, you cannot randomize VBA native code, you can only apply rdm to variable or function name. The good way to use it will be :
    Dim [rdm::15]str as String
    After that, you put exclusion marquers ([!!]) evrywhere in your prepared VBA which makes no sense (unless you want no obfucstion at all, in this case why are you using VBad for 😁). Exclusion marquer should be used inside of a string you don't want to obfsucate. Example :
    [rdm::15]str = "Powershel[!!]" not [rdm::15] str = [!!]"powershll" which will have no kind of effect. That is for the first file you sent.
  • For the second file, the error is because you try to add too long continious string on a VBA document. You need to split it many line (as you did on the first file) in order to make it work.
  • Finaly, I also find out that VBad is not very Antivirus compatible 😕, sometimes, modules are not created because they are deleted by antivirus at creation of the file, try to disable alll you antivirus and try again (it works for me). Disable also hidding module function -by setting delete_module_name = 0in const.py for debugginf more easily

Hope it helps, you can find a prepared_vba of your vba code that works perfectly on my laptop :
original_vba_prepared.txt

Pepitoh.

@zeal0t35
Copy link
Author

Pepitoh:
Thank you very much for your reply. Clear as the water 👍
Saludos,
zeal0t

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants