Macworld Forums: Breaking Passwords - Macworld Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Breaking Passwords

#1 User is offline   John_Galt_Esq Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 26
  • Joined: 23-April 03

Posted 03 October 2003 - 10:42 AM

Anyone have a free, shareware software that can break the password for an Excel file? I swear that it is mine, butfor some reason, the same password I have been using for years suddenly became incorrect according to Excel. The file is not so important that I would pay for the software, but if there is free stuff out there...
Thanks in advance.
0

#2 User is offline   shades Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 344
  • Joined: 28-June 02

Posted 03 October 2003 - 01:19 PM

You might try this:
--------------------
Sub PasswordBreaker()

' Breaks worksheet password protection.

Dim intPress As Integer
intPress = MsgBox("Preparing to disable your password...",
vbQuestion + vbOKCancel, "Password Breaker")

Dim i As Integer, j As Integer, k As Integer
Dim l As Integer, m As Integer, n As Integer
Dim i1 As Integer, i2 As Integer, i3 As Integer
Dim i4 As Integer, i5 As Integer, i6 As Integer

On Error Resume Next

For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126

ActiveSheet.Unprotect Chr(i) & Chr(j) & Chr(k) &

Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) &
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)

If ActiveSheet.ProtectContents = False Then

MsgBox "OK, your password has been disabled. Try not to forget it again...", 0, "Password Breaker"

' MsgBox "One usable password is " & Chr(i) & Chr(j) &

Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)

Exit Sub

End If

Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next

End Sub
0

#3 User is offline   John_Galt_Esq Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 26
  • Joined: 23-April 03

Posted 03 October 2003 - 01:51 PM

Forgive my ignorance, but how do I use this code.
0

#4 User is offline   shades Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 344
  • Joined: 28-June 02

Posted 03 October 2003 - 03:02 PM

You have to place this in the Visual Basic Editor. Go to Tools > Macro > VBE Editor. This will bring up the Visual Basic window. You should have Project Explorer on the left that will indicate which workbook you are using. If you want this available all the time, then you will have to put it into your Personal Macro Workbook.xls.

Once you have selected the workbook on the left, then go to the menu select Insert > Module. There should be a window appear on the right side. Copy this code and paste into that window. If the sheet you want to use it on is already the active sheet in Excel, you can press the F5 key to activate and run it. If you want to see it work step by step (could be a long process!!), then click the F8 key.

If you don't have the Personal Macro Workbook.xls you can get one very easily. Go back to Excel, start the macro recorder, enter some word in a cell and stop the recorder. That will have created your Personal Macro Workbook.xls. It remains hidden unless you want to edit some VBA code. To Unhide, go to Windows > Unhide and you will see it. Once it is unhidden, then you can add or edit macros/VBA. Remember that when you are finished, you have to hide the Personal Macro Workbook (with that workbook active, Windows > Hide). You can also activate the VBE editor by pressing OPTION + F11. When you close Excel it will ask if you want to save changes to Personal macro Workbook. If you do, then click Yes, otherwise No. If you click no, any changes you made to macros/VBA during the current session will not be saved.
0

#5 User is offline   car1son Icon

  • Veteran
  • PipPipPip
  • Group: Members
  • Posts: 1,349
  • Joined: 30-August 01

Posted 03 October 2003 - 06:15 PM

If the password is on the entire Excel file, not just the Worksheet protection option, there are a lot of Windows apps for cracking Word & Excel file password protection, though I've never seen one that runs on a Mac (without resorting Virtual PC). Mac and Windows .xls file passwording is compatible, so they should work on Mac Office files. Type "excel password cracker" into Google and pick your poison.

(Aside to shades: thanks for that VB script. Very interesting.)
0

#6 User is offline   shades Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 344
  • Joined: 28-June 02

Posted 03 October 2003 - 06:49 PM

I think this illustrates a key point about passwords. They are effective to keep the casual user from messing with the layout and information. However, they do not ensure security at all.
In fact, if it's only data that you want to recover from a file that is password protected, you can Select All, copy and paste in a new workbook. Ta-da! Now you have all the data and formulas without any password protection.
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

3 User(s) are reading this topic
0 members, 3 guests, 0 anonymous users