|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.securitycentric.metacoretex.lib.AbstractProbe
com.securitycentric.metacoretex.lib.AbstractCommandProbe
Command Probes are used to run an operating system command or tool agains the target system and store the output in the KB/Report. Probes of this type should add their information under the KB key "command/asdfasdf" where asdfasdf is the name of the command. STDOUT output from the command will be automatically added to the report. This is one of the few probe types which don't require the developer to implement their own probe() method.
Field Summary | |
java.lang.String |
args
command line arguments for cmd |
java.lang.String |
cmd
the command to run |
java.lang.String |
key
the KB key to use in setting this information in the KB |
Fields inherited from class com.securitycentric.metacoretex.lib.AbstractProbe |
copyright, depVect, enabled, familyStr, helpStr, nameStr, options, pException, probeId, provHash, reportable, repStr, safe, severity, target, timeout, unspec, version |
Constructor Summary | |
AbstractCommandProbe()
|
Method Summary | |
java.lang.String |
getArgs()
Return the arguments string for this command probe. |
java.lang.String |
getCommand()
Get a String of the command which this probe will execute on probe(). |
java.lang.String |
getKbKey()
Get the KB key (String) which is set by this probe. |
void |
probe()
This Abstract probe implements is't own probe() method, because command probes are just regular commands who'se output ends up in the report. |
void |
setArgs(java.lang.String args)
Set the arguments to the command. |
void |
setCommand(java.lang.String cmd)
Set the cmd string which is used to exec the probe |
void |
setKbKey(java.lang.String key)
Set the KB key which this probe will use to store the STDOUT results of the command on execution. |
Methods inherited from class com.securitycentric.metacoretex.lib.AbstractProbe |
addDepends, addOption, addProvides, addReport, depends, dumpOptions, getCopyright, getException, getFamily, getHelp, getHost, getName, getOption, getOptionKeys, getProbeId, getReport, getSeverity, getTarget, getTimeout, getVersion, hasSafe, isEnabled, isReportable, kbGet, kbHas, kbPut, probeSafe, provides, replaceOptions, run, setCopyright, setEnabled, setFamily, setHelp, setName, setProbeId, setReport, setReportable, setSeverity, setTarget, setTimeout, setVersion |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.securitycentric.metacoretex.interfaces.Probe |
addDepends, addOption, addProvides, addReport, depends, dumpOptions, getCopyright, getException, getFamily, getHelp, getHost, getName, getOption, getOptionKeys, getProbeId, getReport, getSeverity, getTarget, getTimeout, getVersion, hasSafe, isEnabled, isReportable, kbGet, kbHas, kbPut, probeSafe, provides, replaceOptions, setCopyright, setEnabled, setFamily, setHelp, setName, setProbeId, setReport, setReportable, setSeverity, setTarget, setTimeout, setVersion |
Methods inherited from interface java.lang.Runnable |
run |
Field Detail |
public java.lang.String cmd
public java.lang.String args
public java.lang.String key
Constructor Detail |
public AbstractCommandProbe()
Method Detail |
public java.lang.String getCommand()
getCommand
in interface CommandProbe
public java.lang.String getArgs()
getArgs
in interface CommandProbe
public void setCommand(java.lang.String cmd)
setCommand
in interface CommandProbe
cmd
- name of the command to set for executionpublic void setArgs(java.lang.String args)
getHost()
inserted into the argument string.
setArgs
in interface CommandProbe
args
- String like "-v -oX - _TARGET_" <-- extra credit, what app is this for?public void setKbKey(java.lang.String key)
setKbKey
in interface CommandProbe
key
- String like "command/nmap"public java.lang.String getKbKey()
getKbKey
in interface CommandProbe
public void probe() throws ProbeException
probe
in interface Probe
ProbeException
- These exceptions are thrown when failure causes the probe to be unable to determine weather or not the target is vulnerable.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |