破解压缩密码的程序
来源:互联网 发布:翻墙软件 自由 编辑:程序博客网 时间:2024/05/21 07:53
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics;using System.Collections;namespace _7ZipEx{ class CUnZip { //private string[] NumStrArr = {"0","1","2","3","4","5","6","7","8","9"}; private string[] NumStrArr =null; private string fileName; /// <summary> /// ファイル名 /// </summary> public string FileName { get { return fileName; } set { fileName = value; } } private string unZipPath; /// <summary> /// unzipPath /// </summary> public string UnZipPath { get { return unZipPath; } set { unZipPath = value; } } private string cmdName; /// <summary> /// コマンド名 /// </summary> public string CmdName { get { return cmdName; } set { cmdName = value; } } private int flag; /// <summary> /// 1:7z 2:winrar /// </summary> public int Flag { get { return flag; } set { flag = value; } } private int stopFlag; public int StopFlag { get { return stopFlag; } set { stopFlag = value; } } /// <summary> /// 検索用配列初期化 /// </summary> /// string[] NumStrArr = { "0", "1", "2", "3", "4", "5", "6","7","8","9" }; /// string[] NumStrArr2 = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j","k","l","m", /// "n","o","p","q","r","s","t","u","v","w","x","y","z"}; /// <param name="_NumStrArr">検索用配列</param> public CUnZip(string[] _NumStrArr) { NumStrArr = _NumStrArr; } private int numbers; //最大長さ public int Numbers { get { return numbers; } set { numbers = value; } } ProcessStartInfo the_StartInfo = new ProcessStartInfo(); System.IO.StreamWriter fw = null; /// <summary> /// /// </summary> /// <param name="baseData"></param> /// <param name="dataNum"></param> /// <param name="serchArr"></param> /// <returns></returns> public string ZipProcess() { string retPss = null; the_StartInfo.FileName = CmdName; the_StartInfo.WindowStyle = ProcessWindowStyle.Hidden; the_StartInfo.RedirectStandardOutput = false; using (fw = new System.IO.StreamWriter("d:\\temp.txt", true)) { retPss = PassTest(); } return retPss; } /// <summary> /// pass のテスト開始 /// </summary> /// <returns></returns> private string PassTest() { string strBase = ""; string retPass = null ; //从第一个字符向后a[0]->a[n] for (int i = 0; i < NumStrArr.Length; i++) { if (StopFlag == 1) { break; } //第一个字符向后a[0]->a[n]作为基准 strBase = NumStrArr[i]; // fw.WriteLine(strBase); //fw.Write(strBase + ","); //基准字符出力 int ret = TryUnZip(CmdName, fileName, unZipPath, strBase); if (ret == 0) { return strBase; } //递归第一个字符的所有匹配 if ((retPass = ProcessPassTest(strBase)) != null) { return retPass; } } return null; } /// <summary> /// /// </summary> /// <param name="baseData">"0","1","2","3"...</param> /// <param name="baseBack">元</param> /// <returns></returns> private string ProcessPassTest(string baseData) { string strBase = ""; string retStr = null; for (int i = 0; i < NumStrArr.Length; i++) { if (StopFlag == 1) { break; } //00 -> 09 strBase = baseData + NumStrArr[i]; if (strBase.Length > Numbers) { break; ; } //fw.Write(strBase+","); //fw.WriteLine(strBase); int ret = TryUnZip(CmdName, fileName, unZipPath, strBase); if (ret == 0) { return strBase; } //"00"-> "09" if ((retStr = ProcessPassTest(strBase)) != null) { return retStr; } } return null; } /// <summary> /// unzip /// </summary> /// <param name="CmdName">执行命令名(winrar,7z)</param> /// <param name="zipPath"></param> /// <param name="unZipPath"></param> /// <param name="password"></param> /// <param name="Flag">1:7z 2:winrar</param> private int TryUnZip(string CmdName, string zipPath, string unZipPath, string password) { int ret = -1; // the_StartInfo.Arguments = " x " + zipPath + " -p150 -o" + unZipPath; string argument = ""; //7z if (flag == 1) { argument = String.Format(" x {0} -p{1} -aoa -o{2}", zipPath, password, unZipPath); } //winrar else { } the_StartInfo.Arguments = argument; using (Process the_Process = new Process()) { the_Process.StartInfo = the_StartInfo; the_Process.Start(); the_Process.WaitForExit(); ret = the_Process.ExitCode; the_Process.Close(); } return ret; } }}
- 破解压缩密码的程序
- 密码破解小程序的编写
- 轻易破解压缩包密码
- 轻易破解压缩包密码
- 压缩包密码破解软件
- 破解压缩包密码方法
- 破解密码验证程序
- [转载]RAR压缩包密码破解原理
- java编的一个access2000密码破解程序
- 破解EXCEL2007的密码
- 破解WindowsXP的密码
- 破解EXCEL2007的密码
- pdf 密码的破解
- 密码破解的原理
- 密码的破解思路
- Python压缩解压缩zip文件及破解zip文件密码的方法
- 逆向破解程序脱壳篇-压缩壳
- Excel VBA工程密码破解程序
- hdu 1556(线段树)
- C++内存管理
- Android image 文件系统
- WCF - 安全(Security)
- 黑马程序员---集合框架(Collection)和泛型
- 破解压缩密码的程序
- python核心编程6-14习题的解题思路
- RAKNET内核 - BitStream在游戏中的高级概念和使用例子
- SOJ3600 Balanced Interval
- android MediaPlayer音频播放demo
- [数字信号处理] FIR滤波器基础
- 素材
- 用过SDE连接,添加数据集Dataset
- UINavigationController 改变返回按钮标题