public class PassiveScanData extends Object
Context
data to passive scan rules. Details will be
based on the first Context
matched (if any).PassiveScanThread
,
PluginPassiveScanner
Modifier and Type | Method and Description |
---|---|
Context |
getContext()
Returns the
Context associated with the message being passively scanned. |
TechSet |
getTechSet()
Returns the
TechSet associated with the Context of the message being passively
scanned. |
List<User> |
getUsers()
Returns an unmodifiable list of s for the
HttpMessage being passively
scanned. |
boolean |
hasContext()
Returns a boolean indicating whether or not the
HttpMessage being passively scanned
is currently associated with a Context . |
boolean |
isClientError(HttpMessage msg)
Tells whether or not the response has a status code between 400 and 499 (inclusive), or
CustomPage.Type.NOTFOUND_404 . |
boolean |
isPage200(HttpMessage msg)
Tells whether or not the message matches
CustomPage.Type.OK_200 definitions. |
boolean |
isPage404(HttpMessage msg)
Tells whether or not the message matches
CustomPage.Type.NOTFOUND_404 definitions. |
boolean |
isPage500(HttpMessage msg)
Tells whether or not the message matches
CustomPage.Type.ERROR_500 definitions. |
boolean |
isPageOther(HttpMessage msg)
Tells whether or not the message matches
CustomPage.Type.OTHER definitions. |
boolean |
isServerError(HttpMessage msg)
Tells whether or not the response has a status code between 500 and 599 (inclusive), or
CustomPage.Type.EROOR_500 . |
boolean |
isSuccess(HttpMessage msg)
Tells whether or not the response has a status code between 200 and 299 (inclusive), or
CustomPage.Type.OK_200 . |
public List<User> getUsers()
HttpMessage
being passively
scanned. The list returned is based on the first Context
matched.public boolean hasContext()
HttpMessage
being passively scanned
is currently associated with a Context
.public Context getContext()
Context
associated with the message being passively scanned.Context
if the message has been matched to a Context, null
otherwise.public TechSet getTechSet()
TechSet
associated with the Context of the message being passively
scanned.TechSet
if the message has been matched to a Context, TechSet.AllTech
otherwise.public boolean isPage200(HttpMessage msg)
CustomPage.Type.OK_200
definitions. Falls
back to simply checking the response status code for "200 - Ok". Checks if the message
matches CustomPage.Type.ERROR_500
or CusotmPage.Type.NOTFOUND_404
first, in
case the user is trying to override something.msg
- the message that will be checkedtrue
if the message matches, false
otherwisepublic boolean isPage500(HttpMessage msg)
CustomPage.Type.ERROR_500
definitions. Falls
back to simply checking the response status code for "500 - Internal Server Error". Checks if
the message matches CustomPage.Type.OK_200
or CustomPage.Type.NOTFOUND_404
first, in case the user is trying to override something.msg
- the message that will be checkedtrue
if the message matches, false
otherwisepublic boolean isPage404(HttpMessage msg)
CustomPage.Type.NOTFOUND_404
definitions.
Falls back to simply checking the response status code for "404 - Not Found". Checks if the
message matches CustomPage.Type.OK_200
or CustomPage.Type.ERROR_500
first, in
case the user is trying to override something.msg
- the message that will be checkedtrue
if the message matches, false
otherwisepublic boolean isPageOther(HttpMessage msg)
CustomPage.Type.OTHER
definitions.msg
- the message that will be checkedtrue
if the message matches, false
otherwisepublic boolean isSuccess(HttpMessage msg)
CustomPage.Type.OK_200
. Checks if the message matches CustomPage.Type.NOTFOUND_404
or CusotmPage.Type.ERROR_500
first, in case the user is
trying to override something.msg
- the message that will be checkedtrue
if the message matches, false
otherwisepublic boolean isClientError(HttpMessage msg)
CustomPage.Type.NOTFOUND_404
. Checks if the message matches CustomPage.Type.OK_200
or CusotmPage.Type.ERROR_500
first, in case the user is
trying to override something.msg
- the message that will be checkedtrue
if the message matches, false
otherwisepublic boolean isServerError(HttpMessage msg)
CustomPage.Type.EROOR_500
. Checks if the message matches CustomPage.Type.OK_200
or CustomPage.Type.NOTFOUND_404
first, in case the user is
trying to override something.msg
- the message that will be checkedtrue
if the message matches, false
otherwise