Portal Home > Knowledgebase > Articles Database > rkhunter blank output
rkhunter blank output
Posted by kshazad86, 02-13-2015, 08:04 AM |
I have installed rkhunter on my cPanel server, but the when I setup a cronjob with following contents, I am emailed a blank response:
#!/bin/sh
( /usr/local/bin/rkhunter --versioncheck
/usr/local/bin/rkhunter --update
/usr/local/bin/rkhunter -c -sk
) | /bin/mail -s "rkhunter Daily Scan" email@address.com
Any ideas?
|
Posted by YUPAPA, 02-13-2015, 08:54 AM |
|
Posted by TheSHosting, 02-13-2015, 09:30 AM |
There is a cron option as well
But that needs the contact email defined in the rkhunter conf.
|
Posted by kshazad86, 02-13-2015, 10:52 AM |
This made no difference. I get an email but instead of showing the direct output of the commands, I get an attachment in the email.
|
Posted by YUPAPA, 02-14-2015, 02:28 AM |
Sorry have never used rkhunter before, however this should work after testing as I know the bugger is the ANSI-escape-code.
The formatting is screwed up, but can be fixed with a bit of programming work.
|
Posted by TheSHosting, 02-14-2015, 03:01 AM |
If you are just looking for the output of rkhunter scan finally, following syntax is the way and no need for such a complex way of scripting.
I understand there are two more commands at top that you added to the mail content; but mostly there is nothing to analyse in its output. So something like following normally works ( if you want to add the update log as well; append those logs to input file as well ).
|
Posted by YUPAPA, 02-14-2015, 03:18 AM |
I have just noticed there is the "--nocolors" option for rkhunter. You could remove the sed command and append the option "--nocolors" to the end of the three rkhunter commands. That would work too!
|
Posted by kshazad86, 02-14-2015, 05:26 AM |
I can confirm the above code works
|
Add to Favourites Print this Article
Also Read