#!/bin/bash # Copyright (C) 2011 LAFKON/Christoph Haag # # This is free software, and you may redistribute it under the GPL. # This Software comes with absolutely no warranty. # For details see the license (http://www.lafkon.net/gpl.txt) FOLDER=non-free ACCESSFILE=./.forkaccess MAINURL=http://www.forkable.eu LIST=directories.list find ../../../ -type d | grep -v svn | \ sed 's/\.\.\/\.\.\/\.\.\///g' | \ shuf -n 60 > $LIST.tmp echo RewriteEngine on > $ACCESSFILE echo RewriteCond %{IS_SUBREQ} false >> $ACCESSFILE echo >> $ACCESSFILE ###################################################################### echo RewriteRule ^go\$ %\{TIME_SEC\} >> $ACCESSFILE echo >> $ACCESSFILE PREVURL=`cat $LIST.tmp | shuf -n 1` COUNT=0 while [ $COUNT -le 60 ] do URL=`cat $LIST.tmp | \ head -n \`expr $COUNT + 1\` | tail -1` while [ "$URL" = "$PREVURL" ] do URL=`cat $LIST.tmp | shuf -n 1` done ADRESS=$MAINURL/`echo $URL | cut -d " " -f 1` SEC=`echo 0$COUNT | rev | cut -c 1-2 | rev` echo RewriteRule \^$SEC\$ ${ADRESS} >> $ACCESSFILE COUNT=`expr $COUNT + 1` PREVURL=$URL done rm $LIST.tmp echo >> $ACCESSFILE ############################################################################## exit 0;