Package core :: Package controllers :: Package basePlugin :: Module baseEvasionPlugin :: Class baseEvasionPlugin
[hide private]

Class baseEvasionPlugin




This is the base class for evasion plugins, all evasion plugins should inherit from it and implement the following methods :
  1. modifyRequest(...)
  2. setOptions( OptionList )
  3. getOptions()



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

Instance Methods [hide private]
 
__init__(self)
 
getPriority(self)
This function is called when sorting evasion plugins.
 
getType(self)
 
modifyRequest(self, request)
This method mangles the request in order to evade simple IDSs.
 
setUrlOpener(self, foo)
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).

Inherited from basePlugin.basePlugin: __eq__, end, getDesc, getLongDesc, getName, getOptions, getPluginDeps, printUniq, setOptions

Inherited from basePlugin.basePlugin (private): _analyzeResult, _sendMutant

Method Details [hide private]

__init__(self)
(Constructor)

 
Overrides: basePlugin.basePlugin.__init__

getPriority(self)

 
This function is called when sorting evasion plugins. Each evasion plugin should implement this.
Returns:
An integer specifying the priority. 100 is runned first, 0 last.

getType(self)

 
Overrides: basePlugin.basePlugin.getType

modifyRequest(self, request)

 

This method mangles the request in order to evade simple IDSs.

This method MUST be implemented on every plugin.
Parameters:
  • request - urllib2.Request instance that is going to be modified by the evasion plugin
Returns:
A fuzzed version of the Request.

setUrlOpener(self, foo)

 

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: basePlugin.basePlugin.setUrlOpener
(inherited documentation)