Module: Scanny::Checks::Helpers

Instance Method Summary collapse

Instance Method Details

#build_pattern_exec_command(command) ⇒ Object

system(“command”) ‘command`



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/scanny/checks/helpers.rb', line 6

def build_pattern_exec_command(command)
  command = command.to_s if command.is_a?(Symbol)
  result  = command.inspect

  "      SendWithArguments\n      <\n        name = :system | :exec | :spawn,\n        arguments = ActualArguments<\n          array = [\n            any*,\n            StringLiteral<string *= \#{result}>,\n            any*\n          ]\n        >\n      >\n      |\n      ExecuteString<string *= \#{result}>\n  EOT\nend\n"