Friday, July 4, 2014

Crack Microsoft Excel Password Free | Excel 2007, 2010, 2013

Nguồn

It is always annoying when forgetting passwords. It is also annoying when you inherit a document from a previous employee and it is protected by a password only they knew. But your boss asked for you to get the data from that spreadsheet and change some things and Right now! What are you going to do?

Well the good news is that if the document isn’t encrypted, this process is pretty straightforward. You will be up and running in no time! AND you don’t have to spend $40 on some software you will use only once.

If you need to crack a Word Document as well, check out my Crack Microsoft Word Password Free post.
Crack Microsoft Excel Password Instructions

These instructions cover the process of breaking edit/read only protection on Microsoft Excel workbooks and worksheets. This WILL NOT work on Excel files that have been encrypted.

Disclaimer:
There can be a number of reasons for breaking password protection on an Excel file. Before we start, please note that I take zero responsibility for the results of these instructions. You are the master of your own actions and by proceeding, you take full responsibility of your own actions.
Step 1: Make a Backup of Your File

You will be making changes to the internal structure of your document. It is good practice to create backups before starting.
Step 2: Check your file format
This will only work on Excel files that are 2007, 2010, 2013 and have “.xlsx, .xlsm” formats. If your document is in an older format “.xls” from Excel 2003 or older, open in Excel 2007, 2010, or 2013 and save as an “.xlsx file”. If your excel file has macros, save as an “.xlsm” file to enable macros.
Step 3: Disassemble your Document

Because the .xlsx file format is based on a tree structure with XML files, it is easy to disassemble. For this example, I protected both the individual worksheet and workbook on my sample excel file. We will break this protection by changing some settings in the file.

For the disassembly process, the main file compression utility in windows will work just fine. For the first part of this demo, I am using WinRAR (Free to download). If you can’t install WinRAR, please scroll down to see the alternate disassembly process using the Windows built-in file compression tool.

Disassembly with WinRAR:
  1. Open WinRAR and click the File menu.
  2. Select Open archive.
  3. Set the file type at the bottom from “all archives” to “all files”.
  4. Locate your Excel file and click “Open”
  5. Step 4: Remove Password Protection

The root view of the excel file structure:The files you are going to edit are in the xl folder that is circled in red.

For Workbook(whole excel file) Settings:
xl>workbook.xml

For Individual Worksheet File Settings:
xl>worksheets>sheet1.xml [sheet2.xml] – etc…
Make your Changes

Browse to xl>workbook.xml and double click on the file. If you are prompted to select an application, always select NOTEPAD – NOT WORDPAD!

If you are unfamiliar with XML, this might look strange. Find the line that looks like:
1
2
3
4
5
6
<workbookProtection 
workbookAlgorithmName="SHA-512" 
workbookHashValue="/PqWjbsJjvF9ZfuAX/9rSOHijK4Q==" 
workbookSaltValue="BNztIxbaEJpw7IvcclH28g==" 
workbookSpinCount="100000" 
lockStructure="1"/>
Change lockStructure=”1″ to lockStructure=”0″
Save and Close the XML file you just edited

WinRAR will tell you that “workbook.xml” was modified and ask you to update it in the archive. Select YES.Browse to xl>worksheets>sheet1.xml(or sheet2, sheet3, etc…) and double click on the file.

Delete the whole line that looks like:
1
2
3
4
5
6
7
<sheetProtection algorithmName="SHA-512" 
hashValue="p10u4BneUg3eT/wBlxTIvojOqTuf18kg==" 
saltValue="pOCHLgXP+8NSbHK89LmgGQ==" 
spinCount="100000" 
sheet="1" 
objects="1" 
scenarios="1"/>
Save and Close the XML file you just edited

When prompted to update the archive with the file you just modified, select YES.

Close out of WinRAR and Open your file.

NOTE: If you are using Excel 2010, the following buttons may need to be clicked on to “unstick” them:

Once unstuck, you should now be able to edit the document as you please.

Alternate Disassembly Instructions – Windows Archive Tool

By default, file extensions are hidden for common document types. You will need to change your folder settings to show file extensions.

Here are some instructions that should cover Windows XP, Vista and Windows 7:

http://windows.microsoft.com/en-us/windows/show-hide-file-name-extensions#show-hide-file-name-extensions=windows-vista

Once you can see the file extension of your Excel Document file, change the file extension from .xlsx, .xlsm to .zip – after the change, you will get a warning that you are changing the extension. Click OK or YES to accept.

