diff --git a/lib/msf/core/exploit/http/server.rb b/lib/msf/core/exploit/http/server.rb index ddf8540e53..6fb42d2ec2 100644 --- a/lib/msf/core/exploit/http/server.rb +++ b/lib/msf/core/exploit/http/server.rb @@ -43,7 +43,7 @@ module Exploit::Remote::HttpServer register_advanced_options([ OptAddress.new('URIHOST', [false, 'Host to use in URI (useful for tunnels)']), OptPort.new('URIPORT', [false, 'Port to use in URI (useful for tunnels)']), - OptBool.new('SendRobots', [ false, "Return a robots.txt file if asked for one", false]), + OptBool.new('SendRobots', [false, 'Return a robots.txt file if asked for one', false]) ]) # Used to keep track of resources added to the service manager by @@ -181,22 +181,22 @@ module Exploit::Remote::HttpServer end if datastore['SendRobots'] - add_robots_resource() + add_robots_resource end add_resource(uopts) end - def add_robots_resource() + def add_robots_resource proc = Proc.new do |cli, req| self.cli = cli send_robots(cli, req) end - vprint_status("Adding hardcoded uri /robots.txt") + vprint_status('Adding hardcoded URI /robots.txt') begin - add_resource({'Path' => "/robots.txt", 'Proc' => proc}) + add_resource('Path' => '/robots.txt', 'Proc' => proc) rescue RuntimeError => e print_warning(e.message) end @@ -629,9 +629,9 @@ module Exploit::Remote::HttpServer # Sends a canned robots.txt file # def send_robots(cli, request) - print_status("sending robots.txt") + print_status('Sending robots.txt') robots = create_response(200, 'Success') - robots['Content-Type'] = "text/plain" + robots['Content-Type'] = 'text/plain' robots.body = %Q{\ User-agent: *