Send email with attachment in PB 3.90

Just starting out? Need help? Post your questions and find answers here.
omid-xp
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Jan 27, 2004 2:17 pm

Send email with attachment in PB 3.90

Post by omid-xp »

I find one source code for send an email with attachment but that not work in new versions of PB and is very big .

It's :

Code: Select all



Global ConnectionID.l 
Global MailResponse.s 

;Example linked list 
NewList Attachments.s() 
InsertElement(Attachments()) 
Attachments() = "C:\Documents And Settings\User\Desktop\Image.jpg" 
;InsertElement(Attachments()) 
;Attachments() = "C:\Documents And Settings\User\Desktop\Archive.zip" 
;InsertElement(Attachments()) 
;Attachments() = "C:\Documents And Settings\User\Desktop\ObscureText.fff" 

;=============================================== 
;-PROCEDURES 
;=============================================== 

;Check to see if the file is binary 
Procedure IsBinary(File.s) 
    If ReadFile(0, File) 
        While Loc() <> Lof() 
            CurrentByte.b = ReadByte() 
            If CurrentByte <= 9 Or CurrentByte = 127 
                CloseFile(0) 
                ProcedureReturn 1 
            EndIf 
            If CurrentByte > 10 And CurrentByte < 13 
                CloseFile(0) 
                ProcedureReturn 1 
            EndIf 
            If CurrentByte > 13 And CurrentByte < 32 
                CloseFile(0) 
                ProcedureReturn 1 
            EndIf 
        Wend 
    EndIf 
EndProcedure 

