Skip to content

Commit

Permalink
Update Parser.run_plugins with keyword arguments. Add scanner to run_…
Browse files Browse the repository at this point in the history
…plugins
  • Loading branch information
urbanadventurer committed Dec 8, 2017
1 parent f1fb4ec commit 643635f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/whatweb/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
module WhatWeb
class Parser

def self.run_plugins(target, plugins)
def self.run_plugins(target: target, plugins: plugins, scanner: scanner)
results = []

if plugins.empty?
Expand Down
4 changes: 2 additions & 2 deletions whatweb
Original file line number Diff line number Diff line change
Expand Up @@ -650,14 +650,14 @@ scanner.scan do | target |

# change so we can call it without Target object and with just Headers, HTML, etc.
# note this modifies target with redirection info
result = WhatWeb::Parser.run_plugins(target, plugins)
result = WhatWeb::Parser.run_plugins(target: target, scanner: scanner, plugins: plugins)

# check for redirection
WhatWeb::Redirect.new(target, scanner, max_redirects)

WhatWeb::Parser.parse(target: target,
result: result,
logging_list: logging_list,
] logging_list: logging_list,
grep_plugin: use_custom_grep_plugin)
end

Expand Down

0 comments on commit 643635f

Please sign in to comment.