NYCPHP Meetup

NYPHP.org

[nycphp-talk] worm/virus's hammering feedback scripts?POLISHEDVERSION

Hans Zaunere lists at zaunere.com
Fri Sep 23 07:36:56 EDT 2005



matthijs abeelen scribbled on Thursday, September 15, 2005 2:04 AM:
> This problem is spreading very fast, a good summery of the best
> solution(s) is needed indeed. Unfortunately, I'm not the one who can
> do that. Waiting eagerly for the article on Phundamentals!  
> 
> "We're working on getting a Phundamentals article online covering the
> discussion over the last couple of days.  Thanks Roland and everyone
> for their feedback and discussion."

We're working on it.

And I've attached what a first stab at a PHP 5 class would look like, with
example usage here:

$MyMail = new MailProtect;
$MyMail->SetFrom($_POST['From']);
$MyMail->SetTo($_POST['To']);
$MyMail->SetCc('admin at somwhere.com');
$MyMail->SetSubject($_POST['Subject']);
$MyMail->SetBody('Thank you for your submission!');

if( $MyMail->SendMail() === TRUE )
    echo 'Mail Sent';
else
    echo 'WARNING: Header validation failed; possible exploitation attempt';


Feel free to play around with the code, but I've never executed it, so there
might even be a parse error, or it might just not work, and obviously more
could be added or extended to it.  So consider that my disclaimer :)


---
Hans Zaunere / President / New York PHP
   www.nyphp.org  /  www.nyphp.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: MailProtect.inc
Type: application/octet-stream
Size: 2141 bytes
Desc: not available
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20050923/ba3c5b75/attachment.obj>


More information about the talk mailing list