Now that your file is in a .zip format, right-click on your file and select Open With>Windows Explorer

Click “Extract all Files”, select your file destination and click “Extract”
Remove Excel File Password Protection

Refer to Step 4 above for changes
Make your changes, save your files and move to the next step
Alternate Instructions for Reassembly
  1. Select all your files (_rels,docProps,xl,[Content_Types].xml, etc…), right-click and select: Send to>Compressed (zipped) folder. If you create your archive by selecting your main folder and not all of the files, you may run into errors when re-opening.
  2. Change the file extension of your archive back to the original – .xlsx, .xlsm. When prompted to confirm changing the file extension, select yes.
  3. You should be able to open your fixed excel file. NOTE: your new filename will be whatever file you right-clicked on to create the archive. Feel free to change it back.

unhide sheet ấn trong excel


Trong Excel không có tính năng Unhide tất cả những Sheet đang đặt ẩn , nhưng bạn vẫn muốn làm thế nào để thực hiện được việc này ?

Cách thức như sau

Mở file Excel đang có nhiều Sheet đang đặt ẩn mà bạn muốn Unhide cùng một lúc .

Bấm tổ hợp Alt-F11 để mở cửa sổ Microsoft Visual Basic .

Bấm menu Insert > Module , bạn copy nội dung bên dưới
Sub UnhideAllSheets()
Dim wsSheet As Worksheet
For Each wsSheet In ActiveWorkbook.Worksheets
wsSheet.Visible = xlSheetVisible
Next wsSheet
End Sub
Quay trở lại Excel và chạy macro có tên gọi UnhideAllSheets

Tuy nhiên vì một lí do nào đó bạn muốn Unhide từng Sheet bạn cần chọn thì sử dụng đoạn mã bên dưới
Sub UnhideSomeSheets()
Dim sSheetName As String
Dim sMessage As String
Dim Msgres As VbMsgBoxResult
For Each wsSheet In ActiveWorkbook.Worksheets
If wsSheet.Visible = xlSheetHidden Then
sSheetName = wsSheet.Name
sMessage = "Ban co muon Unhide sheet nay khong ?" _
& vbNewLine & sSheetName
Msgres = MsgBox(sMessage, vbYesNo)
If Msgres = vbYes Then wsSheet.Visible = xlSheetVisible
End If
Next wsSheet
End Sub

Thursday, July 3, 2014

Cách phá Pass Protect sheet trong Excel



Yêu cầu hệ thống:
  1. Có MS Office
  2. Có cài VBA, nếu bạn không biết nó là gì, hãy thử mở excel, xong ấn Alt+F11, nếu nó mở ra cửa sổ Microsoft Visual Basic tức đã cài VBA, nếu nó không ra thì hãy chạy lại bộ cài MS Office, chọn update, xong tìm trong nhóm cuối cùng của các gói cài đặt sẽ thấy nó.Sau khi đã chuẩn bị đầy đủ đồ chơi, tiếp theo thực hiện các bước sau:
  3. Mở file excel cần mở khoá lên
  4. Ấn Alt+F11 để mở VBA
  5. Ấn F7 để mở cửa sổ soạn thảo mã nguồn
  6. Dán đoạn code bên dưới vào cửa sổ vừa mở ra đó
  7. Ấn F5, hoặc vào menu Run\Run Sub/User form để chạy đoạn mã này
  8. Nếu ấn F5 mà nó yêu cầu lựa chọn Macroname thì chọn SheetXXX.unprotectedAll rồi click Run nó sẽ chạy
  9. Chờ từ một đến vài phút (tuỳ tốc độ CPU từng máy tính) sẽ có thông báo sheet đã được unprotect. Mỗi khi một sheet được unprotected thành công, bạn sẽ nhận được thông báo, nhớ nhấn Ok để nó unprotect sheet tiếp theo nhé. Nếu không muốn nhận được thông báo này, bạn chỉ cần xoá 3 dòng mã từ dòng 50 đến dòng 54 là xong.
Sub unprotectedAll() Dim i As Integer
For i = 1 To Application.Sheets.Count PasswordBreaker Application.Sheets(i) Next
End Sub
Sub PasswordBreaker(MySheet)
Dim pass As String
If MySheet.ProtectContents = False Then
MsgBox "Sheet '" & MySheet.Name & "' is unprotected!", vbInformation
Else
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
pass = Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)


MySheet.Unprotect pass
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
If MySheet.ProtectContents = False Then
MsgBox "Sheet '" & MySheet.Name & "' is unprotected!", vbInformation
End If
End If
End Sub