12

Due to a change in procedure I need to update the code in an excel macro. The person that designed it has left the firm two years ago. While trying to revive it, I found out the macro project is password protected. I have been searching for a workaround for about two hours, my best bet was an older discussion on this board: Is there a way to crack the password on an Excel VBA Project?

Every single person that quotes an example uses this format:

CMG="..."
DPB="..."
GC="..."

Now here's my problem. When I load the file (it's .xla) in a hex editor, I see that the DPB-string is cut in two, not equal parts. Between the two parts I have a massive amount of other code and the classic jibberish. So if I want to replace the original string with the strings from my other easy password protected dummy macro, I have no idea what part of the string to put before, and what part after.

Here's what it looks like:

VersionCompatible32="393222000"
CMG="B9BB1563196319671D671D"
DPB="3C3E906990F1ADF1AD0E53F2ADA57F5232827697A774ECD098BDyNone<bh:9f>y<bh:10><bh:00>

[then comes a massive amount of irrelevant data] (notice the 'DyNone', no idea if that 'D' is part of the string, or part of 'DyNone')

<bh:00>uf_GetSQL<bh:03><bh:00><bh:00><bh:02><bh:09><bh:00><bh:00><bh:00>uf_VarSQL<bh:05><bh:00><bh:00><bh:02>86B8588665A975BB5916D296"
GC="BFBD13EA15EE99EF99EF99"

[Host Extender Info]
&H00000001={3832D640-CF90-11CF-8E43-00A0C911005A};VBE;&H00000000

Both parts are about halfway the file, but still a considerable large distance from eachother.

I've tried moving the second part after the first like this:

VersionCompatible32="393222000"
CMG="B9BB1563196319671D671D"
DPB="3C3E906990F1ADF1AD0E53F2ADA57F5232827697A774ECD098B86B8588665A975BB5916D296"
GC="BFBD13EA15EE99EF99EF99"

DyNone<bh:9f>

But then I get an 'unreadable content' error and the project is gone. Also, the above mentioned topic mentions a solution when your replacement string is shorter than the original. In my situation the cmg-string is 2 longer and the dpb-string one longer instead of shorter... So that's a second problem.

I realize I'm basically asking to help me 'crack' a file. I'll understand if questions like these are not allowed. In that case I know my new fall project.

Community
  • 1
  • 1
Timevdv
  • 174
  • 1
  • 1
  • 8

0 Answers0