Exemplo n.º 1
0
class BurpExtender(IBurpExtender):
  """ hiccupy """

  def registerExtenderCallbacks(self, callbacks):
	  self.mCallBacks = callbacks
	  self.config = Config(callbacks)
	  self.loader = Loader(self.config)
	  self.dispatcher = Dispatcher(self.config, self.loader.getPlugins())

  def processProxyMessage(self, messageReference, messageIsRequest,
		  remoteHost, remotePort, serviceIsHttps, httpMethod, path,
		  resourceType, statusCode, responseContentType, message,
		  interceptAction):
    self.loader.reloadIfChanged()
    url = URL("HTTPS" if serviceIsHttps else "HTTP", remoteHost, remotePort, path)
    if self.mCallBacks.isInScope(url):
      if messageIsRequest:
	self.dispatcher.processProxyRequest(messageReference, messageIsRequest,
		      remoteHost, remotePort, serviceIsHttps, httpMethod,
		      path, resourceType, statusCode, responseContentType,
		      message, interceptAction)
      else:
	self.dispatcher.processProxyResponse(messageReference, messageIsRequest,
		      remoteHost, remotePort, serviceIsHttps, httpMethod,
		      path, resourceType, statusCode, responseContentType,
		      message, interceptAction)
    return message

  def processHttpMessage(self, toolName, messageIsRequest, message):
    if toolName == "intruder" and messageIsRequest:
      print "[%s] %s" % (toolName, message.getRequest())
Exemplo n.º 2
0
class BurpExtender(IBurpExtender):
    """ hiccupy """
    def registerExtenderCallbacks(self, callbacks):
        self.mCallBacks = callbacks
        self.config = Config(callbacks)
        self.loader = Loader(self.config)
        self.dispatcher = Dispatcher(self.config, self.loader.getPlugins())

    def processProxyMessage(self, messageReference, messageIsRequest,
                            remoteHost, remotePort, serviceIsHttps, httpMethod,
                            path, resourceType, statusCode,
                            responseContentType, message, interceptAction):
        self.loader.reloadIfChanged()
        url = URL("HTTPS" if serviceIsHttps else "HTTP", remoteHost,
                  remotePort, path)
        if self.mCallBacks.isInScope(url):
            if messageIsRequest:
                self.dispatcher.processProxyRequest(
                    messageReference, messageIsRequest, remoteHost, remotePort,
                    serviceIsHttps, httpMethod, path, resourceType, statusCode,
                    responseContentType, message, interceptAction)
            else:
                self.dispatcher.processProxyResponse(
                    messageReference, messageIsRequest, remoteHost, remotePort,
                    serviceIsHttps, httpMethod, path, resourceType, statusCode,
                    responseContentType, message, interceptAction)
        return message

    def processHttpMessage(self, toolName, messageIsRequest, message):
        if toolName == "intruder" and messageIsRequest:
            print "[%s] %s" % (toolName, message.getRequest())