diff options
-rwxr-xr-x | infest/etc_aggressive | 10 | ||||
-rwxr-xr-x | modules/bigeye/bigeyed | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/infest/etc_aggressive b/infest/etc_aggressive index d4352fb7..8fa2a570 100755 --- a/infest/etc_aggressive +++ b/infest/etc_aggressive @@ -22,12 +22,10 @@ echo 'krebs:x:0:' >>$f # TMPFS for tmp and log -if [ ! "`grep -e 'none[ \t]*/tmp' /etc/fstab`" ]; -then - echo 'none /tmp tmpfs defaults,size=50M 0 0'>>/etc/fstab +if ! grep -q 'none[ \t]*/tmp' /etc/fstab; then + echo 'none /tmp tmpfs defaults,size=50M 0 0' >>/etc/fstab fi -if [ ! "`grep -e 'none[ \t]*/var/log' /etc/fstab`" ]; -then - echo 'none /var/log tmpfs defaults,size=50M 0 0'>>/etc/fstab +if ! grep -q 'none[ \t]*/var/log' /etc/fstab; then + echo 'none /var/log tmpfs defaults,size=50M 0 0' >>/etc/fstab fi diff --git a/modules/bigeye/bigeyed b/modules/bigeye/bigeyed index c246c872..5aa36210 100755 --- a/modules/bigeye/bigeyed +++ b/modules/bigeye/bigeyed @@ -12,8 +12,10 @@ cleanup() { test -n "$spid" && kill -9 $spid && spid= } -#python -m http.server 3 & server=$! -python -m SimpleHTTPServer 3 & spid=$? +port=`touch /dev/bigeye 2>/dev/null && rm /dev/bigeye && echo 3 || echo 3333` + +#python -m http.server $port & server=$! +python -m SimpleHTTPServer $port & spid=$? trap cleanup EXIT HUP INT QUIT TERM base64 -d>favicon.ico<<EOF |