Skip to content

Commit

Permalink
Update function: action_file_read
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir-Ivanov-Git committed Oct 6, 2020
1 parent b080803 commit 0a6f3a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/auxiliary/admin/sap/sap_igs_xmlchart_xxe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,9 @@ def action_file_read
# Download remote file
first_response = send_first_request
if first_response == -1
Exploit::CheckCode::Safe('The server encountered an exception when trying to respond to the first request and did not respond in the expected manner.')
fail_with(Failure::UnexpectedReply, 'The server encountered an exception when trying to respond to the first request and did not respond in the expected manner.')
elsif first_response == -2
Exploit::CheckCode::Safe('The server encountered an exception when trying to respond to the first request and did not respond in the expected manner.')
fail_with(Failure::UnexpectedReply, 'The server encountered an exception when trying to respond to the first request and did not respond in the expected manner.')
else
# Report Service and Vulnerability
report_service(
Expand Down Expand Up @@ -340,6 +340,8 @@ def action_file_read
vprint_good("File: #{@file} content from host: #{@host}\n#{@file_content}")
loot = store_loot('sap.igs.xmlchart.xxe', 'text/plain', @host, @file_content, @file, 'SAP IGS XMLCHART XXE')
print_good("File: #{@file} saved in: #{loot}")
else
print_error("Failed to get #{@file} content!")
end

end
Expand Down

0 comments on commit 0a6f3a7

Please sign in to comment.