Imports System.IO
Imports Ionic.Zip
Imports System.Threading
Public Class Form1
Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
Dim zipFilePath As String = "C:\Users\Administrator\Desktop\2\1.zip" ' 压缩包文件路径
Dim passwordDictPath As String = "C:\Users\Administrator\Desktop\2\mm.txt" ' 密码字典文件路径
Dim passwords As List(Of String) = ReadPasswordsFromFile(passwordDictPath)
Dim correctPassword As String = TryUnlockWithPasswords(zipFilePath, passwords)
If correctPassword <> "" Then
MessageBox.Show("密码匹配成功,正确密码是:" & correctPassword)
Else
MessageBox.Show("所有密码尝试均失败,未找到正确密码。")
End If
End Sub
Function ReadPasswordsFromFile(ByVal filePath As String) As List(Of String)
Dim passwords As New List(Of String)
Try
Using reader As New StreamReader(filePath)
Dim line As String
While Not reader.EndOfStream
line = reader.ReadLine()
passwords.Add(line)
End While
End Using
Catch ex As Exception
MessageBox.Show("读取密码文件时发生错误: " & ex.Message)
End Try
Return passwords
End Function
Function TryUnlockWithPasswords(ByVal zipPath As String, ByVal passwords As List(Of String)) As String
Try
Using zip As ZipFile = ZipFile.Read(zipPath)
For Each password As String In passwords
zip.Password = password
TextBox1.Text &= "正在尝试密码:" & password & vbNewLine ' 将正在尝试的密码显示在文本框中
TextBox1.Refresh() ' 刷新文本框以立即显示新添加的内容
Thread.Sleep(10) ' 延时 0.01 秒,可根据需要调整时长
If ZipFile.CheckZipPassword(zipPath, password) Then
Return password
End If
Next
End Using
Catch ex As Exception
MessageBox.Show("尝试解锁时发生错误: " & ex.Message)
End Try
Return ""
End Function
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim i, j As Integer
Dim a() As String = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}
For i = 0 To 9
For j = 0 To 9
TextBox1.Text = TextBox1.Text & a(i) & a(j) & vbCrLf
Next
Next
End Sub
End Class
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
压缩包文件密码恢复软件源代码QZQ.zip (37个子文件)
ARCHPR密码恢复软件源代码QZQ
2.sln 845B
排列组合程序代码.txt 1KB
mm.txt 398B
2.suo 18KB
2代码.txt 3KB
2
2.vbproj.user 143B
Form1.Designer.vb 3KB
My Project
Settings.Designer.vb 3KB
Application.myapp 510B
Resources.Designer.vb 3KB
AssemblyInfo.vb 1KB
Application.Designer.vb 1KB
Settings.settings 279B
Resources.resx 5KB
obj
x86
Release
Debug
_2.Resources.resources 180B
2.xml 639B
DesignTimeResolveAssemblyReferencesInput.cache 6KB
2.exe 23KB
TempPE
My Project.Resources.Designer.vb.dll 8KB
_2.Form1.resources 180B
2.vbproj.FileListAbsolute.txt 697B
2.vbproj.GenerateResource.Cache 975B
2.pdb 46KB
DesignTimeResolveAssemblyReferences.cache 3KB
2.vbprojResolveAssemblyReference.cache 11KB
Form1.vb 3KB
bin
Release
Debug
2.vshost.exe 11KB
._cache_2.vshost.exe 11KB
2.xml 639B
2.vshost.exe.manifest 490B
2.exe 23KB
2.pdb 46KB
DotNetZip.dll 461KB
2.vbproj 5KB
Form1.resx 6KB
1.zip 281KB
DotNetZip.dll 461KB
共 37 条
- 1
资源评论
EasySoft易软
- 粉丝: 4000
- 资源: 1365
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- java实现的贪吃蛇小游戏.zip学习资料
- [] - 2024-10-09 IC虚拟机2024及资料分享.html
- Delphi 12 控件之DynaDynaPDF 4.0.94.265.rar
- PHP开源商城系统源码带搭建教程数据库 MySQL源码类型 WebForm
- Delphi 12 控件之FastReport VCL Enterprise v2024.1 for Delphi 10.4-12 Athens with Source Code.7z
- Java实现的扫雷游戏.zip学习资源代码
- Delphi 12 控件fmxlinux1.78.exe
- C#ASP.NET广告合同备案源码数据库 SQL2008源码类型 WebForm
- 智谱文生视频+图生视频接口调用
- OSPF协议V10-03
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功