MD5 查询工具(四十站联查)
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, OleCtrls, SHDocVw, StdCtrls, ExtCtrls; type TForm1 = class(TForm) Memo1: TMemo; WebBrowser1: TWebBrowser; Edit1: TEdit; Button1: TButton; Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; procedure Button1Click(Sender: TObject); procedure WebBrowser1DocumentComplete(ASender: TObject; const pDisp: IDispatch; var URL: OleVariant); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} uses MSHTML; var {hash list} HashList:TStrings; HashNum:Integer; { 分割字符串的函数 } procedure Split(const str: string; const c: Char; var List: TStrings); begin List.Clear; List.Delimiter := c; List.DelimitedText := str; end; {批量破解循环函数} procedure ListCrack(); begin if HashNum < HashList.Count then begin Form1.Memo1.Lines.Add('[ ' + IntToStr(HashNum + 1) + '/' + IntToStr(HashList.Count) + ' Cracking ' + HashList[HashNum] + ' ]'); Form1.Label2.Caption := 'Mental arithmetic ... '; Form1.WebBrowser1.Navigate('http://www.hashchecker.de/hash.cgi?action=check&tempsite=findsidebar&wert=2&hash=' + HashList[HashNum]); end; end; { 网页加载完成后触发的事件 } procedure TForm1.WebBrowser1DocumentComplete(ASender: TObject; const pDisp: IDispatch; var URL: OleVariant); var n: Integer; ResultNum: Integer; WebSource: String; List: TStrings; begin { 初始化结果计数器 } ResultNum := 0; { 获取网页源码 } WebSource := WebBrowser1.OleObject.document.documentelement.innerHtml; // Memo1.Lines.Add(WebSource); { 干扰字符替换 } WebSource := StringReplace(WebSource, ' ', '', [rfReplaceAll]); WebSource := StringReplace(WebSource, '<FONTcolor=red>notfound</FONT>', '', [rfReplaceAll]); WebSource := StringReplace(WebSource, '<FONTcolor=green>false', '', [rfReplaceAll]); WebSource := StringReplace(WebSource, '<FONTcolor=green>', '$Result$', [rfReplaceAll]); WebSource := StringReplace(WebSource, '</FONT></B></SMALL></', '$', [rfReplaceAll]); { 提取密码 } List := TStringList.Create; Split(WebSource, '$', List); { 显示结果 } Memo1.Lines.Add('Hash : ' + HashList[HashNum]); for n := 1 to List.Count - 1 do begin if List[n] = 'Result' then begin Memo1.Lines.Add('Result : ' + List[n + 1]); ResultNum := ResultNum + 1; end; end; List.Free; {结果为空的话} if ResultNum = 0 then begin Memo1.Lines.Add('Hash Can''t Crack'); Label2.Caption := 'Done!' end else begin Label2.Caption := 'Done!'; end; {破解下一个} HashNum := HashNum + 1; ListCrack(); end; procedure TForm1.Button1Click(Sender: TObject); var n:Integer; begin HashList := TStringList.Create; Split(Edit1.Text, ',', HashList); for n := 0 to HashList.Count - 1 do begin Memo1.Lines.Add('[ ' + IntToStr(n) + ' ] ' + HashList[n]); end; {批量破解} HashNum := 0; ListCrack(); end; end.