View Full Version : EMail Address Obfuscator v1.0.2
El_Muerte
10-05-2005, 10:00 PM
This will obfuscate email addresses in posts in order to prevent email harvesting. There are a couple of methods available:
Image; the email will be displayed as an image, works quite well but not very user friendly.
HTML Entities; every character in the email address will be replaced with it's html entity. This is not a great method, but it stops stupid harvestors.
Javascript; the link will be written via javascript, works quite well and makes the link invisible for harvestors. But requires javascript to be enabled
Custom; roll-your-own algorithm, can be easily set in the vbulletin options in the admincp
This plugin also partially strips the email addresses in the archive (the domain name is removed).
Update 1.0.1
* [fixed] wysiwyg code isn't screwed up anymore
* [added] added support to select the font to use (builtin fonts, GD bitmap fonts or TTF fonts)
Update 1.0.2
* [fixed] fatal error when rebuilding postcache
* [fixed] invalid hash when quickposting\editing via AJAX
* [changed] the image tags now use the CSS class "inlineimg" that aligns them vertical center
TygerTyger
10-06-2005, 09:00 AM
Great stuff, works fine using image conversion. Thank you! You might want to mention that the options panel can be found under vBulletin options ;)
trancetopia
10-06-2005, 12:13 PM
Thanks, this is great. Clicks install.
nexialys
10-06-2005, 12:47 PM
this is just great... and can be enhanced by using the image setting for the $vbulletin->options['imagetype'] and the font related to it... $vbulletin->options['gdfont'] or $vbulletin->options['magickfont']....
;)
ZeroSixty
10-06-2005, 12:54 PM
Nice! Thankyou :)
mcyates
10-06-2005, 01:04 PM
thanks, this works a treat. Great hack, ** Clicks Install **
Mephisteus
10-06-2005, 07:56 PM
Pretty good idea and solution :) I dont have much of a need for it myself but when an email adres is posted I would like it to be 'safe' from harvesters :)
A few notes though (by far the bigger part of this post, dont take it wrong though :p)
It also changes the output on the editing of a post. In WYSIWYG this means that (atleast with javascript) you cant see the email adress :p
And is this proper? On HTMl entities it outputs it like this <a href="mailto:%blablabla">adres@bla.com</a> and on javascript (which I admittedly dont know much about, nor do I know about the way harvesters work) it puts in a undisclose followed by a full email link like normal (honestly wondering about how that works :))
Heres something that should prove very very proper (if possible to put it with a automated fashion).
<script type='text/javascript'>var a = new Array('s','t','a','r.','o');document.write("<a href='o:"+a[1]+a[0]+a[2]+a[3]+a[4]+"'>"+a[1]+a[0]+a[2]+a[3]+a[4]+"</a>");</script>
This format for an email adress (made this one manually). Any chance of doing it like that? It replaces both the mailto/link and hussles it all up in output making it look (even if it does go past the codes) like random blabber.
El_Muerte
10-06-2005, 08:11 PM
hmm, I never use the wysiwyg editor, so that might be a bug.
as for the output, what you see it not what the browser actually received. For example firefox\mozilla displays the evaluated html when you view the selected source. Use the "view page source" to see the actual code.
With HTML entities the actual HTML code is
<a href="mailto:%74%65%73%74%40%65%6d%61%69%6c%2e%63%6f%6d">test@email.com</a>
and with Javascript it;s
<script type="text/javascript">document.write(unescape('%3c%61%20%68%72%65%66%3d% 27%6d%61%69%6c%74%6f%3a%74%65%73%74%40%65%6d%61%69 %6c%2e%63%6f%6d%27%3e%74%65%73%74%40%65%6d%61%69%6 c%2e%63%6f%6d%3c%2f%61%3e'));</script>
one9er
10-06-2005, 08:45 PM
Thank's El_Muerte! Works great.
Lea Verou
10-07-2005, 01:10 AM
Thank's El_Muerte! Works great.
Am I able to change the colors of the image created?
El_Muerte
10-07-2005, 06:18 AM
no you can't, at least not yet, currently it uses the colors from the currently selected style
Lea Verou
10-07-2005, 06:20 AM
no you can't, at least not yet, currently it uses the colors from the currently selected style
Oh, that's what I meant! :)
* Lea Verou clicks install :)
trancetopia
10-07-2005, 07:56 AM
I like the update, thanks :)
For my personal preference, I didn't like the alignment of the image against the text of the message. I made the following modification so the image is aligned with the middle of the text instead of the bottom.
The Change:
$res .= "<img src=\"?emailimage=".$hash."\" alt=\"[email address]\" />";
to:
$res .= "<img src=\"?emailimage=".$hash."\" alt=\"[email address]\" align=\"absmiddle\" />";
This looks better when using font size 3 with my current style. Someone else may find this useful.
ke5crz
10-07-2005, 07:40 PM
I get the following error when i try to rebuld my cache
Fatal error: Call to undefined function: convertemailaddress() in /home/hamplex/public_html/includes/class_bbcode.php(377) : eval()'d code(11) : regexp code on line 1
El_Muerte
10-07-2005, 09:31 PM
hmm... looks like the cache rebuild thing never calls the global_start hook
this is kinda annoying, isn't there a super global start hook?
Fat Burger
10-08-2005, 12:54 AM
I installed it and got an "invalid hash" message, instead of the email address being converted. Any idea?
Vtec44
10-08-2005, 01:29 AM
It's working fine for vB3.5 RC3 :D
utw-Mephisto
10-08-2005, 01:37 AM
Just installed on 3.5 gold - worki perfect
http://www.ut2007world.com/forum/showthread.php?t=689
@El_Muerte : UnrealScript wasn't challenging enough - now also vb hacking :D :D :D
Mr Chad
10-08-2005, 02:57 AM
a well needed mod.
El_Muerte
10-08-2005, 08:27 AM
I installed it and got an "invalid hash" message, instead of the email address being converted. Any idea?
the email address (for the images) are stored in the database and the hash in the url is just it's identifier, it could happen that the image is requested before the hash table is stored in the database (I guess). I may have to change the way the hashes are stored in the database.
What browser are you using?
@El_Muerte : UnrealScript wasn't challenging enough - now also vb hacking
Not really, I have my own vbulletin forum and also manage the one at UnrealAdmin.org . Some of the hacks I made I already put in via the old file hacking way, but this plugin stuff is great and also allows me to easily share it with others.
Funchiestz
10-08-2005, 08:47 AM
or the images) are stored in the database
same as me.. it showing invalid hash T_T
Yorixz
10-08-2005, 09:17 AM
Thanks, installing this soon.
edit;
Installed it and it's working great, thanks a lot!
wolfyman
10-08-2005, 02:58 PM
hmmm.. using firefox. It gave me invalid hash after posting an email address. I checked it in IE and it worked fine, then I refreshed my firefoxpage and it showed correctly.
Awesome hack and I am using it, but I would like to know when it is upgraded.
*clicks install*
El_Muerte
10-08-2005, 04:16 PM
does this only happen when using quick reply? or also when using the normal reply form?
wolfyman
10-08-2005, 05:20 PM
It happens the same for each instance.
It only seems to affect the posters browser though - I tried it both ways, and got "invalid hash"
Then I refreshed the page and it showed correctly on both instances. So, I posted again to recieve the invalid hash. I then opened the thread in a different browser and it looked fine.
So, other than the occasional PM wondering why that happened from the one user who will see "invalid hash" rather than the actual email image prior to refreshing the page - I don't see a problem.
El_Muerte
10-08-2005, 05:23 PM
it should be fixed now, the AJAX stuff caused the browser to receive the HTML code before the hash was saved to the database
wolfyman
10-08-2005, 05:24 PM
Yep, I just tried it and it's all good. Thanks man!
Fat Burger
10-08-2005, 05:51 PM
Yeah, I was using Firefox too, sorry I didn't get back to you.
Thanks for the fix, this is a great plugin!
Gilby
10-08-2005, 08:59 PM
Installed 1.0.2 and tried to create a new thread (which did have subject and message longer than 10 chars) and I got this error:
The following errors occurred when this message was submitted:
1. Please complete both the subject and message fields.
2. The message you have entered is too short. Please lengthen your message to at least 10 characters.
I'm guessing the regex is striping everything out of those variables.
El_Muerte
10-10-2005, 07:39 AM
couldn't reproduce that error
the rewriting of the email address is done when the vbcode parsing is completed and as far as I can tell the length it checked before the vbcode is parsed.
one9er
10-10-2005, 10:44 AM
Thank's El_Muerte for the up-dates!
hotrod1
10-10-2005, 02:35 PM
Great hack, thanks!
Jagged Tooth
10-22-2005, 03:23 AM
I just installed it, works great. Great work
RS_Jelle
10-22-2005, 03:47 PM
When you install DC Seo vB URL Rewrite (https://vborg.vbsupport.ru/showthread.php?t=91324), it doesn't work.
Maybe you could make a version for use with the DC Seo vB URL Rewrite mod too? :)
El_Muerte
10-23-2005, 05:55 PM
When you install DC Seo vB URL Rewrite (https://vborg.vbsupport.ru/showthread.php?t=91324), it doesn't work.
Maybe you could make a version for use with the DC Seo vB URL Rewrite mod too? :)
You mean the image doesn't work?
That would be odd actually since afaik the image isn't rewritten by the DC SEO mod.
Installed it, works great, thank you!
Feature suggestions:
- option to keep everything unmunged for specified usergroupids
- option to have a <noscript> section (applicable when Javascript is the method) to display text such as "user@<hidden>".
- option to look for and munge other email addresses, e.g.
<address@tld>
[address@tld]
mailto:address@tld
These don't get parsed by vBulletin but they're certainly harvestable.
Installed on 3.5.2 and seems to work fine. How would I make a custom algorithm?
Smiry Kin's
12-17-2005, 12:37 PM
Installed on 3.5.2 and seems to work fine. How would I make a custom algorithm?
i installed it on 3.5.2 doesnt work.. :( says Detected GD
thisgeek
12-20-2005, 03:25 AM
Works like a charm on my 3.5.2. Thanks.
Capt PPRuNe
01-07-2006, 10:39 PM
Installed and works in 3.5.3 but when using Image, the automatic link isn't active. Usres will have to manually type in the email address to their email prog. Is the image supposed to be an active link?
El_Muerte
01-08-2006, 07:57 AM
Installed and works in 3.5.3 but when using Image, the automatic link isn't active. Usres will have to manually type in the email address to their email prog. Is the image supposed to be an active link?
There's no link with the image.
feldon23
01-08-2006, 05:10 PM
There's no link with the image.
This works poorly with 3.5.x because of Ajax. Also, I was hoping it would detect all e-mail addresses, not just ones with [ email][ /email].
its pertty fine.
/me klikcs Install..
Can i present some new idea for this nice hack..
as it change the email id..its working nicely with vb3.5.3 .it change to .png
image...any tips that can modify it...looks more grate?
can it change all the posted urls/links too(anything customizeable that it will be viewble or not or user group permission)..only the authoriesd will not be change...
Thankx....
MorrisMcD
02-12-2006, 02:47 AM
It works for me...
Sorta...
When I post a thread, it shows up and works fine.. However... The first time I did it, I tested it and upon seeing it work, replied to the thread immediately and it basically deleted the thread and said it could find the thread specified.. That was using quick reply or a reply form.. I have the prevent doubleposting hack. Could that be causing it?
Still baffling why this would delete the thread...
Smiry Kin's
02-12-2006, 02:56 AM
this work in 3.5.3? also in FireFox maybe?? pls reply!
srpompon
02-21-2006, 05:46 PM
friends,
in 3.5.3 + firefox work great.
but in the ajax Shoutbox (the code from zero tolerance) dont work, show "invalid hash" into the ajax window.. anyone know a fix for this?
dead7
04-06-2006, 05:07 PM
Is there a way I can remove or possibly fix the system so i dont get "invalid hash" when people put their email in their classified ads?
I'm running photopost classifieds, and its integrated great with VB, except sometimes when ppl use an email addy in their ad, instead of the image of the email, it just shows an image saying "Invalid Hash".
Any ideas? I realize you may not support the classifieds and that is fine, but im curious how i can apply the hack so it indeed doesn't apply to the classifieds if need be.
Thank you.
Eagle Creek
05-04-2006, 04:55 PM
Perfect! Thx!
Eagle Creek
05-04-2006, 05:14 PM
HTML Entities; every character in the email address will be replaced with it's html entity. This is not a great method, but it stops stupid harvestors.
What's the problem with this method?
Cyburbia
08-27-2006, 05:35 AM
Sorry. It's broken in 3.6. :(
El_Muerte
08-27-2006, 06:32 PM
it works for me
Eagle Creek
09-28-2006, 10:53 AM
Will it work at 3.6.1?
Will it work at 3.6.1?
+1 3.6.2
Really Usefull
supported for vb 3.6.3 ??
gembels
11-17-2006, 04:30 AM
I got this error in vB 3.6.1
Noodles24
11-26-2006, 02:33 AM
Would it be possible to add the username field in postbit to the places this addon searches for email addresses? I have quite a few users who anonymously post using their email address as a username, and then email me when they get spam (stupid i know).
brandnewx
01-29-2007, 10:28 AM
Anybody uses this mod in 3.6.2+?
Anybody using this with vb 3.6.6?
Eagle Creek
08-09-2007, 01:31 PM
3.6.8 compatible?
Cyburbia
10-23-2007, 12:26 PM
Got it working in 3.6.8. :)
dethfire
03-05-2008, 08:22 PM
Got it working in 3.6.8. :)
right out of the box?
dethfire
05-20-2008, 01:05 PM
working in 3.7?
dethfire
06-18-2008, 03:47 PM
no luck no this eh? hmm
wolfstream
07-17-2008, 11:17 PM
This does work in 3.7, I'm using it on two 3.7 forums myself with no issues
ctrenks
11-18-2008, 04:06 PM
Getting a [ X ] Email Address (server calling a non exsistant image) Worked great until I upgraded to 3.7. Unistalled product and re-installed and have the same "missing image" error.
Didnt see this one in the last few pages of searching
ctrenks
11-18-2008, 04:49 PM
Should note I also went to php5 on my server so it may be an issue with that. I get these errores on the server log
Call to undefined function imagefontheight()
wolfstream
11-18-2008, 05:03 PM
From the configuration information:
Image only works when GD is installed
You also (obviously) have to tell php to compile using gd.
Take a look at any phpinfo(); page and see if gd shows up anywhere. If it's properly installed, it will.
Keep in mind, also, that you don't HAVE to use the "image" format, you can use javascript, or html, though image is one of the better options.
ctrenks
11-19-2008, 02:40 PM
OK, I think that may be issue!
Thanks
z0diac
05-21-2009, 07:50 PM
Works on 3.7.4
BUT.. .how can I get it so that any email addres eg: abc@123.com is replaced with abc@NO EMAIL POSTING ALLOWED
??
EDIT (Aug.25/09) - working on 3.8.4
steven s
12-31-2009, 05:24 PM
Working in 4.0.0p1, forum and CMS.
JUST WHAT I NEEDED.
THANKS
BRotondi
04-10-2011, 09:01 AM
"JavaScript" works in 4.0.4, "Image" seems not to work.
Anyway: 1000 Thanks for this helpfull tool!
Bruno
Dwarden
04-17-2013, 02:26 PM
was anyone able to get the IMAGE part working in 4.x (4.2.) vB ? while GD enabled
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.