Use fail_with() instead of return

master
cbrnrd 2019-04-02 13:42:07 -04:00
parent 0069eed4e2
commit f353df952c
No known key found for this signature in database
GPG Key ID: 6430F933429D8C26
1 changed files with 2 additions and 4 deletions

View File

@ -90,10 +90,8 @@ class MetasploitModule < Msf::Auxiliary
return
end
unless datastore['TARGET_FILE'][0] == '/'
print_error "TARGET_FILE must be an absolute path (eg. /etc/passwd)."
return
end
fail_with(Failure::BadConfig, 'TARGET_FILE must be an absolute path (eg. /etc/passwd).') unless datastore['TARGET_FILE'][0] == '/'
print_status "Requesting file #{datastore['TARGET_FILE']}"