Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GNS3_unikernel_testbed
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NGUYEN Do Duc Anh
GNS3_unikernel_testbed
Commits
cefd5891
Commit
cefd5891
authored
3 weeks ago
by
NGUYEN Do Duc Anh
Browse files
Options
Downloads
Patches
Plain Diff
fix bug
parent
d2c71bcc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
window/tcp_crash_listener.py
+12
-7
12 additions, 7 deletions
window/tcp_crash_listener.py
with
12 additions
and
7 deletions
window/tcp_crash_listener.py
+
12
−
7
View file @
cefd5891
...
...
@@ -22,7 +22,7 @@ f = 0
A
=
[]
p_NAT
=
0
P_values
=
[]
MAX_TOTAL_TRAFFIC
=
5000
# Pkts/s
MAX_TOTAL_TRAFFIC
=
5000
# Pkts/s
PROTO
=
"
UDP
"
TIME_GENERATE
=
3600000
# ms
...
...
@@ -80,16 +80,21 @@ def generate_and_send_traffic_matrix():
print
(
"
IP:
"
,
ip
,
"
should received rate:
"
,
receive_rate
)
def
connect_attackers
(
ip
):
c_socket
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
try
:
c_socket
.
connect
((
ip
,
12345
))
c_socket
.
close
()
except
Exception
:
pass
def
notify_window_attacker
():
global
map_point
point_ips
=
map_point
.
keys
()
for
point_ip_send
in
point_ips
:
c_socket
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
try
:
c_socket
.
connect
((
point_ip_send
,
12345
))
c_socket
.
close
()
except
Exception
:
pass
threading
.
Thread
(
target
=
connect_attackers
,
args
=
[
point_ip_send
]).
start
()
print
(
"
Finished sending attack demands
"
)
...
...
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
register
or
sign in
to comment