PDA

View Full Version : Getting the webmaster's email from a code hack


mup_cow
06-18-2003, 03:32 PM
Hello,

I am writing a custom hack (a separate php file adopted from sendtofriend.php) and I would like to be able to access the Webmaster's email from the "Vbulletin Options" area in the admin cp. What is the variable for this?

Thanks for the tip.

What I am writing is a hack to convert all email addresses posted on the forum into a link to a sendmail form. I am hoping this will avoid those email addresses from being harvested. Currently I simply change the address from

name@domain.com into name @ domain . com do you think this is enough to fool the harvester?

MUG
06-18-2003, 03:44 PM
If you are using global.php, $webmasteremail will be defined.
Today at 12:32 PM mup_cow said this in Post #1 (https://vborg.vbsupport.ru/showthread.php?postid=410379#post410379)
name@domain.com into name @ domain . com do you think this is enough to fool the harvester? Probably not, the harvesters are getting smarter. :(

mup_cow
06-18-2003, 03:49 PM
ok I suppose user at domain dot com has also been included in their algorithm?

Any suggestions? Perhaps just simply "click here to send email" would be a sure fire way but I'd still like to be able to tell people what the real email address is in case if they want to add it to their addr book etc.

What do you think?

I will try webmasteremail thanks :) so simple when you know it.

Gary King
06-18-2003, 04:04 PM
How about an input button? I'll post the code in a bit.

Gary King
06-18-2003, 04:07 PM
Use <input type="button" value="$email" onClick="parent.location='mailto:$email'"> and replace $email with whatever the email addresses are (the vars for them).

mup_cow
06-18-2003, 04:15 PM
wouldn't that get parsed by the harvester too ? They simply search for the email@pattern.com and won't care whether it is in js, html tag or plain text I think

Gary King
06-18-2003, 04:31 PM
Hmm true.

MUG
06-18-2003, 04:40 PM
You can obfuscate the email addresses using JavaScript, I wrote a script to do that a while ago but I can't find it :confused:

I think I wrote it before I knew how to use CVS :(

MUG
06-18-2003, 04:58 PM
Wrote it again :confused:
// $Id: obfuscate_emails.php,v 1.4 2003/06/18 17:59:08 alex Exp $

function make_mail_link($title, $address) {
$address = strval($address);
$len = strlen($address);

$obfuscated_address = '';
for($i = 0; $i < $len; $i++) {
$obfuscated_address .= '&#' . ord($address[$i]) . ';';
}

return('<script language="JavaScript">' .
"\n<!--" .
"\ndocument.write('<a href=\"ma' + 'il' + 'to' + ':'" .
"\n + unescape('" . urlencode($obfuscated_address) . "')" .
"\n + '\">' + '" . htmlentities($title) . "' + '</a>');" .
"\n// -->\n</script>");
}
Just use echo make_mail_link('title of link', 'email@address.com');

Example: http://www.macusers.org/email.php
Source: http://www.macusers.org/email.phps

edit: I could make this into a hack that obfuscates all [email] bbcode... :D

Gary King
06-18-2003, 07:55 PM
I'm sure a lot of people would like that - give it a try! :)

filburt1
06-18-2003, 08:03 PM
The only surefire way of doing it is via an image...which you can do via GD and then transform tiny pieces of it to break programs that'll try to read the text.

MUG
06-18-2003, 08:21 PM
Today at 04:55 PM Gary W said this in Post #10 (https://vborg.vbsupport.ru/showthread.php?postid=410477#post410477)
I'm sure a lot of people would like that - give it a try! :)

https://vborg.vbsupport.ru/showthread.php?s=&threadid=54495 ;)