On Thursday 18 July 2002 03:51 CET Kenneth Porter wrote:
> On Wed, 2002-07-17 at 16:10, Malte S. Stretz wrote:
> > Very nice!
> >
> > On my website [1] I have a public e-mail address which is created every
> > time you visit a page and contains date, time and IP of the visit. Now,
> > finally, I got some spam on some of those dummy addresses.
>
> Cool! Can you share that code with the list? I'd love to add a trap like
> that to my site.

Currently there isn't much code behind that thing; my (working) contact 
address on my website is just in the format
  prefix-<date>T<time>I<ip>@domain
It's generated by the attached PHP script which is included with
  require('generate/mail.php')

I use those addresses very much, every time when I need to register with my 
email address at a site I don't trust (or even which I trust but don't want 
to give my address).

These addresses always have the format
  prefix-unique_part@domain
The prefix I chose is either throwaway or (short) ta. Hmmm... I think I once 
wrote some BNF to describe the format of unique_part... Jepp, got it, 
attached it :)

I decided to wrap this stuff into a reusable package some time ago but 
didn't have the time. Currently I'm working on a feature to compress and 
encipher the unique_part; it often gets too long for some web forms and 
it's pretty easy for the spammers to detect the uniqe id. A script which 
decodes the unique_part and puts some headers into the mail is on it's way, 
too.

I'm just afraid that I have to choose a different name than "MailTrack" for 
this package; seems like there [2] is a spamhouse out there which has a 
trademark on this name. Think I'll call it "MailTag" :).

Malte

[2]http://www.mailtrack.com

-- 
-- Coding is art.
-- 

<?php
$PREFIX = 'throwaway';
$DOMAIN = $GLOBALS['_SERVER']['SERVER_NAME'];

$date   = gmdate('Ymd');
$time   = gmdate('His');

$ip     = $GLOBALS['_SERVER']['REMOTE_ADDR'];
$decip  = explode('.', $ip);
$decip  = $decip[0] * 0x1000000 + $decip[1] * 0x10000 + $decip[2] * 0x100 + $decip[3] 
* 0x1;

echo $PREFIX . '-' . $date . 'T' . $time . 'I' . sprintf('%010s', $decip) . '@' . 
$DOMAIN;
?>
; v0.3 2001-10-31

address       = address-type1 / address-type2

address-type1 = prefix delim unique "@" domain
address-type2 = unique "@" prefix "." domain


prefix        = 1*(ALPHA / DIGIT)
delim         = "-" / "!" / "%"
              / "_" / "|" / "&"
              / "=" / "?" / "~"
              / "+" / "*" / "#"
domain        = <domain according to RFC 822>

unique        = date ["T" time] ["I" ip] ( ["L" location]
                                         / ["C" comment]
                                         / ["R" random-part]
                                         / [["X"] index]] )


date          = ( 4DIGIT / 2DIGIT) [ 2DIGIT 2DIGIT ]
time          = 2DIGIT 2DIGIT [ 2DIGIT ]

ip            = ipv4 / ipv6
ipv4          = 1*3DIGIT 3("." 1*3DIGIT)
              / 10DIGIT                          ; max 2^32 - 1 = 4294967295
ipv6          = 1*4HEXDIGIT 7("." 1*4HEXDIGIT)
              / (               "."   1*7("." 1*4HEXDIGIT)
                / 1(1*4HEXDIGIT ".") (1*6("." 1*4HEXDIGIT) / ".")
                / 2(1*4HEXDIGIT ".") (1*5("." 1*4HEXDIGIT) / ".")
                / 3(1*4HEXDIGIT ".") (1*4("." 1*4HEXDIGIT) / ".")
                / 4(1*4HEXDIGIT ".") (1*3("." 1*4HEXDIGIT) / ".")
                / 5(1*4HEXDIGIT ".") (1*2("." 1*4HEXDIGIT) / ".")
                / 6(1*4HEXDIGIT ".") (  1("." 1*4HEXDIGIT) / ".")
                / 7(1*4HEXDIGIT ".")                         "." )
              / 38DIGIT                          ; max 2^128 - 1 = very much
              
location      = string
comment       = string
random-part   = string
index         = 2DIGIT


string        = <equals local-part in RFC 822>

ALPHA         = <ALPHA as in RFC 822>
DIGIT         = <DIGIT as in RFC 822>
HEXDIGIT      = DIGIT
              / "a" / "b" / "c" / "d" / "e" / "f"
              / "A" / "B" / "C" / "D" / "E" / "F"

Reply via email to