Skip to content

Commit a950ecc

Browse files
committed
Clean up style
1 parent 378375c commit a950ecc

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/msf/core/exploit/http/server.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def initialize(info = {})
4343
register_advanced_options([
4444
OptAddress.new('URIHOST', [false, 'Host to use in URI (useful for tunnels)']),
4545
OptPort.new('URIPORT', [false, 'Port to use in URI (useful for tunnels)']),
46-
OptBool.new('SendRobots', [ false, "Return a robots.txt file if asked for one", false]),
46+
OptBool.new('SendRobots', [false, 'Return a robots.txt file if asked for one', false])
4747
])
4848

4949
# Used to keep track of resources added to the service manager by
@@ -181,22 +181,22 @@ def start_service(opts = {})
181181
end
182182

183183
if datastore['SendRobots']
184-
add_robots_resource()
184+
add_robots_resource
185185
end
186186

187187
add_resource(uopts)
188188

189189
end
190190

191-
def add_robots_resource()
191+
def add_robots_resource
192192
proc = Proc.new do |cli, req|
193193
self.cli = cli
194194
send_robots(cli, req)
195195
end
196196

197-
vprint_status("Adding hardcoded uri /robots.txt")
197+
vprint_status('Adding hardcoded URI /robots.txt')
198198
begin
199-
add_resource({'Path' => "/robots.txt", 'Proc' => proc})
199+
add_resource('Path' => '/robots.txt', 'Proc' => proc)
200200
rescue RuntimeError => e
201201
print_warning(e.message)
202202
end
@@ -629,9 +629,9 @@ def send_not_found(cli)
629629
# Sends a canned robots.txt file
630630
#
631631
def send_robots(cli, request)
632-
print_status("sending robots.txt")
632+
print_status('Sending robots.txt')
633633
robots = create_response(200, 'Success')
634-
robots['Content-Type'] = "text/plain"
634+
robots['Content-Type'] = 'text/plain'
635635

636636
robots.body = %Q{\
637637
User-agent: *

0 commit comments

Comments
 (0)