LARGE modus complete
This commit is contained in:
parent
ba5e40a603
commit
6f428d6a63
1 changed files with 44 additions and 37 deletions
|
@ -294,17 +294,19 @@ flootworker()
|
||||||
{
|
{
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
#FLOOTSRUNNING=$((FLOOTSRUNNING+1))
|
if [ $LARGE ]
|
||||||
#test $FLOOTSRUNNING -le $FLOOTFORKS &&
|
then
|
||||||
|
xymode
|
||||||
|
echo "$OFFSET"
|
||||||
|
for i in $(seq 0 $1 | shuf)
|
||||||
|
do
|
||||||
|
echo "${LOL[$i]}"
|
||||||
|
done
|
||||||
|
else
|
||||||
xymode
|
xymode
|
||||||
echo "$OFFSET
|
echo "$OFFSET
|
||||||
${LOL[$1]}" #> /dev/tcp/$IPFLOOT/$FLOOTPORT || message warn "transmission in worker ${YELLOW}$1${ENDCOLOR} ${RED}failed${ENDCOLOR} - maybe you need to decrease ${YELLOW}FLOOTFORKS${ENDCOLOR} or expand/tune your uplink"
|
${LOL[$1]}"
|
||||||
#FLOOTSRUNNING=$((FLOOTSRUNNING-1))
|
fi
|
||||||
#echo "${LOL[$i]}" > /dev/tcp/127.0.0.1/1337 &
|
|
||||||
|
|
||||||
#echo "worker $i PID ${LOLPID[$i]}"
|
|
||||||
|
|
||||||
done > /dev/tcp/$IPFLOOT/$FLOOTPORT || message warn "transmission in worker ${YELLOW}$1${ENDCOLOR} ${RED}failed${ENDCOLOR} - maybe you need to decrease ${YELLOW}FLOOTFORKS${ENDCOLOR} or expand/tune your uplink"
|
done > /dev/tcp/$IPFLOOT/$FLOOTPORT || message warn "transmission in worker ${YELLOW}$1${ENDCOLOR} ${RED}failed${ENDCOLOR} - maybe you need to decrease ${YELLOW}FLOOTFORKS${ENDCOLOR} or expand/tune your uplink"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,25 +326,27 @@ loadLOL() {
|
||||||
# max 64k each one
|
# max 64k each one
|
||||||
if [ $LARGE ]
|
if [ $LARGE ]
|
||||||
then
|
then
|
||||||
FIELDSIZE=64000
|
LOL_org="$(echo "$LOL_org" | shuf)"
|
||||||
|
LOLFIELDSIZE=64000
|
||||||
# line counter
|
# line counter
|
||||||
L=1
|
L=1
|
||||||
LINES="$(echo "$LOL_org" | wc -l )"
|
LINES="$(echo "$LOL_org" | wc -l )"
|
||||||
FIELDS="$(( ( $LINES / $FIELDSIZE ) ))"
|
LOLFIELDS="$(( ( $LINES / $LOLFIELDSIZE ) ))"
|
||||||
message "LARGE mode: slicing ${YELLOW}${IMGFILE}${ENDCOLOR} - ${YELLOW}${LINES}${ENDCOLOR} into ${YELLOW}${FIELDS}${ENDCOLOR} fields"
|
message "LARGE mode: slicing ${YELLOW}${IMGFILE}${ENDCOLOR} - ${YELLOW}${LINES}${ENDCOLOR} into ${YELLOW}${LOLFIELDS}${ENDCOLOR} fields"
|
||||||
|
|
||||||
i=0
|
i=0
|
||||||
while [ $i -le $FIELDS ]
|
while [ $i -le $LOLFIELDS ]
|
||||||
do
|
do
|
||||||
LN=$(($L+$FIELDSIZE+1))
|
LN=$(($L+$LOLFIELDSIZE+1))
|
||||||
message "field ${YELLOW}${i}${ENDCOLOR}, lines ${YELLOW}${L}${ENDCOLOR} - ${YELLOW}${LN}${ENDCOLOR}"
|
message "field ${YELLOW}${i}${ENDCOLOR}, lines ${YELLOW}${L}${ENDCOLOR} - ${YELLOW}${LN}${ENDCOLOR}"
|
||||||
LOL[$i]="$(echo "$LOL_org" | sed -n "${L},$(($LN-1))p;${LN}q" )"
|
LOL[$i]="$(echo "$LOL_org" | sed -n "${L},$(($LN-1))p;${LN}q" )"
|
||||||
L=$LN
|
L=$LN
|
||||||
|
|
||||||
i=$(($i+1))
|
i=$(($i+1))
|
||||||
done
|
done
|
||||||
echo STOP
|
#~ echo "${LOL[14]}"
|
||||||
read
|
#~ echo STOP
|
||||||
|
#~ read
|
||||||
|
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -439,10 +443,7 @@ floot() {
|
||||||
|
|
||||||
message "starting $FLOOTFORKS workers"
|
message "starting $FLOOTFORKS workers"
|
||||||
|
|
||||||
if [ $LARGE ]
|
|
||||||
then
|
|
||||||
echo lol
|
|
||||||
else
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
for i in $(seq $FLOOTFORKS)
|
for i in $(seq $FLOOTFORKS)
|
||||||
|
@ -453,14 +454,20 @@ floot() {
|
||||||
message "worker ${YELLOW}$i${ENDCOLOR} is not running, starting it"
|
message "worker ${YELLOW}$i${ENDCOLOR} is not running, starting it"
|
||||||
#if [ "$FLOOTSRUNNING" -le "$FLOOTFORKS" ]
|
#if [ "$FLOOTSRUNNING" -le "$FLOOTFORKS" ]
|
||||||
#then
|
#then
|
||||||
|
if [ $LARGE ]
|
||||||
|
then
|
||||||
|
flootworker $LOLFIELDS &
|
||||||
|
LOLPID[$i]=$!
|
||||||
|
else
|
||||||
flootworker $i &
|
flootworker $i &
|
||||||
LOLPID[$i]=$!
|
LOLPID[$i]=$!
|
||||||
|
fi
|
||||||
#fi
|
#fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
|
|
Loading…
Reference in a new issue