Class SpiderGitParser
- java.lang.Object
-
- org.zaproxy.zap.spider.parser.SpiderParser
-
- org.zaproxy.zap.spider.parser.SpiderGitParser
-
@Deprecated public class SpiderGitParser extends SpiderParser
Deprecated.(2.12.0) See the spider add-on in zap-extensions instead.The Class SpiderGitParser is used for parsing Git metadata from the .git/index file This parser currently supports Git internal index file versions 2,3, and 4. It does not currently support version 1, since this version is no longer supported. Version 1 appears to have disappeared with Git version 0.05 in 2005.
-
-
Field Summary
-
Fields inherited from class org.zaproxy.zap.spider.parser.SpiderParser
log
-
-
Constructor Summary
Constructors Constructor Description SpiderGitParser(SpiderParam params)
Deprecated.Instantiates a new spider Git Index parser.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
canParseResource(HttpMessage message, java.lang.String path, boolean wasAlreadyParsed)
Deprecated.Checks whether the parser should be called to parse the given HttpMessage.boolean
parseResource(HttpMessage message, net.htmlparser.jericho.Source source, int depth)
Deprecated.Parses the resource.-
Methods inherited from class org.zaproxy.zap.spider.parser.SpiderParser
addSpiderParserListener, getCanonicalURL, getLogger, getSpiderParam, notifyListenersPostResourceFound, notifyListenersResourceFound, notifyListenersResourceFound, processURL, removeSpiderParserListener, setSpiderParam
-
-
-
-
Constructor Detail
-
SpiderGitParser
public SpiderGitParser(SpiderParam params)
Deprecated.Instantiates a new spider Git Index parser.- Parameters:
params
- the params- Throws:
java.lang.NullPointerException
- ifparams
is null.
-
-
Method Detail
-
parseResource
public boolean parseResource(HttpMessage message, net.htmlparser.jericho.Source source, int depth)
Deprecated.Description copied from class:SpiderParser
Parses the resource. The HTTP message containing the request and the response is given. Also, if possible, a Jericho source with the Response Body is provided.When a link is encountered, implementations can use
SpiderParser.processURL(HttpMessage, int, String, String)
andSpiderParser.notifyListenersResourceFound(SpiderResourceFound)
to announce the found URIs.The return value specifies whether the resource should be considered 'completely processed'/consumed and should be treated accordingly by subsequent parsers. For example, any parsers which are meant to be 'fall-back' parsers should skip messages already processed by other parsers.
- Specified by:
parseResource
in classSpiderParser
- Parameters:
message
- the full http message containing the request and the responsesource
- a Jericho source with the Response Body from the HTTP message. This parameter can benull
, in which case the parser implementation should ignore it.depth
- the depth of this resource- Returns:
- whether the resource is considered to be exhaustively processed
-
canParseResource
public boolean canParseResource(HttpMessage message, java.lang.String path, boolean wasAlreadyParsed)
Deprecated.Description copied from class:SpiderParser
Checks whether the parser should be called to parse the given HttpMessage.Based on the specifics of the HttpMessage and whether this message was already processed by another Parser, this method should decide whether the
SpiderParser.parseResource(HttpMessage, Source, int)
should be invoked.The
wasAlreadyConsumed
could be used by parsers which represent a 'fall-back' parser to check whether any other parser has processed the message before.- Specified by:
canParseResource
in classSpiderParser
- Parameters:
message
- the full http message containing the request and the responsepath
- the resource path, provided for conveniencewasAlreadyParsed
- if the resource was already parsed by another SpiderParser- Returns:
- true, if the
SpiderParser.parseResource(HttpMessage, Source, int)
should be invoked.
-
-