Land #18126, Add additional logging to post test file

This commit is contained in:
cgranleese-r7 2023-06-20 14:26:14 +01:00 committed by GitHub
commit b1d437dfe6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -143,7 +143,7 @@ class MetasploitModule < Msf::Post
f = read_file(datastore['BaseFileName'])
ret = (f == 'foo')
unless ret
print_error("Didn't read what we wrote, actual file on target: |#{f}|")
vprint_status("Didn't read what we wrote, actual file on target: |#{f.inspect}| - #{f.bytes.inspect}")
end
ret
@ -158,7 +158,7 @@ class MetasploitModule < Msf::Post
final_contents = read_file(datastore['BaseFileName'])
ret &&= final_contents == 'foobarbaz'
unless ret
print_error("Didn't read what we wrote, actual file on target: #{final_contents}")
vprint_status("Didn't read what we wrote, actual file on target: |#{file_contents.inspect}| - #{file_contents.bytes.inspect}")
end
ret