Just figured out that this mod only works with mail addresses up to 33 chars. Any longer addresses aren't decrypted (or encrypted) correctly.
Any ideas how to change that?
Here the code from StealthMail.pl
sub MailTo {
if($username eq "Guest") { &fatal_error("$txt{'223'}"); }
my $mailusername = $INFO{'user'};
my $mailcrypted = $INFO{'mail_id'};
$truemail = &descramble($mailcrypted,$mailusername);
print "Content-Type: text/html\n\n";
$refresh = qq~<html>\n<head>\n
<script>
var tik=0
function timer() {
window.setTimeout("timer()", 2000)
tik=tik+1
if(tik==2){
window.close()
}
}
</script>
</head>\n
<body Onload = document.location="mailto:$truemail">\n
<font face="Arial" size="2">$txt{'stealth'}</font>\n
<script language="JavaScript1.2" type="text/javascript">\n
timer();
</script>
</body></html>\n~;
print $refresh;
}
sub scramble{
my ($input) =$_[0];
my ($user,$ascii,$key,$hex,$hexkey,$x);
$key = substr($date,length($date)-2,2);
$hexkey = uc(unpack("H2", pack("I", $key)));
$x=0;
for($n=0; $n < length $input ; $n++) {
$ascii = substr($input, $n, 1);
$ascii = ord($ascii)+$key-$n;
$hex = uc(unpack("H2", pack("I", $ascii)));
$user .= $hex;
$x++;
if ($x > 32){$x = 0;}
}
$user .= $hexkey;
return $user;
}
sub descramble{
my ($input) =$_[0];
my ($user,$ascii,$key,$dec,$hexkey,$x);
$hexkey = substr($input,length($input)-2,2);
$key = hex($hexkey);
$x=0;
for($n=0; $n < length($input)-2; $n++) {
$dec = substr($input, $n, 2);
$ascii = hex($dec);
$ascii = chr($ascii-$key+$x);
$user .= $ascii;
$n++;
$x++;
if ($x > 32){$x = 0;}
}
return $user;
}
1;