Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Oct 2006
Posts: 18
Newbie
Newbie
Joined: Oct 2006
Posts: 18
Hej
This post is dedicated for those who run their forums on shared servers, and do have problems with exceeded bandwidth and harvesters.

Im running UBB 7.2.2 and when I view in the referrer log, I'd noticed a lot of strange visits from spammer-sites which problably harvest emails, and my host told me to decrease bandwidth or moving my board. Therefore I'd like to share a little script which generate false emails and links to harvesters. (Harvesters doesnt respect a robots.txt file!).

The script does only requires PHP, and can be used in all pages or forums.
PHP Code

<?php
/* Script which generates false emailadresses and bogus links in a endless loop */

$min_length = 6; // min. numbers of chars & letters in emailadress
$max_length = 12; // max. numbers of chars & letters in emailadress
$min_emails = 100; // min. numbers of emails
$max_emails = 200; // max. numbers of emails
$min_bogus_links = 1; //min. numbers of bogus links
$max_bogus_links = 5; // max. numbers of bogus links

mt_srand ((double) microtime() * 1000000);
$your_domain = $_SERVER['SERVER_NAME'];
$self = $_SERVER['PHP_SELF'];
$set_to_use = "abcdefghijklmnopqrstuvwxyz_1234567890";
$set_length = strlen($set_to_use);
$number_of_emails = mt_rand($min_emails,$max_emails);

echo
"e-mailadresses<br>";
While (
$number_of_emails > 0)
{
$number_of_emails--;
$this_ones_length = mt_rand($min_length,$max_length);
$s_x = "";
for (
$b_x = 1; $b_x <= $this_ones_length; $b_x++)
{
$s_x = $s_x . $set_to_use[mt_rand(1,$set_length)];
}
echo
"<a href="mailto:".$s_x."@".$your_domain."">".$s_x."@".$your_domain."</a>;  ";

}
echo
"<p>links<br>";
$this_run_bogus_links = mt_rand($min_bogus_links,$max_bogus_links);

While (
$this_run_bogus_links > 0)
{
$this_run_bogus_links--;
$this_ones_length = mt_rand($min_length,$max_length*2);
$s_x = "";
for (
$b_x = 1; $b_x <= $this_ones_length; $b_x++)
{
$s_x = $s_x . $set_to_use[mt_rand(1,$set_length)];
}
echo
"<a href="http://www.".$your_domain."".$self."?".$s_x."">"."http://www.".$your_domain."/".$s_x."</a><br>";
}
?>



Heres a how to do:
1. Copy the script into a text editor and name the file 'emails.php' ( or whatever you prefer)
2. Upload it to server
3. upload 'pixel.gif' to server (NOTE! pixel.gif is a 1x1 transparent pixel, and is therefore invisible)
4. Call the script with a link to it in the top and bottom of your board, ex. header.php and footer.php
HTML
<a href="/emails.php"><img src="/pixel.gif" border="0" alt="" /></a> 

Enjoy!
Attachments
pixel.gif (43 Bytes, 35 downloads)
helppixel.gif (37 Bytes, 28 downloads)


trosfrihed.dk
Custom Ubb 7.5.2
Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Grazie - JustDave did something like this for the old 5-series - anything to give spammers some of their own medicine thumbsup


- Allen wavey
- What Drives You?
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
Well, I'd hope you don't have any catchall email addrs setup, as you seem to be referring your own domain, i think it'd be more fun to refer their hostname wink...


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
use it as your 404 page laugh


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)