forked from Quitten/Autorize
-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathAutorize.py
More file actions
52 lines (37 loc) · 1.45 KB
/
Autorize.py
File metadata and controls
52 lines (37 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from burp import IBurpExtender, IHttpListener, IProxyListener, IExtensionStateListener
from authorization.authorization import handle_message
from helpers.initiator import Initiator
from helpers.filters import handle_proxy_message
from java.util.concurrent import Executors
class BurpExtender(IBurpExtender, IHttpListener, IProxyListener, IExtensionStateListener):
def registerExtenderCallbacks(self, callbacks):
self._callbacks = callbacks
self._helpers = callbacks.getHelpers()
callbacks.setExtensionName("Autorize")
self.executor = Executors.newFixedThreadPool(10)
callbacks.registerExtensionStateListener(self)
initiator = Initiator(self)
initiator.init_constants()
initiator.draw_all()
initiator.implement_all()
initiator.init_ui()
initiator.print_welcome_message()
return
#
# implement IHttpListener
#
def processHttpMessage(self, toolFlag, messageIsRequest, messageInfo):
handle_message(self, toolFlag, messageIsRequest, messageInfo)
#
# implement IProxyListener
#
def processProxyMessage(self, messageIsRequest, message):
handle_proxy_message(self, message)
#
# implement IExtensionStateListener
#
def extensionUnloaded(self):
self.executor.shutdown()
print "Autorize extension unloaded."