Skip to content

Commit d5ce9d2

Browse files
author
desktop machine
committed
updated code
1 parent 9d058bd commit d5ce9d2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

dhalsim/network_attacks/concealment_ae_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ def load_scaler(self, scaler_path):
7474
# Saves the model and the scaler used to train the model
7575
def save_model(self, filename):
7676
print('saving trained model at: ', str(filename))
77-
self.generator.save(str(model_path))
77+
self.generator.save(str(filename))
7878

7979
scaler_path = Path.cwd()
80-
print('saved scaler model at: ', filename)
80+
print('saved scaler model at: ', scaler_path)
8181
joblib.dump(self.attacker_scaler, 'ctown_attacker_scaler.gz')
8282

8383
def init_generator(self, training_path):

dhalsim/network_attacks/unconstrained_blackbox_netfilter_queue.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ def handle_sync(self):
140140
while not self.get_sync(2):
141141
pass
142142

143-
# self.logger.debug('Sync is 2. Keeping attack sync in 2, until we get all SCADA flags')
143+
self.logger.debug('Sync is 2. Keeping attack sync in 2, until we get all SCADA flags')
144144

145145
# We stay in 2, to conceal the values exchanged remotely from the PLCs, until we make a prediction
146146
while self.missing_scada_tags and self.sync_flag:
147147
pass
148148

149-
# self.logger.debug('Setting attack sync in 3')
149+
self.logger.debug('Setting attack sync in 3')
150150
self.set_sync(3)
151151

152152
self.logger.debug('Netfilter sync thread while finished')
@@ -184,7 +184,7 @@ def process_tag_in_missing(self, session, ip_payload):
184184
self.received_scada_tags_df.loc[current_clock, session['tag']] = translate_payload_to_float(
185185
ip_payload[Raw].load)
186186
self.missing_scada_tags.remove(session['tag'])
187-
# self.logger.debug('Missing tags len after removing: ' + str(len(self.missing_scada_tags)))
187+
self.logger.debug('Missing tags len after removing: ' + str(len(self.missing_scada_tags)))
188188

189189
def scada_tag_list_empty(self):
190190
# self.logger.debug('SCADA set empty')

0 commit comments

Comments
 (0)