-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added script for auto restart every X seconds with pause
- Loading branch information
1 parent
9ef0d1e
commit 4e6b75e
Showing
3 changed files
with
38 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
# Base image | ||
FROM python:latest | ||
|
||
COPY *.py /nowarddos/ | ||
COPY requirements.txt /nowarddos/ | ||
COPY . /nowarddos/ | ||
|
||
WORKDIR /nowarddos | ||
RUN pip install -r requirements.txt | ||
|
||
ENTRYPOINT ["python", "/nowarddos/updater.py"] | ||
ENTRYPOINT ["/bin/sh", "start.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
DEFAULT_THREADS=500 | ||
DEFAULT_ATTACK_TIME=90 | ||
DEFAULT_PAUSE=30 | ||
|
||
THREADS=${1:-$DEFAULT_THREADS} | ||
ATTACK_TIME=${2:-$DEFAULT_ATTACK_TIME}; | ||
PAUSE=${3:-$DEFAULT_PAUSE}; | ||
|
||
handler() | ||
{ | ||
echo "\n\n\n\nHanled SIGINT Killing: "$!"\n\n\n\n"; | ||
pkill -9 -f Python; | ||
break; | ||
} | ||
|
||
trap handler SIGINT; | ||
|
||
while true; | ||
do | ||
echo "\n\n\n\nStarting attack for "$ATTACK_TIME" seconds...\n\n\n\n"; | ||
python3 updater.py $THREADS -v -n -p & sleep $ATTACK_TIME; | ||
pkill -9 -f Python; | ||
echo "\n\n\n\nKilled: "$!"\n"; | ||
echo "Waiting: "$PAUSE" seconds...\n\n\n\n"; | ||
sleep $PAUSE; | ||
done |