aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcron-sh/promisc_check.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/cron-sh/promisc_check.sh b/cron-sh/promisc_check.sh
index 99036a4..62d61e2 100755
--- a/cron-sh/promisc_check.sh
+++ b/cron-sh/promisc_check.sh
@@ -5,10 +5,14 @@
LogPromisc() {
date=`date`
- Syslog "Security warning : $1 is in promiscuous mode."
- Syslog " A sniffer is probably running on your system."
- Ttylog "\\033[1;31mSecurity warning : $1 is in promiscuous mode.\\033[0;39m"
- Ttylog "\\033[1;31mA sniffer is probably running on your system.\\033[0;39m"
+ tempfile=`mktemp /tmp/promisc.XXXXXX`
+ echo "Security warning : $1 is in promiscuous mode." > $tempfile
+ echo " A sniffer is probably running on your system." >> $tempfile
+ Syslog $tempfile
+ echo "\\033[1;31mSecurity warning : $1 is in promiscuous mode.\\033[0;39m" > $tempfile
+ echo "\\033[1;31mA sniffer is probably running on your system.\\033[0;39m" >> $tempfile
+ Ttylog $tempfile
+ rm -f $tempfile
# are we being run from security.sh script?
if [ ! -z "$SECURITY" ]; then