store | blogs | forums | twitter | facebook | wiki | mailing lists | downloads | support portal
Atomic Secure Linux
It is currently Thu May 23, 2013 3:33 pm

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic Share/Bookmark  [ 8 posts ] 
Author Message
 Post subject: Remove [1;33m from rkhunter output
Unread postPosted: Mon Oct 25, 2010 5:41 pm 
Offline
Forum Regular
Forum Regular
User avatar

Joined: Wed Jan 13, 2010 9:11 am
Posts: 180
Location: Bali
[ Rootkit Hunter version 1.3.6 ]

[1;33mChecking rkhunter version... [0;39m
This version : 1.3.6
Latest version: 1.3.6
[ Rootkit Hunter version 1.3.6 ]

[1;33mChecking rkhunter data files... [0;39m
Checking file mirrors.dat [34C[ [1;32mNo update [0;39m ]
Checking file programs_bad.dat [29C[ [1;32mNo update [0;39m ]
Checking file backdoorports.dat [28C[ [1;32mNo update [0;39m ]
Checking file suspscan.dat [33C[ [1;32mNo update [0;39m ]
Checking file i18n/cn [38C[ [1;32mNo update [0;39m ]
Checking file i18n/de [38C[ [1;32mNo update [0;39m ]
Checking file i18n/en [38C[ [1;32mNo update [0;39m ]
Checking file i18n/zh [38C[ [1;32mNo update [0;39m ]
Checking file i18n/zh.utf8 [33C[ [1;32mNo update [0;39m ]

Anyone know how to remove the weird characters?

This is my cron script:
Code:
#!/bin/sh
(
/usr/local/bin/rkhunter --versioncheck
/usr/local/bin/rkhunter --update
/usr/local/bin/rkhunter --cronjob --report-warnings-only
) | /bin/mail -s 'rkhunter Daily Run on server' my@email.com

_________________
They say that good intentions, pave the road to hell;
If a thing is not worth doing, it's not worth doing well.


Top
 Profile  
 
 Post subject: Re: Remove [1;33m from rkhunter output
Unread postPosted: Mon Oct 25, 2010 6:17 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
User avatar

Joined: Thu Feb 07, 2008 7:49 pm
Posts: 3245
Location: Chantilly, VA
Those are ANSI color codes. You need to use the --nocolors option.

_________________
Michael Shinn
Atomicorp - Security For Everyone

Co-Author of Troubleshooting Linux Firewalls.


Top
 Profile  
 
 Post subject: Re: Remove [1;33m from rkhunter output
Unread postPosted: Mon Oct 25, 2010 6:32 pm 
Offline
Forum Regular
Forum Regular
User avatar

Joined: Wed Jan 13, 2010 9:11 am
Posts: 180
Location: Bali
Yes, I tried that once before, without success.
This time I have placed it on a separate line.
Code:
#!/bin/sh
(
/usr/local/bin/rkhunter --versioncheck
/usr/local/bin/rkhunter --update
/usr/local/bin/rkhunter --cronjob --report-warnings-only
/usr/local/bin/rkhunter --nocolors
) | /bin/mail -s 'rkhunter Daily Run on server' email@me.com


(lazily) I will let the cron run tomorrow...

_________________
They say that good intentions, pave the road to hell;
If a thing is not worth doing, it's not worth doing well.


Top
 Profile  
 
 Post subject: Re: Remove [1;33m from rkhunter output
Unread postPosted: Mon Oct 25, 2010 6:35 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 7428
Location: earth
Also this -> /usr/local/bin/rkhunter is not our rkhunter. So your problems might be related to that.


Top
 Profile  
 
 Post subject: Re: Remove [1;33m from rkhunter output
Unread postPosted: Mon Oct 25, 2010 6:37 pm 
Offline
Forum Regular
Forum Regular
User avatar

Joined: Wed Jan 13, 2010 9:11 am
Posts: 180
Location: Bali
scott wrote:
Also this -> /usr/local/bin/rkhunter is not our rkhunter. So your problems might be related to that.


Yes, it is a standalone version on the host server.
ASL & your rkhunter are on the virtual.

_________________
They say that good intentions, pave the road to hell;
If a thing is not worth doing, it's not worth doing well.


Top
 Profile  
 
 Post subject: Re: Remove [1;33m from rkhunter output
Unread postPosted: Mon Oct 25, 2010 7:18 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
User avatar

Joined: Thu Feb 07, 2008 7:49 pm
Posts: 3245
Location: Chantilly, VA
You need to call "--nocolors" each time you invoke rkhunter when you want it to not generate ANSI colors.

/usr/local/bin/rkhunter --versioncheck --nocolors
/usr/local/bin/rkhunter --update --nocolors
/usr/local/bin/rkhunter --cronjob --report-warnings-only --nocolors

You also dont need to call rkhunter each time, you can stack those options if you like:

rkhunter --versioncheck --update --cronjob --report-warnings-only --nocolors

_________________
Michael Shinn
Atomicorp - Security For Everyone

Co-Author of Troubleshooting Linux Firewalls.


Top
 Profile  
 
 Post subject: Re: Remove [1;33m from rkhunter output
Unread postPosted: Tue Oct 26, 2010 5:47 pm 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Sat Aug 20, 2005 9:30 am
Posts: 2812
Location: The Netherlands
From rkhunter --help:

Quote:
--cronjob Run as a cron job
(implies -c, --sk and --nocolors options)


So, when using --cronjob you don't even need to specify --nocolors. :)

(I see ART's rkhunter also uses both --cronjob and --nocolor in /etc/cron.daily/rkhunter, but yeah, it still works, so it doesn't matter much.)

_________________
Lemonbit Internet Dedicated Server Management


Top
 Profile  
 
 Post subject: Re: Remove [1;33m from rkhunter output
Unread postPosted: Tue Oct 26, 2010 7:48 pm 
Offline
Forum Regular
Forum Regular
User avatar

Joined: Wed Jan 13, 2010 9:11 am
Posts: 180
Location: Bali
I found that this separates the output nicely.
Code:
/usr/local/bin/rkhunter --versioncheck --nocolors
/usr/local/bin/rkhunter --update --nocolors
/usr/local/bin/rkhunter --cronjob --report-warnings-only --nocolors

Other options work but do not separate the output like the above option.

_________________
They say that good intentions, pave the road to hell;
If a thing is not worth doing, it's not worth doing well.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic Share/Bookmark  [ 8 posts ] 

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group