excel2007如何使用代码破解密码?

编辑: 凉堇年♀
巴兔手游盒子
GM盒子(高返利版)
GM手游福利平台,免费送首充,上线送VIP,免费领元宝和代金券。
立即下载   精品合集

  想知道excel2007如何使用代码破解密码吗?忘记密码的时候你们知道该怎么破解密码吗?下面就一起来看看吧。

 excel2007表格设密码忘记的打开方法

  1. 打开需要破解密码的Excel

  2. 按Alt+F11进入VBA编辑界面

  3. 插入 -- 模块(Module)

  4. 在右边Module的空白编辑区域,复制粘贴下面所有内容

  5. F5,运行该VBA命令

  ---------------------(下面的内容在第四步复制进去)-------------------------

  Option Explicit

  Public Sub AllInternalPasswords()

  \' Breaks worksheet and workbook structure passwords. Bob McCormick

  \' probably originator of base code algorithm modified for coverage

  \' of workbook structure / windows passwords and for multiple passwords

  \'

  \' Norman Harker and JE McGimpsey 27-Dec-2002 (Version 1.1)

  \' Modified 2003-Apr-04 by JEM: All msgs to constants, and

  \' eliminate one Exit Sub (Version 1.1.1)

  \' Reveals hashed passwords NOT original passwords

  Const DBLSPACE As String = vbNewLine & vbNewLine

  Const AUTHORS As String = DBLSPACE & vbNewLine & _

  "Adapted from Bob McCormick base code by" & _

  "Norman Harker and JE McGimpsey"

  Const HEADER As String = "AllInternalPasswords User Message"

  Const VERSION As String = DBLSPACE & "Version 1.1.1 2003-Apr-04"

  Const REPBACK As String = DBLSPACE & "Please report failure " & _

  "to the microsoft.public.excel.programming newsgroup."

  Const ALLCLEAR As String = DBLSPACE & "The workbook should " & _

  "now be free of all password protection, so make sure you:" & _

  DBLSPACE & "SAVE IT NOW!" & DBLSPACE & "and also" & _

  DBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & _

  DBLSPACE & "Also, remember that the password was " & _

  "put there for a reason. Don\'t stuff up crucial formulas " & _

  "or data." & DBLSPACE & "Access and use of some data " & _

  "may be an offense. If in doubt, don\'t."

  Const MSGNOPWORDS1 As String = "There were no passwords on " & _

  "sheets, or workbook structure or windows." & AUTHORS & VERSION

  Const MSGNOPWORDS2 As String = "There was no protection to " & _

  "workbook structure or windows." & DBLSPACE & _

  "Proceeding to unprotect sheets." & AUTHORS & VERSION

  Const MSGTAKETIME As String = "After pressing OK button this " & _

  "will take some time." & DBLSPACE & "Amount of time " & _

  "depends on how many different passwords, the " & _

  "passwords, and your computer\'s specification." & DBLSPACE & _

  "Just be patient! Make me a coffee!" & AUTHORS & VERSION

  Const MSGPWORDFOUND1 As String = "You had a Worksheet " & _

  "Structure or Windows Password set." & DBLSPACE & _

  "The password found was: " & DBLSPACE & "$$" & DBLSPACE & _

  "Note it down for potential future use in other workbooks by " & _

  "the same person who set this password." & DBLSPACE & _

  "Now to check and clear other passwords." & AUTHORS & VERSION

  Const MSGPWORDFOUND2 As String = "You had a Worksheet " & _

  "password set." & DBLSPACE & "The password found was: " & _

  DBLSPACE & "$$" & DBLSPACE & "Note it down for potential " & _

  "future use in other workbooks by same person who " & _

  "set this password." & DBLSPACE & "Now to check and clear " & _

  "other passwords." & AUTHORS & VERSION

  Const MSGONLYONE As String = "Only structure / windows " & _

  "protected with the password that was just found." & _

  ALLCLEAR & AUTHORS & VERSION & REPBACK

  Dim w1 As Worksheet, w2 As Worksheet

  Dim i As Integer, j As Integer, k As Integer, l As Integer

  Dim m As Integer, n As Integer, i1 As Integer, i2 As Integer

  Dim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer

  Dim PWord1 As String

  Dim ShTag As Boolean, WinTag As Boolean

  Application.ScreenUpdating = False

  With ActiveWorkbook

  WinTag = .ProtectStructure Or .ProtectWindows

  End With

  ShTag = False

  For Each w1 In Worksheets

  ShTag = ShTag Or w1.ProtectContents

  Next w1

  If Not ShTag And Not WinTag Then

  MsgBox MSGNOPWORDS1, vbInformation, HEADER

  Exit Sub

  End If

  MsgBox MSGTAKETIME, vbInformation, HEADER

  If Not WinTag Then

  MsgBox MSGNOPWORDS2, vbInformation, HEADER

  Else

  On Error Resume Next

  Do \'dummy do loop

  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

  With ActiveWorkbook

  .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 .ProtectStructure = False And _

  .ProtectWindows = False Then

  PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _

  Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _

  Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)

  MsgBox Application.Substitute(MSGPWORDFOUND1, _

  "$$", PWord1), vbInformation, HEADER

  Exit Do \'Bypass all for...nexts

  End If

  End With

  Next: Next: Next: Next: Next: Next

  Next: Next: Next: Next: Next: Next

  Loop Until True

  On Error GoTo 0

  End If

  If WinTag And Not ShTag Then

  MsgBox MSGONLYONE, vbInformation, HEADER

  Exit Sub

  End If

  On Error Resume Next

  For Each w1 In Worksheets

  \'Attempt clearance with PWord1

  w1.Unprotect PWord1

  Next w1

  On Error GoTo 0

  ShTag = False

  For Each w1 In Worksheets

  \'Checks for all clear ShTag triggered to 1 if not.

  ShTag = ShTag Or w1.ProtectContents

  Next w1

  If ShTag Then

  For Each w1 In Worksheets

  With w1

  If .ProtectContents Then

  On Error Resume Next

  Do \'Dummy do loop

  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

  .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 Not .ProtectContents Then

  PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _

  Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _

  Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)

  MsgBox Application.Substitute(MSGPWORDFOUND2, _

  "$$", PWord1), vbInformation, HEADER

  \'leverage finding Pword by trying on other sheets

  For Each w2 In Worksheets

  w2.Unprotect PWord1

  Next w2

  Exit Do \'Bypass all for...nexts

  End If

  Next: Next: Next: Next: Next: Next

  Next: Next: Next: Next: Next: Next

  Loop Until True

  On Error GoTo 0

  End If

  End With

  Next w1

  End If

  MsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADER

  End Sub

  ---------------------(上面的内容在第四步复制进去)-------------------------

  然后就会弹出如上图所示提示,the password found was:AAABBAABBBB6就是密码.快去看看这个excel是不是已经可以修改/复制等操作了。

  以上就是excel2007使用代码破解密码的方法,希望可以帮助到大家。

