Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#8 Plugin problem

open
nobody
None
5
2008-07-05
2008-07-05
David Hall
No

Hi,

first off, thanks for a gr8t utility.

now to my problem.

I made a small bash script that writes the ip of the ssh attacker down in a textfile. When i manualy run it it works great (ex. abuse.sh 192.168.1.3) but denyhosts doesnt seem to run it for me.

This is the line i added in the conf

PLUGIN_DENY=/scripts/abuse.sh

The permissions on the file atm is (just so it wouldnt be a permission problem)

-rwxrwxrwx 1 root root 265 2008-07-04 11:27 abuse.sh

The script looks like this.
#!/bin/bash
#Get parameter
IP=$1
#Set Date/Time
DATE=`date +%d-%m-%y:%T`
#Do the magic.
HTML1="<tr><td><font color=silver>"
HTML2="</font></td><td>-> <a href=lookup.php?ip="
HTML3=">"
HTML4="</a>"
HTML5="</td></tr>"
echo "$HTML1 `date` $HTML2$IP$HTML3 $IP" $HTML4
$HTML5>> /var/www/hacks.php

Discussion