Package plugins :: Package discovery :: Module pykto :: Class pykto
[hide private]
[frames] | no frames]

Class pykto




A nikto port to python.


Author: Andres Riancho ( andres.riancho@gmail.com )

Instance Methods [hide private]
  __init__(self)
  discover(self, fuzzableRequest)
Runs pykto to the site.
  __run(self, url)
Really run the plugin.
  _updateDb(self)
This method updates the scandatabase from cirt.net .
  _pykto(self, url, scanDbHandle)
This method does all the real work.
  _serverMatch(self, server)
Reads the kb and compares the server parameter with the kb value.
  _isComment(self, line)
The simplest method ever.
  _parse(self, line)
This method parses a line from the database file
  _sendAndCheck(self, url, parameters)
This method sends the request to the server.
  _analyzeResult(self, response, expectedResponse, parameters, uri)
Analyzes the result of a _send()
  _returnWithoutEval(self, parameters, uri)
  getOptionsXML(self)
This method returns a XML containing the Options that the plugin has.
  setOptions(self, optionsMap)
This method sets all the options that are configured using the user interface generated by the framework using the result of getOptionsXML().
  getPluginDeps(self)
  getLongDesc(self)

Inherited from core.controllers.basePlugin.baseDiscoveryPlugin.baseDiscoveryPlugin: getType

Inherited from core.controllers.basePlugin.basePlugin.basePlugin: __eq__, getDesc, getName, printUniq, setUrlOpener


Method Details [hide private]

__init__(self)
(Constructor)

 
None
Overrides: core.controllers.basePlugin.baseDiscoveryPlugin.baseDiscoveryPlugin.__init__

discover(self, fuzzableRequest)

 
Runs pykto to the site.
Parameters:
  • fuzzableRequest - A fuzzableRequest instance that contains (among other things) the URL to test.
Returns:
A list :
  1. New Url's found by plugin, could be empty when method ends.
Overrides: core.controllers.basePlugin.baseDiscoveryPlugin.baseDiscoveryPlugin.discover

__run(self, url)

 
Really run the plugin.

_updateDb(self)

 
This method updates the scandatabase from cirt.net .

_pykto(self, url, scanDbHandle)

 
This method does all the real work. Writes vulns to the KB.
Returns:
A list with new url's found.

_serverMatch(self, server)

 
Reads the kb and compares the server parameter with the kb value. If they match true is returned.

_isComment(self, line)

 
The simplest method ever.
Returns:
Returns if a line is a comment or not.

_parse(self, line)

 

This method parses a line from the database file

@ return: A a list of tuples where each tuple has the following data
  1. server
  2. query
  3. expectedResponse
  4. method
  5. desc

_sendAndCheck(self, url, parameters)

 
This method sends the request to the server.
Returns:
True if the requested uri responded as expected.

_analyzeResult(self, response, expectedResponse, parameters, uri)

 
Analyzes the result of a _send()
Returns:
True if vuln is found

_returnWithoutEval(self, parameters, uri)

 
None

getOptionsXML(self)

 
This method returns a XML containing the Options that the plugin has. Using this XML the framework will build a window, a menu, or some other input method to retrieve the info from the user. The XML has to validate against the xml schema file located at : w3af/core/ui/userInterface.dtd
Returns:
XML with the plugin options.
Overrides: core.controllers.basePlugin.basePlugin.basePlugin.getOptionsXML

setOptions(self, optionsMap)

 
This method sets all the options that are configured using the user interface generated by the framework using the result of getOptionsXML().
Parameters:
  • OptionList - A dictionary with the options for the plugin.
Returns:
No value is returned.
Overrides: core.controllers.basePlugin.basePlugin.basePlugin.setOptions

getPluginDeps(self)

 
Returns:
A list with the names of the plugins that should be runned before the current one.
Overrides: core.controllers.basePlugin.basePlugin.basePlugin.getPluginDeps

getLongDesc(self)

 
Returns:
A DETAILED description of the plugin functions and features.
Overrides: core.controllers.basePlugin.basePlugin.basePlugin.getLongDesc