Click to See Complete Forum and Search --> : Random EMAIL spam
GavinPearce
05-07-2003, 04:15 PM
Update:- This post has got HUGE lol!! There is a solution at the end.
While your here check out GavinNet: www.gavinnet.com (http://www.gavinnet.com)
I'm trying to create a javascript that I can't find anywhere but I'm having a bit of trouble. I've seen cgi scripts that do the same thing but JavaScript can do it, and then everyone can use it.
Bascially what I'm after is a script that when the pages loads generates loads of random e-mail address (if possible the amount can be defined simply) and then generates a link at the bottom of the page name with ?random number after it say antispam.html?457324 to confuse the spam bot.
An online exmaple using CGI is located athttp://www.hostedscripts.com/scripts/antispam.html
So far I have the following. If you can build on it or just start again doesn't really matter. Credit will dev be given where due.
<script>
var keylist="abcdefghijklmnopqrstuvwxyz123456789"
var temp=''
temp=''
for (i=0;i<10;i++)
temp+=keylist.charAt(Math.floor(Math.random()*keylist.length))
document.write="<a href='mailto:" + temp + "@" + temp +".com'";
</script>
JackTheTripper
05-07-2003, 06:42 PM
Please note that I believe domain names can not start with a number and this script does not take that into account. But it could easily be added.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<script>
var keylist="abcdefghijklmnopqrstuvwxyz123456789"
var ending = new Array('.com','.org','.net')
var numOfEmail = '5' // *** How many e-mail addresses do you want? ***
function makeEmail() {
for (x=0 ; x<numOfEmail ; x++) {
// Pick a happy ending...
var theEnding = Math.floor(Math.random() * 3)
var theEnding = ending[theEnding]
// create a random e-mail address
// start by picking how long the first part is
// we'll make the first part between 5 and 15 charactors
var yourNameLength = Math.floor(Math.random() * 10) + 5
// next decide how long the domain name part is
// we'll make the domain name between 10 and 20 charactors
var domainLength = Math.floor(Math.random() * 10) + 10
// create the first part "Name"
var yourName = ''
for (i=0 ; i<yourNameLength ; i++) {
yourName+= keylist.charAt(Math.floor(Math.random()*keylist.length))
}
// create the second part "Domain"
var yourDomain = ''
for (i=0 ; i<domainLength ; i++) {
yourDomain+= keylist.charAt(Math.floor(Math.random()*keylist.length))
}
// Put it together
var theEmail = yourName + '@' + yourDomain + theEnding
//Print the email
document.write('<a href="mailto:' + theEmail + '">' + theEmail + '</a><br>')
}
}
</script>
Here are some e-mail addresses<br><br>
<script>makeEmail();</script><br><br>
Please send us all spam
I would sure hope that this script doesn't generate at random an actual email address that then get's spammed. I'd bet that that would be asking for trouble...
GavinPearce
05-08-2003, 10:05 AM
NAH lol!!
Jus look at the demo script in cgi.
GavinPearce
05-08-2003, 10:08 AM
Cheers mate, your script was perfect. Domains can start with a number no worries (http://123.com) ummm what else
Oh yea if u post a site address i'll add it to the links page on ma site.
Gav.
<script>
var keylist="abcdefghijklmnopqrstuvwxyz123456789"
var temp=""; var intl = "";
for (i=0;i<10;i++)
temp+=keylist.charAt(Math.floor(Math.random()*keylist.length));
for (i=0;i<10;i++)
intl+=keylist.charAt(Math.floor(Math.random()*keylist.length));
document.write("<a href='mailto:"+ temp+"@"+intl+".com'>"+temp+"@"+intl+".com</a>");
</script>
GavinPearce
05-08-2003, 10:27 AM
cheers gain.
JackTheTripper
05-08-2003, 11:31 AM
Originally posted by pyro
I would sure hope that this script doesn't generate at random an actual email address that then get's spammed. I'd bet that that would be asking for trouble...
I thought about that, but really the chances of that hapening are so slight it would probably never happen. You could also set the donaim to be the max 63 characters (Is that right?) because I'm sure there are not too many domain names that long, and picking that many characters randomly you have less of a chane of actually getting one right.
Yes, I would think you could also use an illegal domain name, ie one that starts with a dash (-) etc... I would think that to simply confuse a spam bot, that might be fine...
JackTheTripper
05-08-2003, 11:55 AM
Unless bot's are programed to look for things like that.
GavinPearce
05-08-2003, 12:50 PM
we're all forgettin 1 thing. Spam bots scan the HTML don't they.
Well there's no e-mail address in this html jus javascript so bascially it's creating lots of radno spam bot proof e-mail address. Lol I should of thought of that.
It gonna have to be done in cgi or php so it writes the actual mailto: in to the page coding. Anyone know how?
You can, using ActiveX and the FSO, make an HTML file and save it to the computer but not the server. Here's an idea, we make it execute the function a billion or so times on the same page, then we just copy & paste it and save an html file to the server. Other than that, you do have to use a server-side language.
JackTheTripper
05-08-2003, 01:43 PM
Could you open a new window and have the script write it to the new window? Would the bot follow that? I'm not sure since I dont' know how these bot's work.
GavinPearce
05-08-2003, 01:54 PM
It mite. I'm not sure but you need the mailto: link in the page i'm sure of that. Anyway of getting lots of mailto: in the page should work.
Nevermore
05-08-2003, 02:14 PM
You couldn't just open a window because bots don't run JavaScript, so NO JavaScript based solution will work.
GavinPearce
05-08-2003, 02:28 PM
Anyone know a php or cgi way I can set it up on my server then or at least somewhere i can download a script.
Does your server support PHP? I'll make a PHP script for spam-bots, but it might take a few days because I'm more than extremely busy.
Nevermore
05-08-2003, 03:05 PM
Hee's some PHP. If you would like to change the number of email addresses it produces, change the variable '$number'.
<?php
$number=200; //Number of addresses
echo ("If you are alive, this isn't the place for you...<br><br>");
for($l=0;$l<$number;$l++){
$available = "abcdefghijklmnopqrstuvwxyz1234567890";
for($x=0; $x<10; $x++){
$let="";
$rand = rand(0,35);
if($rand>35)$rand=35;
$let=substr($available,$rand,1);
$tot=$tot . $let;
}
for($y=0; $y<63; $y++){
$seclet="";
$rand = rand(0,35);
if($rand>35)$rand=35;
$seclet=substr($available,$rand,1);
$sectot=$sectot . $seclet;
}
$endtot=$tot . "@" . $sectot . ".com";
$sectot="";
$tot="";
$let="";
echo ("<a href=\"mailto:$endtot\">$endtot</a><br>");}
?>
This code will write a short warning which I'm sure you can work out how to change, then will write the HTML for a given number of random emaill addresses in this pattern:
10 random letters/numbers@63 random letters/numbers.com. They will then be printed in a list. My version is running at http://members.lycos.co.uk/cijori/emailgen.php
edit: Remember that while creating more addresses is worse for SpamBots, it can take a while to display, and people will always go there by accident, and that it becomes more likely to generate a real email address.
Cijori, why not put them in an unordered list?
<?php
$number=200; //Number of addresses
echo ("If you are alive, this isn't the place for you...<br><br>");
echo ("<ul>");
for($l=0;$l<$number;$l++){
$available = "abcdefghijklmnopqrstuvwxyz1234567890";
for($x=0; $x<10; $x++){
$let="";
$rand = rand(0,35);
if($rand>35)$rand=35;
$let=substr($available,$rand,1);
$tot=$tot . $let;
}
for($y=0; $y<63; $y++){
$seclet="";
$rand = rand(0,35);
if($rand>35)$rand=35;
$seclet=substr($available,$rand,1);
$sectot=$sectot . $seclet;
}
$endtot=$tot . "@" . $sectot . ".com";
$sectot="";
$tot="";
$let="";
echo ("<li><a href=\"mailto:$endtot\">$endtot</a></li>");}
echo ("</ul>");
?>
GavinPearce
05-08-2003, 03:40 PM
Ur all great, thanks people!!
I'm not to gud at the random function in javascript or php as u can tell, but how can I add a link at the bottom to make the bot g around in a loop, I mean like to confuse teh spam bot and make it think it's a new page say index.php?5435345
index.php?dfbjhdfs7
oor sumthin like that ?
I think the below works, but I haven't tested it. You could also use $PHP_SELF (or some variable like that that refers to the current .php file).
<?php
$number=200; //Number of addresses
echo ("If you are alive, this isn't the place for you...<br><br>");
echo ("<ul>");
for($l=0;$l<$number;$l++){
$available = "abcdefghijklmnopqrstuvwxyz1234567890";
for($x=0; $x<10; $x++){
$let="";
$rand = rand(0,35);
if($rand>35)$rand=35;
$let=substr($available,$rand,1);
$tot=$tot . $let;
}
for($y=0; $y<63; $y++){
$seclet="";
$rand = rand(0,35);
if($rand>35)$rand=35;
$seclet=substr($available,$rand,1);
$sectot=$sectot . $seclet;
}
$endtot=$tot . "@" . $sectot . ".com";
$sectot="";
$tot="";
$let="";
echo ("<li><a href=\"mailto:$endtot\">$endtot</a></li>");}
echo ("</ul><br><br><a href=\"index.php?".$rand."\">Let's make these bots go round and round like the wheels on the bus.. All through the Web!</a>");
?>
Nevermore
05-09-2003, 12:53 AM
I didn't put them in a list because the file was already hitting 90K when generated, and I wanted to keep it as small as I could while still making it work.
That's a point made, Cijori...
Nevermore
05-09-2003, 12:43 PM
BTW, the random URL extension you have put on that will only produce a maximum of 35 different URLs. To make it more effective, replace the word $rand with a variable made up of multiple random letters/numbers,
Well... I think 35 would be enough.... For me anyways. ;)
Nevermore
05-09-2003, 12:56 PM
7000 addresses... Yeah, I suppose that should do the trick. :D
GavinPearce
05-09-2003, 01:01 PM
lol thats huge filesizez if it gets many hits.
tripwater
05-09-2003, 03:08 PM
Anyone that hates spam mail just go to www.spamnit.com and sign up. They have a free 30 day trial.
They do not use filters or crap blacklists that bots and spammers can get around. They force a valid email address. I won't bore you with the details if your are interested go there and read up on the faqs. They are definitely different.
GavinPearce
05-09-2003, 03:17 PM
Y pay for a free service elsewhere,
and they aren't doing anything to prevent spam for the users on the whole internet, they are more intrested in the profit, you never know they might sell on the address in your safe list to spammers. Its unlikely but still possible.
This script won't just protect the person who uses it but by clogging a spam bot will protect many others to.
tripwater
05-09-2003, 03:31 PM
The 30 day trial is free & I have done a great deal of research on spam and the methods that work and do not and guess what 98% of what is out there does not. filters,blacklists do not because spammers constantly change their addresses. Whitelists do not because everyone has to be on the list to communicate. SpamnIT uses a patented process (BTW I know for a absolute fact that they do not sell your email address) that guarantees that if an email hits your inbox, you will be able to hit reply and it be a legitimate email address. On top of that they do allow you to report spammers and they track how many emails are sent out on the network so they can shut down a spammer (or server). Also you can maintain a whitelist within the system (if you like) to make sure that you get certain emails before they are blocked. Once an email has been blocked you only have to reply to that on email one time and you never have to do it again and can reach anyone protected by spamnit. That is why they track how many emails are sent out. I have been using it since
March and Spamnit has blocked over 2000 spam emails. They just started and are legit. You get what you pay for and work 10X as hard for a so called free service I promise you.
GavinPearce
05-09-2003, 03:47 PM
Hmm it is a good idea i not disagreeing with you there. But it's still not the answer the web is looking for.
It's no good for me for example. Say i get an e-mail from a very important client and they got told to reply with something for spamnit.com or wotever it is. It doesn't create that professinal image I want in front of clients. The best way is to be careful about giving out your address in the first place. My address is hidden by javascript in my page and I havn't got a single spam mail to it yet. All mail has been to a_catch_all_address@gavnet.com and since i've turned off catch all, no trouble.
Its a gud idea for personal users who hav a little money to spend. Its an automeated service by the sounds of it, I reckon with no offence meant that I could with a bit of help, but anyone good at php or cgi could set up a system that worked excatly the same.
Gav.
tripwater
05-09-2003, 04:05 PM
Well I respect your opinion. Yes the site is PHP but the brains of it is in C and As far as the market is concerned there is only one competitor to Spamnit because that competitor is currently taking everyone else out due to patent laws. So I doubt it can be done now by anyone else even if they wanted...the technology is claimed.
As for the email being sent out as unprofessional it is personalized and looks as if it came from you. And if you already know you are going to receive an email from that person or company you can add them to your whitelist and receive the email without them ever being blocked. Also you can turn the entire protection off which will give you all email including spam. BTW Spamnit never touches your email.
It has been cool chatting with you. Just offering another solution to a common goal. Keep it up!
GavinPearce
05-09-2003, 04:08 PM
yea cheers it is a good idea, jus tnot what i'm after. I suggest this for anyone looking for a way to prevent spam, it's just not for me.
Best of luck in the future.
lmccord2
05-09-2003, 04:13 PM
The best way is this:
<script language=javascript>
var username = joshua9990
var domain = yahoo.com
document.write("<a href=mailto:"+ username +"@"+ domain +">"+ username +"@"+ domain +"</a>");
</script>
Would equal: joshua9990@yahoo.com (my email)
GavinPearce
05-09-2003, 04:19 PM
lol bit slow aint ya :D
im usin a code similar like that but i changed it a lot and remote link to it incase ne spam bots get inteligent enough to work out my addy from readin javascript codin and puttin it together.
GavinPearce
05-10-2003, 04:22 AM
Anyones whos helped at all in this post feel free to post your link below and i'll add it to the site.
I don't know how much I've helped, but.... My signature is my site. :D
GavinPearce
05-10-2003, 11:57 AM
Yea I add a link for you, is there another site I can link to though? I'm trying to avoid other companies that have similar stuff to what we do, I don't want to use customers :D
Gav.
:p OK, yeah. LOL, I didn't even think about that. :D Well, I have a few "experiments" sites that I use for PHP and JavaScript testing, etc., but I don't want people to... Well, steal them, if you know what I mean. Anyhow, I don't really have a site worth putting on there, so... I guess I dunno what to tell you! :rolleyes: Sorry.
GavinPearce
05-10-2003, 12:46 PM
k fair enough
if u ever want me to link to a site, just contact me.
Anyone else still reading this thread and wants a link?
Nevermore
05-10-2003, 01:18 PM
I'm buying a new domain name in about two weeks, so any link I give you now could turn useless. Can I contact you later?
GavinPearce
05-10-2003, 01:21 PM
jus e-mail me mail@gavinnet.com or send me a pm or sumthin wen u hav a link.
Nevermore
05-10-2003, 01:29 PM
Just went to your site and read the news about the Spam DoS-style attack on your site. I hope you get through it. Have you cantacted the webspace provider about blocking the emails by IP at the bottleneck, and reported it?
edit: Just re-read that, and I'm sorry if it sounds smug. I'm currently helping someone who was flooded with Spam to recover their site.
GavinPearce
05-10-2003, 01:36 PM
cheers, nah u didnt sound smug.
Umm i turned off catch-all on my domain and it has stopped nearly all of it, i think all of it fullstop.
That is why i have been after this script. revenge is sweet. lol.
yea like i've said just contact me wen u dun that domain.
Gav.
Nevermore
05-10-2003, 01:39 PM
If you still have the email, their are no major ISPs that will tolerate the connection being used for Spam. Why not complain? As you said, revenge is sweet!
GavinPearce
05-10-2003, 01:41 PM
If i get another i'll look into making a complaint.
I followed one back to a microsoft list and got sum excuse about it bein external though they host it and it isn't against their terms.
Nevermore
05-10-2003, 02:25 PM
Tracing them can be difficult - if you need any help just contact me.