Skip to content

Instantly share code, notes, and snippets.

@rodrigopinto
Created June 15, 2012 22:02
Show Gist options
  • Select an option

  • Save rodrigopinto/2938918 to your computer and use it in GitHub Desktop.

Select an option

Save rodrigopinto/2938918 to your computer and use it in GitHub Desktop.
design code suggestions?
class ToolParserWorker
include Sidekiq::Worker
def perform(scan)
## On a near futute NessusParser will die an become a ParserFactory based on scan tool type
report = NessusParser.execute(self.file.current_path) # execute returns a Report object
scan.update_parsed_report(report.to_json) # scan is mongo document
end
end
@rafaelp
Copy link

rafaelp commented Jun 26, 2012

Não tinha entendido que haveriam vários parsers, neste caso fico com a solução do @pellegrino, reescrita pelo @caike

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment