Skip to content

Commit 330526a

Browse files
committed
Update check method
1 parent 3c4dfee commit 330526a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

modules/exploits/windows/http/octopusdeploy_deploy.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,12 @@ def check
5959
elsif datastore['USERNAME'] && datastore['PASSWORD']
6060
res = do_login
6161
else
62-
fail_with(Failure::BadConfig, 'Need username and password or API key')
62+
begin
63+
fail_with(Failure::BadConfig, 'Need username and password or API key')
64+
rescue Msf::Exploit::Failed => e
65+
vprint_error(e.message)
66+
return CheckCode::Unknown
67+
end
6368
end
6469
disconnect
6570
return CheckCode::Unknown if res.nil?
@@ -125,6 +130,7 @@ def exploit
125130
# Deploy
126131
#
127132
dash = do_get_dashboard(session, project_id)
133+
128134
environment = dash['Environments'][0]['Id']
129135
environment_name = dash['Environments'][0]['Name']
130136
skip_steps = do_get_skip_steps(session, release_id, environment, step_name)

0 commit comments

Comments
 (0)