0 оценок0% нашли этот документ полезным (0 голосов)
13 просмотров1 страница
This macro provides a brute force method to discover the password for a protected Excel sheet. It systematically tries all possible 6 character combinations of letters and numbers to uncover the password. The macro contains nested for loops that iterate through all character combinations to build the potential password strings. It then attempts to unprotect the active sheet with each password candidate until it finds the correct one, at which point a message box displays the discovered password.
This macro provides a brute force method to discover the password for a protected Excel sheet. It systematically tries all possible 6 character combinations of letters and numbers to uncover the password. The macro contains nested for loops that iterate through all character combinations to build the potential password strings. It then attempts to unprotect the active sheet with each password candidate until it finds the correct one, at which point a message box displays the discovered password.
This macro provides a brute force method to discover the password for a protected Excel sheet. It systematically tries all possible 6 character combinations of letters and numbers to uncover the password. The macro contains nested for loops that iterate through all character combinations to build the potential password strings. It then attempts to unprotect the active sheet with each password candidate until it finds the correct one, at which point a message box displays the discovered password.
CODIGO MACRO PARA DESBLOQUEAR HOJAS CON CONTRASEÑA
Sub Descubrir_contraseña() Dim a As Integer, b As Integer, c As Integer Dim d As Integer,
e As Integer, f As Integer Dim a1 As Integer, a2 As Integer, a3 As Integer Dim a4 As Integer, a5 As Integer, a6 As Integer On Error Resume Next For a = 65 To 66: For b = 65 To 66: For c = 65 To 66 For d = 65 To 66: For e = 65 To 66: For a1 = 65 To 66 For a2 = 65 To 66: For a3 = 65 To 66: For a4 = 65 To 66 For a5 = 65 To 66: For a6 = 65 To 66: For f = 32 To 126 Contraseña = Chr(a) & Chr(b) & Chr(c) & Chr(d) & Chr(e) & Chr(a1) _ & Chr(a2) & Chr(a3) & Chr(a4) & Chr(a5) & Chr(a6) & Chr(f) ActiveSheet.Unprotect Contraseña If ActiveSheet.ProtectContents = False Then MsgBox "¡Enorabuena!" & vbCr & "La contraseña es:" & vbCr & Contraseña Exit Sub End If Next: Next: Next: Next: Next: Next Next: Next: Next: Next: Next: Next End Sub