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

Class localProxy




This plugin is a local proxy for HTTP requests ( like paros ).


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

Nested Classes [hide private]
  proxyHandler

Instance Methods [hide private]
  __init__(self)
  setUrlOpener(self, urlOpener)
This method should not be overwritten by any plugin (but you are free to do it, for example a good idea is to rewrite this method to change the UrlOpener to do some IDS evasion technic).
  discover(self, fuzzableRequest)
Do nothing, this plugin is rather odd, cause it will never return new URIs to the core.
  setOptions(self, OptionsMap)
Sets the Options given on the OptionList to self.
  _proxy(self)
This method starts the proxy server with the configured options.
  getOptionsXML(self)
This method returns a XML containing the Options that the plugin has.
  getPluginDeps(self)
  getLongDesc(self)

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

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


Method Details [hide private]

__init__(self)
(Constructor)

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

setUrlOpener(self, urlOpener)

 

This method should not be overwritten by any plugin (but you are free to do it, for example a good idea is to rewrite this method to change the UrlOpener to do some IDS evasion technic).

This method takes a CustomUrllib object as parameter and assigns it to itself. Then, on the testUrl method you use self.CustomUrlOpener._custom_urlopen(...) to open a Url and you are sure that the plugin is using the user supplied settings (proxy, user agent, etc).
Returns:
No value is returned.
Overrides: core.controllers.basePlugin.basePlugin.basePlugin.setUrlOpener
(inherited documentation)

discover(self, fuzzableRequest)

 
Do nothing, this plugin is rather odd, cause it will never return new URIs to the core. This plugin is a local proxy server thats used for mangling requests. All the "magic" is done in the _proxy method and in the handler class.
Returns:
A list :
  1. New Url's found by plugin, could be empty when method ends.
Overrides: core.controllers.basePlugin.baseDiscoveryPlugin.baseDiscoveryPlugin.discover

setOptions(self, OptionsMap)

 

Sets the Options given on the OptionList to self. The options are the result of a user entering some data on a window that was constructed using the XML Options that was retrieved from the plugin using getOptionsXML()

This method MUST be implemented on every plugin.
Returns:
No value is returned.
Overrides: core.controllers.basePlugin.basePlugin.basePlugin.setOptions
(inherited documentation)

_proxy(self)

 
This method starts the proxy server with the configured options.

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/output.xsd
Returns:
XML String
Overrides: core.controllers.basePlugin.basePlugin.basePlugin.getOptionsXML

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