Gossamer Forum
Home : Products : Links 2.0 : Customization :

Ban URL mod in Links 2b5?

(Page 1 of 2)
> >
Quote Reply
Ban URL mod in Links 2b5?
Anybody have any idea where to place this mod which bans a domain from submission?

This mod was previously installed on Links 1.1 but I don't know where to place it in Links 2b5. The structure of the db.pl file has changed.

This routine is placed in the Links.cfg file:

# This is where you place the URL of a banned web site.
#------------------------------------------------------------->
# Urls you do NOT want in your database
@banurls = ("microsoft.com", "www.anydomain.on.ca/spam/killed");
#<-------------------------------------------------------------

AND this is placed in the DB.pl file (I don't know where):

#------>
foreach $banurl (@banurls) {
if (($record{'URL'}) =~ m/$banurl/) {
{ push (@input_err, "<h3>We're sorry but the URL '$record{'URL'}' is BANNED from our site entirely. Do NOT spam our index!</h3>"); }
}
}
#<------

John

[This message has been edited by jmurphy (edited February 17, 1999).]
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
jmurphy,

Which db.pl routine was it in in Links v1.1? The same routine should either be in db.pl or db_utils.pl in Links v2.0.

pasha,

Your answer still doesn't answer where to put the code. Smile

------------------
Bob Connors
bobsie@orphanage.com
www.orphanage.com/goodstuff/
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
Hello !

I have gotta Bad URL file.

Who wants it? I can only email. I cannot ultimately paste it on this ultimate BB. The html is itself about 25 KB.

let me know

gossamer@rajani.com


[This message has been edited by rajani (edited February 18, 1999).]
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
Go here:
http://216.169.107.32/scripts/forum/resources/Forum3/HTML/000676.html
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
I've been trying to get this mod to work on Links 2.0, but I'm getting nowhere. I know that there was an original version for Links 1.x, but neither version is posted on the resources page or that I can [easily] find in the forum.

I've tried a number of different search terms, but I'm only getting 50 results total and none of them are remotely close to banning URLs.

No matter where I put the section of code for the db.pl, it still allows people to insert sites from banned domains. Is there something that I may be missing, or does that section of code need to go in a different place?
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
If someone can post the org. Links1 version, I would LOVE to modify it so i works with Links2.0
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
MOD POSTING !!!

Put this is you're links.cfg
Code:
# Referers -- which hosts are NOT allowed to add to your database.
@db_deny_referers = ('microsoft.com','xs4all.nl/~spamaccount');

And then add this to yo're add.cgi, just above "# Check the referer."
Code:
# Don't allow enties from some hosts.
if (@db_deny_referers and $in{'URL'}) {
$found = 0;
foreach (@db_referers) {
$in{'URL'} =~ /$_/i and $found++ and last;
}
if (!$found) {
&site_html_add_failure ("We're sorry but the URL $in{'URL'} is BANNED from our site entirely. Do NOT spam our index!");
return;
}
}

....ready to go!

Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
Works great! Thanks for the help!

~~KB
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
Hi All,

I am preparin to install this mod on Links 2.0 and have a question.

Is it possible to make the list of bad URLs an external file and call it from the links.cfg file? If so, how?

And secondly, since I am just setting up my site and have no idea how many bad URLs a person ends up banning, would this even be a neccessary feature.

Thanks in advance for all feedback,

Joe
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
I tried adding this mod as shown above, but couldn't get it to work --it banned everything. I do have the add_confirm.html mod installed, but I don't see any apparent conflict there.

Bob

------------------
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
I thried this fix and it also banned everything! What can I do?
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
This mod banns really everything, it does not work...
Does somebody know a better add-on?

------------------
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
It does as it states -- it bans the url you specify. So if you were to ban www.gossamer-threads.com/scripts/forum, it would still be possible to submit www.gossamer-threads/scripts/ as a url. In other words, you will need to be specific when identifying the url(s) you wish to ban, or you risk banning an entire domain.

In a similar vain, has anyone tried modifying this to ban an individual's email account? As it is just another input field, I would assume it wouldn't be difficult (but I'm not in a position to try it, currently).
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
No, this add-on does not work. I have added the mod correctly and exactly, but afterwards there were no submissions at all possible. So, i.e. I have added only the URL www.sex.com to the ban list, but afterwards I tested it with a very different domain name (www.fcenergie.de) and this domain could also not be submitted how all other domains that I have tested.


------------------
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
Once upon a time there was another mod for this purpose. It involved (I think) an external text file where banned URLs would be listed. I can't find it using the search engin on this forum. I don't know if that's because the search only shows 50 hits or because those posts got lost in the transition to this forum, or what. Frown

Phoenix
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
Hello Phoenix!

Yes, this mod I thought was given here by Pasha. Write to Pasha or tell me, I may it somewhere in my system.

It was a call for an external txt file.



------------------
rajani











Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
FWIW, the original was written by Steve Miles. See:

http://www.adultjump.com/links/banurls.txt
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
There's another possibility.

Ask you host if you can setup "Bandwidth Protection." This would prevent designated URLs from accessing your site, I believe.
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
I'd prefer the call for an external .txt file. There have been more than a few postings in the forums about spammer problems -it's only going to get worse.
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
I would also prefer an external file. Who knows such a solution?

In addition, it would be very useful to block submissions from certain e-mail addresses.

------------------
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
None of the suggestions are very useful. Most spammers use public accounts with dynamic IP addresses and they do not name their HTTP agent "Submiteasy" or similar. The only possibility would be to block the submitted domains totally and or/their e-mail address. I did not find any script here that is able to do this and add this feature to Links. Who can help? If there is no solution we have to shut Links down because we receive every day 1.000 submissions!!!!! Help!!!!

------------------
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
Dear Alex,

we are on of your clients and I have contacted you already several times. Yesterday you had sent me a suggestion how we could spammers but this does also not work because most spammers use public Internet accounts with dynamic IP addresses and it does not make sense to block these dynamic adresses.

The only possibility would be to block the domain names and e-mail addresses of the spammers, i.e. http://www.subway.net, http://www.webereignisse.de, http://www.cd-online.ch and other spammers and their e-mail addresses.

I do not know how this can be added to one of the Links script. It is very urgent, because they send us hundreds of submissions of subpages every day!

If we do not find very soon a solution we must shut our catalog down. In addition it should be possible to delete several submission at a time (from the same domain) because we must remove all this spam from the database and this is very, very time-consuming.

Please help!!!


------------------
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
Lengua,

Wouldn't the "Add Confirmation" module stop the spammers? Upon submittal, it presents the user with a page to proofread and a button. Unless they circumvented this additional step, it seems to me that their pages would never make it to your validation step.

Bob
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
Well, I think I have a mod for banning just about any word you want....including URL's e-mail addresses, description words, title words, etc. Look below for the code:

open (FILE,"lockout.txt");
@lockout = <FILE>;
close(FILE);
foreach $lock(@lockout) {
chomp($lock);
$lock =~ tr/A-Z/a-z/;
@temp = ($in{'Title'},$in{'URL'},$in{'Category'},$in{'Description'},$in{'Contact Name'},$in{'Contact Email'});
for ($i = 0; $i <= 5; $i++) {
$temp[$i] =~ tr/A-Z/a-z/;
if ($temp[$i] =~ /$lock/) {
&cgierr("Sorry, but your link cannot be added because it contains text or links that are not permitted on this server.");

}
}
}

I placed this in the add.cgi in the sub process_form right before #Update the counter. There may be a better place to put this code, but it seems to work. Notice that I have the error message going through the default error routine for cgi errors. I am going to add a template to take this to another page instead, but at least this works for now. Also, if you modify the location of the lockout.txt file, you could edit it as if it were a template (i.e. put it in the templates directory and change the path to there. The lockout text simply contains single words you want to ban, or a domain or e-mail you want to ban or any combination of these. This mod will check each field for the words you specified in the lockout.txt. I hope this helps!
Quote Reply
Re: Ban URL mod in Links 2b5? In reply to
Oh...you can see this in action at http://www.dearangel.com/search

I haven't gotten a HUGE list of "banned" sites or words yet, but try using "testban" somewhere in your submission and see what happens.
> >