;Find the MIME type for a given file extension 
Procedure.s GetMIMEType(Extension.s) 
    Extension = "." + Extension 
    hKey.l = 0 
    KeyValue.s = Space(255) 
    DataSize.l = 255 
    If RegOpenKeyEx_(#HKEY_CLASSES_ROOT, Extension, 0, #KEY_READ, @hKey) 
        KeyValue = "application/octet-stream" 
    Else 
        If RegQueryValueEx_(hKey, "Content Type", 0, 0, @KeyValue, @DataSize) 
            KeyValue = "application/octet-stream" 
        Else 
            KeyValue = Left(KeyValue, DataSize-1) 
        EndIf 
        RegCloseKey_(hKey) 
    EndIf 
    ProcedureReturn KeyValue 
EndProcedure 

;Send a piece of mail data 
Procedure SendMailData(msg.s) 
    SendNetworkData(ConnectionID, @msg, Len(msg)) 
EndProcedure 

;Check the server responses 
Procedure.s MailResponse() 
    MailResponse=Space(9999) 
    ReceiveNetworkData(ConnectionID,@MailResponse,9999) 
    MailResponse=Left(MailResponse,3) 
    ProcedureReturn MailResponse 
EndProcedure 

;Send the mail 
Procedure PBSendMail(RecipientEmailAddress.s, SenderEmailAddress.s, MailServerHost.s, Subject.s, message.s, AttachmentIncluded.b) 
    If InitNetwork() 
        ConnectionID = OpenNetworkConnection(MailServerHost, 25) 
        If ConnectionID <> 0 
            MailResponse() 
            If MailResponse = "220" 
                Index = FindString(MailServerHost, ".", 1) 
                MailServerDomain.s = Mid(MailServerHost, Index + 1, Len(MailServerHost)) 
                SendMailData("HELO "+MailServerDomain+Chr(13)+Chr(10)) 
                MailResponse() 
                If MailResponse="250" 
                    Sleep_(125) 
                    SendMailData("MAIL FROM: <"+SenderEmailAddress+">"+Chr(13)+Chr(10)) 
                    MailResponse() 
                    If MailResponse="250" 
                        SendMailData("RCPT TO: <"+RecipientEmailAddress+">"+Chr(13)+Chr(10)) 
                        MailResponse() 
                        If MailResponse="250" 
                            SendMailData("DATA"+Chr(13)+Chr(10)) 
                            MailResponse() 
                            If MailResponse="354" 
                                Sleep_(125) 
                                SendMailData("X-Mailer: PBSendMail v1.0" + Chr(13) + Chr(10)) 
                                SendMailData("To: " + RecipientEmailAddress + Chr(13) + Chr(10)) 
                                SendMailData("From: " + SenderEmailAddress + Chr(13) + Chr(10)) 
                                SendMailData("Reply-To:" + SenderEmailAddress + Chr(13) + Chr(10)) 
                                SendMailData("Date: " + FormatDate("%dd/%mm/%yyyy @ %hh:%ii:%ss", Date()) + Chr(13) + Chr(10)) 
                                SendMailData("Subject: " + Subject + Chr(13) + Chr(10)) 
                                SendMailData("MIME-Version: 1.0" + Chr(13) + Chr(10)) 
                                ;Handle any attachments 
                                If AttachmentIncluded 
                                    Debug "Processing 'multipart/mixed' Email..." 
                                    Boundry.s = "PBSendMailv1.0_Boundry_"+ FormatDate("%dd%mm%yyyy%hh%ii%ss", Date()) 
                                    SendMailData("Content-Type: multipart/mixed; boundary=" + Chr(34) + Boundry + Chr(13) + Chr(10) + Chr(34)) 
                                    SendMailData(Chr(13) + Chr(10)) 
                                    ;Main message 
                                    Debug "Processing Messsage..." 
                                    SendMailData("--" + Boundry + Chr(13) + Chr(10)) ; Boundry 
                                    SendMailData("Content-Type: text/plain; charset=" + Chr(34) + "iso-8859-1" + Chr(34) + Chr(13) + Chr(10)) 
                                    SendMailData("Content-Transfer-Encoding: 7bit" + Chr(13) + Chr(10)) 
                                    SendMailData(Chr(13) + Chr(10)) 
                                    Sleep_(125) 
                                    SendMailData(message + Chr(13) + Chr(10)) 
                                    SendMailData(Chr(13) + Chr(10)) 
                                    Sleep_(125) 
                                    Debug "Processing Attachments..." 
                                    ResetList(Attachments()) 
                                    While(NextElement(Attachments())) 
                                        ;Attachment headers 
                                        SendMailData("--" + Boundry + Chr(13) + Chr(10)) ; Boundry 
                                        SendMailData("Content-Type: " + GetMIMEType(GetExtensionPart(Attachments())) + "; name=" + Chr(34) + GetFilePart(Attachments()) + Chr(34) + Chr(13) + Chr(10)) 
                                        If IsBinary(Attachments()) 
                                            SendMailData("Content-Transfer-Encoding: base64" + Chr(13) + Chr(10)) 
                                            SendMailData("Content-Disposition: Attachment; filename=" + Chr(34) + GetFilePart(Attachments()) + Chr(34) + Chr(13) + Chr(10)) 
                                            SendMailData(Chr(13) + Chr(10)) 
                                            Sleep_(125) 
                                            ;Encode the Attachments using Base64 
                                            If ReadFile(0, Attachments()) 
                                                InputBufferLength.l = Lof() 
                                                If AllocateMemory(0, InputBufferLength, 0) 
                                                    OutputBufferLength.l = InputBufferLength + InputBufferLength/3 + 2 
                                                    If OutputBufferLength < 64 : OutputBufferLength = 64 : EndIf 
                                                    If AllocateMemory(1, OutputBufferLength, 0) 
                                                        ReadData(UseMemory(0), InputBufferLength) 
                                                        Base64Encoder(UseMemory(0), InputBufferLength, UseMemory(1), OutputBufferLength) 
                                                        SendMailData(PeekS(UseMemory(1), OutputBufferLength) + Chr(13) + Chr(10)) 
                                                        Debug GetFilePart(Attachments()) + " (base64) Encoded" 
                                                    Else 
                                                        Debug "ERROR: Unable to allocate memory for Bank 1 to process " + GetFilePart(Attachments()) 
                                                        ProcedureReturn 0 
                                                    EndIf 
                                                Else 
                                                    Debug "ERROR: Unable to allocate memory for Bank 0 to process " + GetFilePart(Attachments()) 
                                                    ProcedureReturn 0 
                                                EndIf 
                                            Else 
                                                Debug "ERROR: Unable to read file: " + GetFilePart(Attachments()) 
                                                ProcedureReturn 0 
                                            EndIf 
                                            CloseFile(0) : FreeMemory(0) : FreeMemory(1) 
                                        Else 
                                            SendMailData("Content-Transfer-Encoding: 7bit" + Chr(13) + Chr(10)) 
                                            SendMailData("Content-Disposition: Attachment; filename=" + Chr(34) + GetFilePart(Attachments()) + Chr(34) + Chr(13) + Chr(10)) 
                                            SendMailData(Chr(13) + Chr(10)) 
                                            Sleep_(125) 
                                            If ReadFile(0, Attachments()) 
                                                InputBufferLength.l = Lof() 
                                                If AllocateMemory(0, InputBufferLength, 0) 
                                                    ReadData(UseMemory(0), InputBufferLength) 
                                                    SendMailData(PeekS(UseMemory(0), InputBufferLength) + Chr(13) + Chr(10)) 
                                                    Debug GetFilePart(Attachments()) + " (7bit) Processed" 
                                                Else 
                                                    Debug "ERROR: Unable to allocate memory for Bank 0 to process " + GetFilePart(Attachments()) 
                      ProcedureReturn 0 
                                                EndIf 
                                            Else 
                                                Debug "ERROR: Unable to read file: " + GetFilePart(Attachments()) 
                  ProcedureReturn 0 
                                            EndIf 
                                        EndIf 

                                        Sleep_(125) 
                                        SendMailData(Chr(13) + Chr(10)) 
                                    Wend 
                                    SendMailData("--" + Boundry + "--" + Chr(13) + Chr(10)) ; End Boundry 
                                Else 
                                    Debug "Processing messsage..." 
                                    SendMailData("Content-Type: text/plain; charset=" + Chr(34) + "iso-8859-1" + Chr(34) + Chr(13) + Chr(10)) 
                                    SendMailData("Content-Transfer-Encoding: 7bit" + Chr(13) + Chr(10)) 
                                    SendMailData(Chr(13) + Chr(10)) 
                                    Sleep_(125) 
                                    SendMailData(message + Chr(13) + Chr(10)) 
                                EndIf 
                                Sleep_(125) 
                                SendMailData(Chr(13)+Chr(10)) 
                                SendMailData("."+Chr(13)+Chr(10)) 
                                MailResponse() 
                                If MailResponse="250" 
                                    Sleep_(125) 
                                    SendMailData("QUIT"+Chr(13)+Chr(10)) 
                                    MailResponse() 
                                    Debug "Mail sent successfully." 
                                    ProcedureReturn 1 
                                EndIf 
                            EndIf 
                        EndIf 
                    EndIf 
                EndIf 
            EndIf 
            CloseNetworkConnection(ConnectionID) 
        EndIf 
    EndIf 
EndProcedure 

;Testing: 
PBSendMail("theirmail@server.com", "yourmail@server.com", "smtp.server.com", "Subject Line", "Lorem Ipsum Dolar Sit Amet...", 0) 


Is Exist other smaller source code and worked for new versions of PB ?
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

It's all in the manual ... Perhaps you should read a little before posting :wink:

First, you have to update all the memory stuff :
For example, replace

Code: Select all

AllocateMemory(1, OutputBufferLength, 0) 
with

Code: Select all

*buffer = AllocateMemory(OutputBufferLength)
and so on ...

Second, this code cannot work with attachments > 64k because of PeekS().

Third, if you wish this code to work with all SMTP servers, do not send the base64 attachements in one part (even if < 64k) but in little parts.
omid-xp
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Jan 27, 2004 2:17 pm

Post by omid-xp »

Thanks gnozal but my real problem is not for changed commands or removed commands .

I know this source is not an good source for use in my app .

It have very problems and is very big.

I need to an smaller source code.

Can you or somebody help me for smaller code in sending email with attachment ?

Special Thanks .
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

This is more up to date version of the code above which can handle >64k attachments, but still needs updating to v3.90:
viewtopic.php?t=9775
I know this source is not an good source for use in my app .
It have very problems and is very big.
I need to an smaller source code.
Sending email with attachments doesn't get much smaller than that unless you use an exsisting solution. Try downloading the Blat.dll and use this:

Code: Select all

;===========================================================================
;-CONSTANTS
;===========================================================================

#MAXIMUM_ATTACHMENTS = 50
#SUCCESSFUL = 0

;===========================================================================
;-GLOBAL FLAGS / VARIABLES / STRUCTURES / ARRAYS
;===========================================================================

Structure MAILDETAILS
    RecipientEmailAddress.s
    SenderName.s
    SenderEmailAddress.s
    SMTPServer.s
    Subject.s
    Message.s
    Attachments.s[#MAXIMUM_ATTACHMENTS]
    SendAttachments.b ; #True of #False
    Priority.s
EndStructure

;===========================================================================
;-PROCEDURES
;===========================================================================

;Check if a file is binary
Procedure IsBinary(File.s)
    Protected CurrentByte.b
    If ReadFile(0, File)
        Repeat
            CurrentByte = ReadByte()
            If CurrentByte <= 9 Or CurrentByte = 127
                CloseFile(0)
                ProcedureReturn 1
            ElseIf CurrentByte > 10 And CurrentByte < 13
                CloseFile(0)
                ProcedureReturn 1
            ElseIf CurrentByte > 13 And CurrentByte < 32
                CloseFile(0)
                ProcedureReturn 1
            EndIf
        Until Loc() = Lof()
        ProcedureReturn 0
    Else
        MessageRequester("Error", "File does not exist or can not be opened:" + Chr(10) + File, #PB_MessageRequester_Ok)
        ProcedureReturn -1
    EndIf
EndProcedure

;Send the mail
Procedure SendMail(*MailDetails.MAILDETAILS)

    Protected EmailString.s
    Protected LongFileName.s
    Protected ShortFileName.s
    Protected Result.l

    Debug "================ MAIL ACCOUNT DETAILS ================="
    Debug "To: " + *MailDetails\RecipientEmailAddress
    Debug "From: " + *MailDetails\SenderName + " <" + *MailDetails\SenderEmailAddress + ">"
    Debug "SMTP Server: " + *MailDetails\SMTPServer
    Debug "Subject: " + *MailDetails\Subject
    Debug "Message: " + Left(*MailDetails\Message, 30) + "..."

    If *MailDetails\Priority = "0"
        Debug "Priority: Low"
    ElseIf *MailDetails\Priority = "1"
        Debug "Priority: High"
    Else
        Debug "Priority: Normal"
    EndIf
    Debug ""

    ;Loop through the attachments and list their filetypes
    If *MailDetails\SendAttachments = #TRUE
        Debug "===================  ATTACHMENTS ====================="
        For x.l = 0 To #MAXIMUM_ATTACHMENTS - 1
            If *MailDetails\Attachments[x] <> ""
                If IsBinary(*MailDetails\Attachments[x])
                    Debug *MailDetails\Attachments[x] + " [Binary]"
                Else
                    Debug *MailDetails\Attachments[x] + " [ACSII]"
                EndIf
            EndIf
        Next x
        Debug ""
    EndIf

    ;Compose the email string
    EmailString + "- -to "+ *MailDetails\RecipientEmailAddress
    EmailString + " -f " + *MailDetails\SenderEmailAddress
    EmailString + " -server " + *MailDetails\SMTPServer
    EmailString + " -subject " + Chr(34) + *MailDetails\Subject + Chr(34)
    EmailString + " -body " + Chr(34) + *MailDetails\Message + Chr(34)
    EmailString + " -priority " + *MailDetails\Priority
    ;Handle attachments
    If *MailDetails\SendAttachments = #TRUE
        For x.l = 0 To #MAXIMUM_ATTACHMENTS - 1
            If *MailDetails\Attachments[x]<> ""
                    LongFileName.s = *MailDetails\Attachments[x]
                    ShortFileName.s = Space(1024)
                    GetShortPathName_(LongFileName, ShortFileName, 1024)
                    EmailString + " -attach " + ShortFileName
            EndIf
        Next x
    EndIf
    ;Misc 
    EmailString + " -try 5"
    EmailString + " -ti 60"
    EmailString + " -noh2"
    EmailString + " -q"
    ;Send mail
    If OpenLibrary(1, "blat.dll")
        Result = CallFunction(1, "Send", EmailString)
        CloseLibrary(1)
        If Result = #SUCCESSFUL
            Debug "=============== MAIL SENT SUCCESSFULLY ==============="
            Debug ""
            ProcedureReturn 1
        Else
            Debug "================= ERROR SENDING MAIL ================="
            Debug ""
            ProcedureReturn Result
        EndIf
    Else
        MessageRequester("Error", "blat.dll' could not be found or opened.", #PB_MessageRequester_Ok)
    EndIf
EndProcedure

;===========================================================================
;-TEST
;===========================================================================

Account.MAILDETAILS

Account\RecipientEmailAddress = "them@isp.co.uk"
Account\SenderName = "Your Name"
Account\SenderEmailAddress = "You@isp.co.uk"
Account\SMTPServer = "smtp.isp.com"
Account\Subject = "Mailed from 'blat.dll'..."
Account\Message = "Lorem Ipsum Dolar Sit Amet..."
Account\SendAttachments = #TRUE
Account\Priority = "2" ; 0=Low, 1=High, 2=Normal
;Test with your own files here:
Account\Attachments[0] = "Test Attachments\mails.ico"
Account\Attachments[1] = "Test Attachments\mercury.jpg"
Account\Attachments[2] = "Test Attachments\StringHandling.pbi"

SendMail(@Account)

End
--Kale

Image
omid-xp
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Jan 27, 2004 2:17 pm

Post by omid-xp »

Kale Blat.dll is about 110 kb and is very bigger of my source :wink:

I say need smaller source code . but i think can't be smaller :roll:
omid-xp
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Jan 27, 2004 2:17 pm

Post by omid-xp »

I find this code for C++ programmers : ( Think its work better )

Code: Select all


#include <winsock2.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>


WSADATA W;
SOCKET Sock;
struct sockaddr_in Saddr;
int res,err;
unsigned long mask=127;
char text[1024];
HANDLE FileData;
DWORD nReadBytes;

const char base64[]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 
long base64encode(const char* FileName, char* buffer,unsigned  int length)
{
	
	unsigned char ReadData[57];
	unsigned char ResData[76];
	unsigned long p=0;
	unsigned long len=0;	
	unsigned long SourceLen=0;
	unsigned long CurResBufferPos=0;
	unsigned int j;
	unsigned char tmpchar;
	FileData=CreateFile(FileName,GENERIC_READ,FILE_SHARE_READ,0,OPEN_EXISTING,0,0);
	if(FileData==INVALID_HANDLE_VALUE) return 0;
	
	do
	{
		memset(ReadData,0,57);
		ReadFile(FileData,ReadData,57,&nReadBytes,NULL);
		if (nReadBytes==0) 
		{
			CloseHandle(FileData);
			return len;
		}
		j=0;
		SourceLen+=nReadBytes;
		for(unsigned int i=0;i<nReadBytes;i+=3)
		{
			
			p=ReadData[i+2]+ReadData[i+1]*256+ReadData[i]*65536;
			for(unsigned char i1=0;i1<3;i1++)
			{
				tmpchar=p;
				tmpchar<<=2;
				tmpchar>>=2;//
				ResData[j+3-i1]=tmpchar;
				p>>=6;
			}
			ResData[j]=p;
			j+=4;
		}

		len+=j+1;
		
		if(len<=length)//åñëè åñòü ìåñòî â áóôôåðå
		{
			for(unsigned char i1=0;i1<j;i1++)
			{
				buffer[CurResBufferPos+i1]=base64[ResData[i1]];
			}
			
			buffer[CurResBufferPos+j]='\n';
			CurResBufferPos+=j+1;
		}
		else return 0;
		

	}
	while(nReadBytes==57);

	
	char pad=(3-SourceLen%3)%3;
	while(pad>0)
	{
		buffer[CurResBufferPos-1-pad]='=';
		pad--;
	}
	CloseHandle(FileData);
	return len;
}


int main()
{
	
	char rcpt[50];
	char smtp[50];
	GetPrivateProfileString("Profile","to","cp@freenet.am",rcpt,50,"mailer.ini");
	GetPrivateProfileString("Profile","smtp","mail.aic.net",smtp,50,"mailer.ini");  
	
	printf("sending mail to %s , server: %s \n",rcpt,smtp);
	long size;
	char CodedData[150000];
 	size=base64encode("filename.exe",CodedData,150000);
	err = WSAStartup( 0x101, &W );
		if(err!=0) exit(1);

	Sock=socket(AF_INET,SOCK_STREAM,0);
	Saddr.sin_family=AF_INET;
	Saddr.sin_port=htons(25);
	hostent *H=gethostbyname(smtp);
	Saddr.sin_addr.s_addr=/*0x291743c2;*/ *((unsigned long *) H->h_addr);
	
	res=connect(Sock,(sockaddr*)&Saddr,sizeof(Saddr));
	if (res!=0) return false;
	printf("connected..\n");
	res=recv(Sock,text,1024,0);
	strcpy(text,"HELO yahoo.com\r\n");
	res=send(Sock,text,strlen(text),0);
	res=recv(Sock,text,1024,0);
	printf(" %s\n",text);
	strcpy(text,"MAIL FROM:cp@freenet.am \r\n");
	res=send(Sock,text,strlen(text),0);
	sprintf(text,"RCPT TO:%s \r\n",rcpt);
	res=send(Sock,text,strlen(text),0);
	res=recv(Sock,text,1024,0);
	printf(" %s\n",text);
	strcpy(text,"DATA\r\n");
	res=send(Sock,text,strlen(text),0);
	
	strcpy(text,"FROM: zombie@freenet.am\r\n");
	res=send(Sock,text,strlen(text),0);
	strcpy(text,"TO:\r\n");
	res=send(Sock,text,strlen(text),0);
	strcpy(text,"MESSAGE_ID:zzz \r\nSUBJECT:subj\r\n");
	res=send(Sock,text,strlen(text),0);



	send(Sock,"MIME-Version: 1.0\r\n",19,0);
	strcpy(text,"Content-Type: multipart/mixed; boundary=\"--------bound--\"\r\n");
	send(Sock,text,strlen(text),0);
	send(Sock,"\r\n",2,0);
	send(Sock,"----------bound--\r\n",19,0);
	strcpy(text,"Content-Type: text/plain; charset=us-ascii\r\nContent-Transfer-Encoding: 7bit\r\n");
	send(Sock,text,strlen(text),0);
	send(Sock,"\r\n",2,0);

	sprintf(text,"message_here");
	res=send(Sock,text,strlen(text),0);

	send(Sock,"----------bound--\r\n",19,0);
	strcpy(text,"Content-Type: application/x-msdownload; name=\"file.exe\"\r\nContent-Transfer-Encoding: base64\r\nContent-Disposition: attachment; filename=\"file.exe\"\r\n");

	res=send(Sock,text,strlen(text),0);
	send(Sock,"\r\n",2,0);

	if(size=base64encode("file.exe",CodedData,150000)) 
	{
		send(Sock,CodedData,size,0);
	}
	else send(Sock,"FAILED",6,0);

	send(Sock,"\r\n",2,0);

	send(Sock,"----------bound--\r\n",19,0);

	strcpy(text,"\r\n.\r\n");
	res=send(Sock,text,strlen(text),0);
	
	strcpy(text,"QUIT\r\n");
	res=send(Sock,text,strlen(text),0);
	res=recv(Sock,text,1024,0);      
	printf(" %s\n done..",text);
	closesocket(Sock);


	return 0;
}


Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

I find this code for C++ programmers : ( Think its work better )
looking at it and decoding it in my limited C++ knowlegde, it looks to be doing exactly the same as the above PB code, except doesnt support multiple file attachments and doesn't seem to check anything. :?:
--Kale

Image
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post by freedimension »

Wait a moment. Weren't you this guy who tried to write his own "Anti-Trojan"-SW with almost no knowledge about system-internas? And now you're looking for a very small code that is sending an email with attachements. For me, this is one more piece of the puzzle.

For your info: writing Viruses is a good way to make sure you will have to live on the level of social security for the rest of your life (meaning that you have to pay legal and reparation fees). Here in Germany two guys got caught, one for programming Sasser, the other for Phatbot, they will never again be on the sunny side of life - and hell, they were a lot smarter than you are.
sec
Enthusiast
Enthusiast
Posts: 792
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

Post by sec »

freedimension wrote:Here in Germany two guys got caught, one for programming Sasser, the other for Phatbot, they will never again be on the sunny side of life
i had read Worm boy lately
omid-xp
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Jan 27, 2004 2:17 pm

Post by omid-xp »

To Kale : right, i just think its better, sorry.

To freedimension : Always virus and worm programmers use of small codes in programing ?

So just virus programmers must use of Visual c++ language . its create very small exe files and very fast . it's true ? no always small code its one art of programmer and its very better for newbies in learning .

If one newbie work with one big source for one command he confusion in that source and can't learn of it and just for use work with it.

Newbies and other old users in this forums dont like this . users like learn newbies better , and newbies need to help of old users for start.


regard
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post by freedimension »

omid-xp wrote:To freedimension : Always virus and worm programmers use of small codes in programing ?
Asking for small code isn't suspicious in itself, but asking for
a) a way to hide programs in the Task Manager,
b) a way to send Attachements with a smallest possible binary,
c) a way to hide and show the Start Button,
d) a way to find out the title of other progs windows,
e) a way to bind other exe-files into a programm
f) ... and so on

