org.owasp.webscarab.plugin.sessionid
Class SessionIDAnalysis

java.lang.Object
  extended by org.owasp.webscarab.plugin.sessionid.SessionIDAnalysis
All Implemented Interfaces:
java.lang.Runnable, ConversationHandler, Plugin

public class SessionIDAnalysis
extends java.lang.Object
implements Plugin, ConversationHandler

Author:
rdawes

Constructor Summary
SessionIDAnalysis(Framework framework)
          Creates a new instance of SessionidAnalysis
 
Method Summary
 void analyse(ConversationID id, Request request, Response response, java.lang.String origin)
           
 void clearSessionIDs(java.lang.String key)
           
 void exportIDSToCSV(java.lang.String key, java.io.File file)
           
 void fetch(Request request, java.lang.String name, java.lang.String regex, int count)
           
 void fetchResponse()
           
 void flush()
          called to instruct the plugin to flush any memory-only state to the store.
 java.util.Map getIDsFromResponse(Response response, java.lang.String name, java.lang.String regex)
           
 SessionIDModel getModel()
           
 java.lang.String getPluginName()
          The plugin name
 Response getResponse()
           
 java.lang.Object getScriptableObject()
           
 Hook[] getScriptingHooks()
           
 java.lang.String getStatus()
          called to determine what the current status of the plugin is
 boolean isBusy()
          called to test whether the plugin is able to be stopped
 boolean isModified()
          called to determine whether the data stored within the plugin has been modified and should be saved
 boolean isRunning()
           
 void requestError(Request request, java.io.IOException ioe)
           
 void responseReceived(Response response)
           
 void run()
          starts the plugin running
 void setCalculator(java.lang.String key, Calculator calc)
          This function provides for setting a different calculator i.e.
 void setRequest(Request request)
           
 void setSession(java.lang.String type, java.lang.Object store, java.lang.String session)
          informs the plugin that the Session has changed
 boolean stop()
          called to suspend or stop the plugin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionIDAnalysis

public SessionIDAnalysis(Framework framework)
Creates a new instance of SessionidAnalysis

Method Detail

getModel

public SessionIDModel getModel()

setSession

public void setSession(java.lang.String type,
                       java.lang.Object store,
                       java.lang.String session)
                throws StoreException
Description copied from interface: Plugin
informs the plugin that the Session has changed

Specified by:
setSession in interface Plugin
Throws:
StoreException

getPluginName

public java.lang.String getPluginName()
The plugin name

Specified by:
getPluginName in interface Plugin
Returns:
The name of the plugin

run

public void run()
Description copied from interface: Plugin
starts the plugin running

Specified by:
run in interface java.lang.Runnable
Specified by:
run in interface Plugin

requestError

public void requestError(Request request,
                         java.io.IOException ioe)
Specified by:
requestError in interface ConversationHandler

responseReceived

public void responseReceived(Response response)
Specified by:
responseReceived in interface ConversationHandler

getIDsFromResponse

public java.util.Map getIDsFromResponse(Response response,
                                        java.lang.String name,
                                        java.lang.String regex)

fetch

public void fetch(Request request,
                  java.lang.String name,
                  java.lang.String regex,
                  int count)

setRequest

public void setRequest(Request request)

fetchResponse

public void fetchResponse()
                   throws java.io.IOException
Throws:
java.io.IOException

getResponse

public Response getResponse()

setCalculator

public void setCalculator(java.lang.String key,
                          Calculator calc)
This function provides for setting a different calculator i.e. one that calculates the sessionid based on different criteria to the DefaultCalculator, such as character ordering, etc No interface component uses it as yet, though


stop

public boolean stop()
Description copied from interface: Plugin
called to suspend or stop the plugin

Specified by:
stop in interface Plugin

flush

public void flush()
           throws StoreException
Description copied from interface: Plugin
called to instruct the plugin to flush any memory-only state to the store.

Specified by:
flush in interface Plugin
Throws:
StoreException - if there is any problem saving the session data

isBusy

public boolean isBusy()
Description copied from interface: Plugin
called to test whether the plugin is able to be stopped

Specified by:
isBusy in interface Plugin
Returns:
false if the plugin can be stopped

getStatus

public java.lang.String getStatus()
Description copied from interface: Plugin
called to determine what the current status of the plugin is

Specified by:
getStatus in interface Plugin

isModified

public boolean isModified()
Description copied from interface: Plugin
called to determine whether the data stored within the plugin has been modified and should be saved

Specified by:
isModified in interface Plugin

isRunning

public boolean isRunning()
Specified by:
isRunning in interface Plugin

analyse

public void analyse(ConversationID id,
                    Request request,
                    Response response,
                    java.lang.String origin)
Specified by:
analyse in interface Plugin

getScriptableObject

public java.lang.Object getScriptableObject()
Specified by:
getScriptableObject in interface Plugin

getScriptingHooks

public Hook[] getScriptingHooks()
Specified by:
getScriptingHooks in interface Plugin

clearSessionIDs

public void clearSessionIDs(java.lang.String key)

exportIDSToCSV

public void exportIDSToCSV(java.lang.String key,
                           java.io.File file)
                    throws java.io.IOException
Throws:
java.io.IOException