相关推荐
最新软件
最新教程
1.6290
基本信息
SQL
$_GET
$_POST
$_COOKIE
包含文件
自动加载
  1. 模型: /www/wwwroot/www.pjwan.com/lecms/model/
  2. 视图: /www/wwwroot/www.pjwan.com/view/m/jc_show.htm
  3. 控制器: /www/wwwroot/www.pjwan.com/lecms/control/show_control.class.php
  4. 日志目录: /www/wwwroot/www.pjwan.com/log/
  5. 当前页面: /www/wwwroot/www.pjwan.com/index.php
  6. 当前时间: 2026-08-19 13:37:59
  7. 当前网协: 216.73.216.186
  8. 请求路径: /rjjc/86201.html
  9. 运行时间: 1.6290
  10. 内存开销: 1.1 MB
  1. #0 [time:0.0004s] SELECT * FROM le_runtime WHERE k='cfg' LIMIT 1
  2. #1 [time:0.0002s] SELECT * FROM le_runtime WHERE k='website_group_m_pjwan_com' LIMIT 1
  3. #2 [time:0.0003s] SELECT id FROM le_website_group WHERE webdomain='m.pjwan.com' AND is_active=1 ORDER BY id ASC LIMIT 0,1
  4. #3 [time:0.0003s] SELECT id FROM le_website_group WHERE webdomain='m.pjwan.com' AND is_active=1 ORDER BY id ASC LIMIT 0,1
  5. #4 [time:0.0003s] SELECT id FROM le_website_group WHERE webdomain='m.pjwan.com' AND is_active=1 ORDER BY id ASC LIMIT 0,1
  6. #5 [time:0.0003s] SELECT * FROM le_runtime WHERE k='cate_67' LIMIT 1
  7. #6 [time:0.0002s] SELECT id FROM le_website_group WHERE webdomain='m.pjwan.com' AND is_active=1 ORDER BY id ASC LIMIT 0,1
  8. #7 [time:0.0003s] SELECT * FROM le_cms_article WHERE id=86201 LIMIT 1
  9. #8 [time:0.0002s] SELECT id FROM le_website_group WHERE webdomain='m.pjwan.com' AND is_active=1 ORDER BY id ASC LIMIT 0,1
  10. #9 [time:0.0002s] SELECT id FROM le_website_group WHERE webdomain='m.pjwan.com' AND is_active=1 ORDER BY id ASC LIMIT 0,1
  11. #10 [time:0.0003s] SELECT * FROM le_user WHERE uid=2 LIMIT 1
  12. #11 [time:0.0003s] SELECT * FROM le_cms_article_data WHERE id=86201 LIMIT 1
  13. #12 [time:0.0003s] SELECT * FROM le_cms_article_views WHERE id=86201 LIMIT 1
  14. #13 [time:0.0004s] UPDATE LOW_PRIORITY le_cms_article_views SET views=views+1 WHERE id=86201 LIMIT 1
  15. #14 [time:0.0002s] SELECT * FROM le_kv WHERE k='navigate' LIMIT 1
  16. #15 [time:0.0002s] SELECT * FROM le_kv WHERE k='le_sharejs' LIMIT 1
  17. #16 [time:0.0003s] SELECT tagid,id FROM le_cms_article_tag_data WHERE tagid=3029 ORDER BY id DESC LIMIT 0,6
  18. #17 [time:0.0003s] SELECT * FROM le_cms_article_tag_data WHERE tagid=3029 AND id=100457 OR tagid=3029 AND id=100272 OR tagid=3029 AND id=100001 OR tagid=3029 AND id=99795 OR tagid=3029 AND id=99788 OR tagid=3029 AND id=99738
  19. #18 [time:0.0004s] SELECT * FROM le_cms_article WHERE id=100457 OR id=100272 OR id=100001 OR id=99795 OR id=99788
  20. #19 [time:0.0002s] SELECT * FROM le_runtime WHERE k='cate_1' LIMIT 1
  21. #20 [time:0.0002s] SELECT id FROM le_website_group WHERE webdomain='m.pjwan.com' AND is_active=1 ORDER BY id ASC LIMIT 0,1
  22. #21 [time:0.0003s] SELECT id FROM le_cms_pcsoft WHERE (cid=3 OR cid=4 OR cid=5 OR cid=6 OR cid=7 OR cid=8 OR cid=9 OR cid=10 OR cid=11 OR cid=12 OR cid=13) ORDER BY id DESC LIMIT 0,8
  23. #22 [time:0.0004s] SELECT * FROM le_cms_pcsoft WHERE id=681 OR id=680 OR id=679 OR id=678 OR id=677 OR id=676 OR id=675 OR id=674
  24. #23 [time:0.0002s] SELECT * FROM le_user WHERE uid=1 LIMIT 1
  25. #24 [time:0.0002s] SELECT id FROM le_cms_article WHERE cid=67 ORDER BY id DESC LIMIT 0,5
  26. #25 [time:0.0003s] SELECT * FROM le_cms_article WHERE id=103563 OR id=103562 OR id=103561 OR id=103560 OR id=103559
  1. #control => show
  2. #action => index
  3. #cid => 67
  4. #id => 86201
  5. #mid => 2
    1. #acw_tc => 0819529e17871178466354400ed04baca1d1e54448f36068a6b15cf3a7
    2. #PHPSESSID => 0cnm3ig5au5hm1fki6qp4l9d2t
    3. #cdn_sec_tc => 0819529e17871178466354400ed04baca1d1e54448f36068a6b15cf3a7
    1. #0 /www/wwwroot/www.pjwan.com/index.php
    2. #1 /www/wwwroot/www.pjwan.com/lecms/xiunophp/xiunophp.php
    3. #2 /www/wwwroot/www.pjwan.com/lecms/config/config.inc.php
    4. #3 /www/wwwroot/www.pjwan.com/lecms/xiunophp/lib/base.func.php
    5. #4 /www/wwwroot/www.pjwan.com/lecms/xiunophp/lib/core.class.php
    6. #5 /www/wwwroot/www.pjwan.com/lecms/xiunophp/lib/debug.class.php
    7. #6 /www/wwwroot/www.pjwan.com/lecms/xiunophp/lib/log.class.php
    8. #7 /www/wwwroot/www.pjwan.com/lecms/xiunophp/lib/model.class.php
    9. #8 /www/wwwroot/www.pjwan.com/lecms/xiunophp/lib/view.class.php
    10. #9 /www/wwwroot/www.pjwan.com/lecms/xiunophp/lib/control.class.php
    11. #10 /www/wwwroot/www.pjwan.com/lecms/xiunophp/db/db.interface.php
    12. #11 /www/wwwroot/www.pjwan.com/lecms/xiunophp/db/db_pdo_mysql.class.php
    13. #12 /www/wwwroot/www.pjwan.com/lecms/xiunophp/cache/cache.interface.php
    14. #13 /www/wwwroot/www.pjwan.com/lecms/xiunophp/cache/cache_memcache.class.php
    15. #14 /www/wwwroot/www.pjwan.com/lecms/xiunophp/ext/network/Network__interface.php
    16. #15 /www/wwwroot/www.pjwan.com/lecms/config/plugin.inc.php
    17. #16 /www/wwwroot/www.pjwan.com/lecms/plugin/editor_sd/conf.php
    18. #17 /www/wwwroot/www.pjwan.com/lecms/plugin/editor_tinymce/conf.php
    19. #18 /www/wwwroot/www.pjwan.com/lecms/plugin/editor_um/conf.php
    20. #19 /www/wwwroot/www.pjwan.com/lecms/plugin/le_adminer/conf.php
    21. #20 /www/wwwroot/www.pjwan.com/lecms/plugin/le_baidu_zz/conf.php
    22. #21 /www/wwwroot/www.pjwan.com/lecms/plugin/le_category_filter/conf.php
    23. #22 /www/wwwroot/www.pjwan.com/lecms/plugin/le_content_tag_url/conf.php
    24. #23 /www/wwwroot/www.pjwan.com/lecms/plugin/le_data_table_split/conf.php
    25. #24 /www/wwwroot/www.pjwan.com/lecms/plugin/le_drafts/conf.php
    26. #25 /www/wwwroot/www.pjwan.com/lecms/plugin/le_feedback/conf.php
    27. #26 /www/wwwroot/www.pjwan.com/lecms/plugin/le_homepage_feign/conf.php
    28. #27 /www/wwwroot/www.pjwan.com/lecms/plugin/le_html_cache/conf.php
    29. #28 /www/wwwroot/www.pjwan.com/lecms/plugin/le_links/conf.php
    30. #29 /www/wwwroot/www.pjwan.com/lecms/plugin/le_minganci_do/conf.php
    31. #30 /www/wwwroot/www.pjwan.com/lecms/plugin/le_rand404content/conf.php
    32. #31 /www/wwwroot/www.pjwan.com/lecms/plugin/le_rand_author/conf.php
    33. #32 /www/wwwroot/www.pjwan.com/lecms/plugin/le_rand_pic_cid/conf.php
    34. #33 /www/wwwroot/www.pjwan.com/lecms/plugin/le_sharejs/conf.php
    35. #34 /www/wwwroot/www.pjwan.com/lecms/plugin/le_slide/conf.php
    36. #35 /www/wwwroot/www.pjwan.com/lecms/plugin/le_special_pro/conf.php
    37. #36 /www/wwwroot/www.pjwan.com/lecms/plugin/le_spider/conf.php
    38. #37 /www/wwwroot/www.pjwan.com/lecms/plugin/le_super_sitemap/conf.php
    39. #38 /www/wwwroot/www.pjwan.com/lecms/plugin/le_title_pic/conf.php
    40. #39 /www/wwwroot/www.pjwan.com/lecms/plugin/le_use_del_id/conf.php
    41. #40 /www/wwwroot/www.pjwan.com/lecms/plugin/le_webp_oss/conf.php
    42. #41 /www/wwwroot/www.pjwan.com/lecms/plugin/le_website_group/conf.php
    43. #42 /www/wwwroot/www.pjwan.com/lecms/plugin/le_zhanqunsitemaps_pro_v303/conf.php
    44. #43 /www/wwwroot/www.pjwan.com/lecms/plugin/lu_huochetou/conf.php
    45. #44 /www/wwwroot/www.pjwan.com/lecms/plugin/models_filed/conf.php
    46. #45 /www/wwwroot/www.pjwan.com/lecms/plugin/qrcode/conf.php
    47. #46 /www/wwwroot/www.pjwan.com/lecms/plugin/sy_mobile/conf.php
    48. #47 /www/wwwroot/www.pjwan.com/runcache/misc.func.php
    49. #48 /www/wwwroot/www.pjwan.com/runcache/core_lang/zh-cn.php
    50. #49 /www/wwwroot/www.pjwan.com/runcache/lang/zh-cn.php
    51. #50 /www/wwwroot/www.pjwan.com/runcache/lecms_control/parseurl_control.class.php
    52. #51 /www/wwwroot/www.pjwan.com/runcache/lecms_model/runtime_model.class.php
    53. #52 /www/wwwroot/www.pjwan.com/runcache/lecms_model/website_group_model.class.php
    54. #53 /www/wwwroot/www.pjwan.com/runcache/lecms_control/show_control.class.php
    55. #54 /www/wwwroot/www.pjwan.com/runcache/lecms_control/base_control.class.php
    56. #55 /www/wwwroot/www.pjwan.com/runcache/lecms_model/urls_model.class.php
    57. #56 /www/wwwroot/www.pjwan.com/runcache/lecms_model/category_model.class.php
    58. #57 /www/wwwroot/www.pjwan.com/runcache/lecms_model/cms_content_model.class.php
    59. #58 /www/wwwroot/www.pjwan.com/runcache/lecms_view/m,jc_show.htm.php
    60. #59 /www/wwwroot/www.pjwan.com/runcache/lecms_model/cms_content_data_model.class.php
    61. #60 /www/wwwroot/www.pjwan.com/runcache/lecms_model/cms_content_tag_model.class.php
    62. #61 /www/wwwroot/www.pjwan.com/runcache/lecms_model/user_model.class.php
    63. #62 /www/wwwroot/www.pjwan.com/runcache/lecms_model/cms_content_views_model.class.php
    64. #63 /www/wwwroot/www.pjwan.com/runcache/lecms_model/kv_model.class.php
    65. #64 /www/wwwroot/www.pjwan.com/runcache/lecms_model/cms_content_tag_data_model.class.php
    66. #65 /www/wwwroot/www.pjwan.com/lecms/xiunophp/ext/utf8.class.php
    67. #66 /www/wwwroot/www.pjwan.com/lecms/xiunophp/tpl/sys_trace.php
    1. #0 utf8 类