This is what I call very suspicious. It's the big picture, you see?
Believe me, if ever there'll be a worm around here that's using one or another of the above mentioned techniques I'm the first to call the police. And also believe me, the traces you already left will suffice for catching you. I (and a lot more) can't wait to get 250.000 $ from M$. See my point?

If however my suspicion is false, then please proove it, show us your anti-trojan-prog or the better, show it to someone trusted within this community who then can stand surety for you. This way you will not have to fear that someone can steal your code.
Manolo
User
User
Posts: 75
Joined: Fri Apr 25, 2003 7:06 pm
Location: Spain

I Agree

Post by Manolo »

freedimension wrote:
omid-xp wrote:To freedimension : Always virus and worm programmers use of small codes in programing ?
Asking for small code isn't suspicious in itself, but asking for
a) a way to hide programs in the Task Manager,
b) a way to send Attachements with a smallest possible binary,
c) a way to hide and show the Start Button,
d) a way to find out the title of other progs windows,
e) a way to bind other exe-files into a programm
f) ... and so on

This is what I call very suspicious. It's the big picture, you see?
Believe me, if ever there'll be a worm around here that's using one or another of the above mentioned techniques I'm the first to call the police. And also believe me, the traces you already left will suffice for catching you. I (and a lot more) can't wait to get 250.000 $ from M$. See my point?

If however my suspicion is false, then please proove it, show us your anti-trojan-prog or the better, show it to someone trusted within this community who then can stand surety for you. This way you will not have to fear that someone can steal your code.
Return to the forum
Hi-Toro
Enthusiast
Enthusiast
Posts: 269
Joined: Sat Apr 26, 2003 3:23 pm

Post by Hi-Toro »

I have to agree. I'd even go so far as to suggest that people stop helping this guy, despite his pleas of 'help a newbie'. All of this appears to be one (tiny) step above 'script-kiddie' level.
James Boyd
http://www.hi-toro.com/
Death to the Pixies!
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

you can't stop virus writers, i have no problems if omid-xp spills the beans and shares his code in here, anti virus companies will love it, and fred will share the rewards with us...
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
dell_jockey
Enthusiast
Enthusiast
Posts: 767
Joined: Sat Jan 24, 2004 6:56 pm

Post by dell_jockey »

I second James.
cheers,
dell_jockey
________
http://blog.forex-trading-ideas.com
Post Reply