Two Methods to Crack Encrypted VBA Code
Two Methods to Crack Encrypted VBA Code source : https://www.cnblogs.com/vbashuo/p/15638693.html Method 1 Sub VBAPassword1() 'Path of the Excel file you want to unprotect Filename = Application.GetOpenFilename("Excel files (*.xls & *.xla & *.xlt),*.xls;*.xla;*.xlt", , "VBA Crack") If Dir(Filename) = "" Then MsgBox "File not found, please reselect." Exit Sub Else FileCopy Filename, Filename & ".bak" 'Backup file. End If Dim GetData As String * 5 Open Filename For Binary As #1 Dim CMGs As Long Dim DPBo As Long For i = 1 To LOF(1) Get #1, i, GetData If GetData = "CMG=""" Then CMGs = i If GetData = "[Host" Then DPBo = i - 2: Exit For Next If CMGs = 0 Then MsgBox "Please set a protection password for the VBA project first...", 32, "Notice" Exit Sub End If ...
Comments
Post a Comment