From 18286ca2f73ac316f307d6a1a0c8e8f5012d3eab Mon Sep 17 00:00:00 2001 From: cbrnrd Date: Tue, 2 Apr 2019 13:43:30 -0400 Subject: [PATCH] Use start_with? instead of [0] --- modules/auxiliary/gather/rails_doubletap_file_read.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/auxiliary/gather/rails_doubletap_file_read.rb b/modules/auxiliary/gather/rails_doubletap_file_read.rb index 8652694133..bdc0bacb8c 100644 --- a/modules/auxiliary/gather/rails_doubletap_file_read.rb +++ b/modules/auxiliary/gather/rails_doubletap_file_read.rb @@ -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']}"