Use start_with? instead of [0]

master
cbrnrd 2019-04-02 13:43:30 -04:00
parent f353df952c
commit 18286ca2f7
No known key found for this signature in database
GPG Key ID: 6430F933429D8C26
1 changed files with 1 additions and 1 deletions

View File

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