Deny IPs Quickly (cpanel)

If you have a program or script that you'd like to give away or sell, this is the place to do it. All offers should include contact info.

Moderators: BBear, theunknownhost, flaguy

Post Reply
User avatar
Arf
Official Test Penquin
Posts: 9103
Joined: Tue Apr 09, 2002 12:00 am
Location: IDAHO, USA
Contact:

Deny IPs Quickly (cpanel)

Post by Arf » Mon Dec 16, 2013 5:23 pm

I hate form spammers. I block spammers who abuse my forms via the .htaccess file in an account. The problem is that it takes a minute to edit the stupid file regularly. It's those repeated tasks that drive me nuts. So I wrote a quick script that does the job in less than a second. It requires command line access. Now you simply type:

# denyfrom IP.ADD.RE.SS

and it takes care of it for you. Current beta version edits only one .htaccess file.

Any interest??

User avatar
Sapphyre
Official Test Penquin
Posts: 3337
Joined: Tue Nov 19, 2002 2:50 am
Location: Canada

Re: Deny IPs Quickly (cpanel)

Post by Sapphyre » Tue Dec 31, 2013 1:44 pm

How about make it
# denyfrom IP.ADD.RE.SS unixuser

Either assume a default account if unixuser is blank (the account you most often need to block for) or prompt to specify the account username if missing
It's a crested auklet

User avatar
Arf
Official Test Penquin
Posts: 9103
Joined: Tue Apr 09, 2002 12:00 am
Location: IDAHO, USA
Contact:

Re: Deny IPs Quickly (cpanel)

Post by Arf » Thu Jan 02, 2014 5:56 pm

Hmm, I like that. Then you could write a batch file to do multiple accounts. Or, one could create a list of accounts within the script that it will effect.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest