-
Notifications
You must be signed in to change notification settings - Fork 15
/
suite_itab_pure.rb
52 lines (41 loc) · 1.03 KB
/
suite_itab_pure.rb
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
#
# KING SABRI | @KINGSABRI
# BurpSuite Extension | Pure Suite ITab implementation
#
# Ruby requires
require 'java'
# Java imports
java_import javax.swing.JTabbedPane
# Burp Suite API imports
java_import 'burp.IBurpExtender'
java_import 'burp.IBurpExtenderCallbacks'
java_import 'burp.ITab'
#
# BurpExtender, the main Extender API ِِclass to register all extensions and interfaces
#
class BurpExtender
include IBurpExtender
include ITab
attr_reader :callbacks
# IBurpExtender::registerExtenderCallbacks(IBurpExtenderCallbacks callbacks);
def registerExtenderCallbacks(callbacks)
@callbacks = callbacks
@callbacks.setExtensionName('Ruby | Pure Suite ITab') # Set Extension name
#
# GUI | Implement ITab
#
@tabs = JTabbedPane.new
@callbacks.customizeUiComponent(@tabs)
@callbacks.addSuiteTab(self)
end
# ITab::getTabCaption()
#
# Set the tab caption
def getTabCaption
'Suite ITab'
end
# ITab::getUiComponent
def getUiComponent
@tabs
end
end