Skip to content

Commit 3f26a0a

Browse files
committed
minor changes to display, found bug
1 parent e8c97bf commit 3f26a0a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

modules/TerraformController.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ def getIP(self, response, machine_type):
275275
for machine in response:
276276
for x in machine:
277277
if machine_type in x:
278+
print(machine_type, x)
278279
ip = machine[2]
279280
return ip
280281

@@ -289,33 +290,33 @@ def show_message(self, response):
289290
print_messages.append(msg)
290291

291292
# windows domain controller
292-
if self.config['windows_domain_controller']:
293+
if self.config['windows_domain_controller'] == 1:
293294
win_ip = self.getIP(response, 'win-dc')
294295
msg = "Access Windows Domain Controller via:\n\tRDP > rdp://" + win_ip + ":3389\n\tusername: Administrator \n\tpassword: " + self.config['attack_range_password']
295296
print_messages.append(msg)
296297

297298
# windows domain controller
298-
if self.config['windows_server']:
299+
if self.config['windows_server'] == 1:
299300
win_server = self.getIP(response, 'win-server')
300301
msg = "Access Windows Server via:\n\tRDP > rdp://" + win_server + ":3389\n\tusername: Administrator \n\tpassword: " + self.config['attack_range_password']
301302
print_messages.append(msg)
302303

303304
# kali linux
304-
if self.config['kali_machine']:
305+
if self.config['kali_machine'] == 1:
305306
kali_ip = self.getIP(response, 'kali')
306307
msg = "Access Kali via:\n\tSSH > ssh -i" + self.config['private_key_path'] \
307308
+ " ubuntu@" + kali_ip + "\n\tusername: kali \n\tpassword: " + self.config['attack_range_password']
308309
print_messages.append(msg)
309310

310311
# osquery linux
311-
if self.config['osquery_machine']:
312+
if self.config['osquery_machine'] == 1:
312313
osquerylnx_ip = self.getIP(response, 'osquerylnx')
313314
msg = "Access Osquery via:\n\tSSH > ssh -i" + self.config['private_key_path'] \
314315
+ " ubuntu@" + osquerylnx_ip + "\n\tusername: kali \n\tpassword: " + self.config['attack_range_password']
315316
print_messages.append(msg)
316317

317318
# phantom linux
318-
if self.config['phantom_server']:
319+
if self.config['phantom_server'] == 1:
319320
phantom_ip = self.getIP(response, 'phantom')
320321
msg = "Access Phantom via:\n\tWeb > https://" + phantom_ip + "\n\tSSH > ssh -i" + self.config['private_key_path'] \
321322
+ " centos@" + phantom_ip + "\n\tusername: admin \n\tpassword: " + self.config['attack_range_password']

0 commit comments

Comments
 (0)