mirror of https://github.com/dirtbags/moth.git
a few changes for HACK
This commit is contained in:
parent
9df8ae9ca5
commit
78641dc57b
|
@ -1,7 +1,9 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
|
OPT=${CTF_BASE:-/opt}
|
||||||
|
|
||||||
# Use first installed binary
|
# Use first installed binary
|
||||||
for bin in /opt/*/bin/$1; do
|
for bin in $OPT/*/bin/$1; do
|
||||||
if [ -x $bin ]; then
|
if [ -x $bin ]; then
|
||||||
exec $bin
|
exec $bin
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -26,7 +26,7 @@ for pwfile in $OPT/*/password; do
|
||||||
if [ -f $pwfile ]; then
|
if [ -f $pwfile ]; then
|
||||||
(
|
(
|
||||||
cat bkup.png
|
cat bkup.png
|
||||||
tar cvf - $BASE | gzip -c | $OPT/*/bin/tea 3< $pwfile
|
tar cf - $BASE | gzip -c | $OPT/*/bin/tea 3< $pwfile
|
||||||
) > $BACKUP.new
|
) > $BACKUP.new
|
||||||
mv $BACKUP.new $BACKUP
|
mv $BACKUP.new $BACKUP
|
||||||
break
|
break
|
||||||
|
|
|
@ -40,10 +40,9 @@ if [ -x /sbin/inotifyd ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Simulate inotifyd by polling
|
# Simulate inotifyd by polling
|
||||||
cd $NEWDIR
|
|
||||||
while true; do
|
while true; do
|
||||||
find . -type f | while read fn; do
|
find $NEWDIR -type f | while read fn; do
|
||||||
./pointsd m $NEWDIR ${fn#./}
|
./pointsd m $NEWDIR ${fn##*/}
|
||||||
done
|
done
|
||||||
sleep 7
|
sleep 7
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue