Skip to content

Commit 5b599e9

Browse files
committed
Fixed the path to the attacks virtual environment.
Preparing DHALSIM release 0.3.0. Only missing aspect is proper integration with Davide's epynet Former-commit-id: 3fc359b
1 parent 16eb10b commit 5b599e9

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

ICS_topologies/enhanced_ctown_topology/automatic_plant.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,13 @@ def start_simulation(self):
5050
wntr_environment_path = home_path + str("/wntr-experiments/bin/python")
5151
print "Launching simulation for week index: " + str(sys.argv[2])
5252

53-
#cmd_string = wntr_environment_path + " physical_process.py " + sys.argv[1] + " " + sys.argv[2]
54-
cmd_string = wntr_environment_path + " physical_process_epynet.py " + sys.argv[1] + " " + sys.argv[2]
55-
#argv[3] is the attack repository path
53+
cmd_string = wntr_environment_path + " physical_process.py " + sys.argv[1] + " " + sys.argv[2]
54+
#cmd_string = wntr_environment_path + " physical_process_epynet.py " + sys.argv[1] + " " + sys.argv[2]
5655
if len(sys.argv) >= 4:
57-
cmd_string = wntr_environment_path + " physical_process_epynet.py " + sys.argv[1] + " " + sys.argv[2] + \
56+
#cmd_string = wntr_environment_path + " physical_process_epynet.py " + sys.argv[1] + " " + sys.argv[2] + \
57+
# " " + sys.argv[3]
58+
59+
cmd_string = wntr_environment_path + " physical_process.py " + sys.argv[1] + " " + sys.argv[2] + \
5860
" " + sys.argv[3]
5961

6062
cmd = shlex.split(cmd_string)

ICS_topologies/enhanced_ctown_topology/automatic_run.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def automatic_start(self):
199199
plc_number = str(self.attack_options['source_plc'])[-1]
200200
print("Attacker is node: " + 'attacker_' + str(plc_number))
201201
attacker = net.get('attacker_' + str(plc_number))
202-
cmd_string = "../../../attack-experiments/env/bin/python ../../attack_repository/mitm_plc/mitm_attack.py 192.168.1.1 192.168.1.254 "\
202+
cmd_string = "../../../attack-experiments/bin/python ../../attack_repository/mitm_plc/mitm_attack.py 192.168.1.1 192.168.1.254 "\
203203
+ str(self.attack_options['name']) + " "\
204204
+ str(self.attack_options['values'][0])
205205
mitm_cmd = shlex.split(cmd_string)
@@ -287,10 +287,6 @@ def finish(self):
287287
self.end_process(self.simulation)
288288
print "Physical Simulation process terminated"
289289

290-
# toDo: This method is not working
291-
#self.parse_pcap_files()
292-
#self.merge_pcap_files()
293-
294290
# moves all the results to a folder named week_<week_index>
295291
self.move_output_files(self.week_index)
296292

ICS_topologies/wadi_topology/automatic_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def automatic_start(self):
137137
plc_number = str(self.attack_options['source_plc'])[-1]
138138
print("Attacker is node: " + 'attacker_1')
139139
attacker = net.get('attacker_1')
140-
cmd_string = "../../../attack-experiments/env/bin/python ../../attack_repository/mitm_plc/wadi_mitm_attack.py 192.168.1.20 192.168.1.10 "\
140+
cmd_string = "../../../attack-experiments/bin/python ../../attack_repository/mitm_plc/wadi_mitm_attack.py 192.168.1.20 192.168.1.10 "\
141141
+ str(self.attack_options['name']) + " "\
142142
+ str(self.attack_options['values'][0])
143143
mitm_cmd = shlex.split(cmd_string)

0 commit comments

Comments
 (0)