Class ExecutionResults

java.lang.Object
org.nmap4j.core.nmap.ExecutionResults

public class ExecutionResults extends Object
This class contains the various outputs from an execution of nmap. This includes the stdout and stderr.

In general it's not entirely possible for this framework to detect or handle every failure. Therefore it's always best to check the contents of stderr before wondering why there are no results.

  • Constructor Details

    • ExecutionResults

      public ExecutionResults()
    • ExecutionResults

      public ExecutionResults(String err, String out)
      Create a new ExecutionResults object from the std out and std err from the nmap execution.
      Parameters:
      err -
      out -
  • Method Details

    • getErrors

      public String getErrors()
      Returns the error stream from the nmap execution.
      Returns:
    • setErrors

      public void setErrors(String errors)
      Sets the value for the error stream.
      Parameters:
      errors -
    • getOutput

      public String getOutput()
      Returns the value from the output stream from the NMap execution.
      Returns:
    • setOutput

      public void setOutput(String output)
      Sets the value for the std out.
      Parameters:
      output -
    • hasErrors

      public boolean hasErrors()
      Returns true if the errors String is not null and it's length is greater than 0.
      Returns:
    • getExecutedCommand

      public String getExecutedCommand()
      Returns the command executed to collect these outputs.
      Returns:
    • setExecutedCommand

      public void setExecutedCommand(String command)
      Used to set the executed command.
      Parameters:
      command -