Jump to content
php.lv forumi

E-mail no php ar pielikumu


Klez

Recommended Posts

paņem kādu TheBat, aizsūti pats sev mailu un paskaties maila _sourcus_. Visbūtiskākais - noteikt pareizu Content-Type un unikālu boundary stringu, ar kuru tad atdalāms texts no attachmentiem. Faila saturs nolasāms bināri un nokodējams pēc base 64 (pierasti). Te man reku nāk vīruss:

 

Return-Path: <...@navigator.lv>

Delivered-To: hello.lv-...@hello.lv

Received: (qmail 7802 invoked from network); 25 Feb 2004 19:47:06 -0000

Received: from unknown (HELO hello.lv) (80.233.142.221)

by balodis.latnet.lv with SMTP; 25 Feb 2004 19:47:06 -0000

From: ...@navigator.lv

To: ...@hello.lv

Subject: hello

Date: Wed, 25 Feb 2004 21:48:27 +0200

MIME-Version: 1.0

Content-Type: multipart/mixed; boundary="00660181"

 

--00660181

Content-Type: text/plain; charset=us-ascii

Content-Transfer-Encoding: 7bit

 

//te ir texts

 

I have your password!

 

//taalaakais boundary piemineejums "iesleedz" jaunu mailas sadaļu, šeit - zip fails.

 

--00660181

Content-Type: application/x-zip-compressed; name="location.zip"

Content-Transfer-Encoding: base64

Content-Disposition: attachment; filename="location.zip"

 

UEsDBAoAAAAAAA2eWTBdbrAiAFYAAABWAAAMAAAAbG9jYXRpb24ucGlmTVqQAAMAAAAEAAAA

...

DAAAAAAAAAAAACAAAAAAAAAAbG9jYXRpb24ucGlmUEsFBgAAAAABAAEAOgAAACpWAAAAAA==

 

--00660181--

 

mails izbeidzas. Par to pasaka '--' aiz noslēdzošā boundary stringa.

Link to comment
Share on other sites

×
×
  • Create New...