use of org.zaproxy.zap.spider.parser.SpiderHtmlParser in project zaproxy by zaproxy.
the class SpiderController method prepareDefaultParsers.
private void prepareDefaultParsers() {
this.parsers = new LinkedList<>();
SpiderParser parser;
// If parsing of robots.txt is enabled
if (spider.getSpiderParam().isParseRobotsTxt()) {
parser = new SpiderRobotstxtParser(spider.getSpiderParam());
parsers.add(parser);
}
// If parsing of sitemap.xml is enabled
if (spider.getSpiderParam().isParseSitemapXml()) {
if (log.isDebugEnabled())
log.debug("Adding SpiderSitemapXMLParser");
parser = new SpiderSitemapXMLParser(spider.getSpiderParam());
parsers.add(parser);
} else {
if (log.isDebugEnabled())
log.debug("NOT Adding SpiderSitemapXMLParser");
}
// If parsing of SVN entries is enabled
if (spider.getSpiderParam().isParseSVNEntries()) {
parser = new SpiderSVNEntriesParser(spider.getSpiderParam());
parsers.add(parser);
}
// If parsing of GIT entries is enabled
if (spider.getSpiderParam().isParseGit()) {
parser = new SpiderGitParser(spider.getSpiderParam());
parsers.add(parser);
}
// Redirect requests parser
parser = new SpiderRedirectParser();
parsers.add(parser);
// Simple HTML parser
parser = new SpiderHtmlParser(spider.getSpiderParam());
this.parsers.add(parser);
// HTML Form parser
parser = new SpiderHtmlFormParser(spider.getSpiderParam(), spider.getExtensionSpider().getValueGenerator());
this.parsers.add(parser);
Config.CurrentCompatibilityMode.setFormFieldNameCaseInsensitive(false);
// Prepare the parsers for OData ATOM files
parser = new SpiderODataAtomParser();
this.parsers.add(parser);
// Prepare the parsers for simple non-HTML files
parser = new SpiderTextParser();
this.parsers.add(parser);
this.parsersUnmodifiableView = Collections.unmodifiableList(parsers);
}
Aggregations