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
028cac81
Commit
028cac81
authored
3 weeks ago
by
NGUYEN Do Duc Anh
Browse files
Options
Downloads
Patches
Plain Diff
update auto start attack
parent
48dc594e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
window/monitor_start_attack.ps1
+1
-0
1 addition, 0 deletions
window/monitor_start_attack.ps1
window/run_monitor_start_attack_script.bat
+1
-1
1 addition, 1 deletion
window/run_monitor_start_attack_script.bat
window/tcp_crash_listener.py
+18
-2
18 additions, 2 deletions
window/tcp_crash_listener.py
with
20 additions
and
3 deletions
window/monitor_start_attack.ps1
+
1
−
0
View file @
028cac81
...
...
@@ -5,6 +5,7 @@ $localIP = "0.0.0.0" # Listen on all interfaces
# Create TCP listener
$listener
=
New-Object
System.Net.Sockets.TcpListener
([
System.Net.IPAddress
]::
Parse
(
$localIP
),
$listenerPort
)
$listener
.
Start
()
try
{
# Wait for any connection
...
...
This diff is collapsed.
Click to expand it.
window/run_monitor_start_attack_script.bat
+
1
−
1
View file @
028cac81
@echo
off
powershell
-ExecutionPolicy
Bypass
-File
"C:\Users\window7_pc\Desktop\monitor_start_attack
_script
.ps1"
powershell
-ExecutionPolicy
Bypass
-File
"C:\Users\window7_pc\Desktop\monitor_start_attack.ps1"
\ No newline at end of file
This diff is collapsed.
Click to expand it.
window/tcp_crash_listener.py
+
18
−
2
View file @
028cac81
...
...
@@ -5,6 +5,7 @@ import queue
import
subprocess
import
os
import
json
# import numpy as np
# import matplotlib.pyplot as plt
...
...
@@ -74,7 +75,20 @@ def generate_and_send_traffic_matrix():
for
ip
,
receive_rate
in
trace_receive
.
items
():
print
(
"
IP:
"
,
ip
,
"
should received rate:
"
,
receive_rate
)
print
(
"
Finish sending traffic matrix
"
)
def
notify_window_attacker
():
global
map_point
point_ips
=
map_point
.
keys
()
for
point_ip_send
in
point_ips
:
client_socket
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
client_socket
.
settimeout
(
2.0
)
try
:
client_socket
.
connect
((
point_ip_send
,
12345
))
client_socket
.
close
()
except
(
ConnectionRefusedError
,
socket
.
timeout
):
continue
print
(
"
Finished sending attack demands
"
)
def
notify_ubuntu_internode
():
...
...
@@ -112,9 +126,11 @@ def read_and_write_points():
if
len
(
map_point
.
keys
())
==
num_machine
:
notify_ubuntu_internode
()
input
(
"
Press Enter to
continue...
"
)
input
(
"
Press Enter to
start traffic generation
"
)
# time.sleep(3) # Sleep to wait the last windows finish opening the generator tool
generate_and_send_traffic_matrix
()
input
(
"
Press Enter to start attack
"
)
notify_window_attacker
()
else
:
print
(
"
IP crashed:
"
,
ip_client
[
1
])
except
queue
.
Empty
:
...
...
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