-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathActive AutoProxy.py
5071 lines (3723 loc) · 204 KB
/
Active AutoProxy.py
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
from burp import IBurpExtender
from burp import IContextMenuFactory # add menu support when right clicking requests and responses
from burp import IHttpRequestResponse # for rebuilding requests when restoring state and importing csv into log table
from burp import ITab
from burp import IProxyListener
from burp import IMessageEditorController
from datetime import datetime # for time columns in log table and host table in AutoProxy
from java import lang # for checkboxes in host table in AutoProxy
from java.awt import BorderLayout # for object position within JPanels in AutoProxy and AutoTest
from java.awt import Color # for highlighting regex errors in AutoProxy and AutoTest
from java.awt import Component # for components
from java.awt import GridBagLayout # for AutoConfig AutoCopy button positioning
from java.awt import GridLayout # for AutoConfig AutoCopy button positioning
from java.awt.event import FocusEvent # for removing regex error highlights on focus in AutoProxy and AutoTest
from java.awt.event import FocusListener # for removing regex error highlights on focus in AutoProxy and AutoTest
from java.awt.event import ItemListener # for filtering the log table
from java.awt.event import KeyEvent # for allowing tab key to change focus instead of inserting tab into text input in AutoProxy and AutoTest
from java.beans import PropertyChangeEvent # for keeping split panes the same height in AutoTest
from java.beans import PropertyChangeListener # for keeping split panes the same height in AutoTest
from java.lang import Runnable # for inserting/deleting to/from the log table
from java.net import URL # for downloading block lists
from java.util import ArrayList # for log table in AutoProxy
from javax.swing import BorderFactory # for creating borders around the AutoConfig and AutoBlock panels
from javax.swing import JButton # for buttons in AutoProxy and AutoTest
from javax.swing import JCheckBox # for filtering the log table and saving/restoring the state
from javax.swing import JFileChooser # for AutoConfig and AutoBlock dialog boxes
from javax.swing import JFrame # for AutoConfig and AutoBlock dialog boxes
from javax.swing import JLabel # for labels in JPanels in AutoProxy and AutoTest
from javax.swing import JOptionPane # for message box showing regex errors in AutoProxy and AutoTest
from javax.swing import JPanel # for panels within split panes in AutoProxy and AutoTest
from javax.swing import JScrollPane # for scrollable text areas and tables in AutoProxy and AutoTest
from javax.swing import JSplitPane # for split panes in AutoProxy and AutoTest
from javax.swing import JTabbedPane # for tabs in AutoProxy
from javax.swing import JTable # for log table and host table in AutoProxy
from javax.swing import JTextArea # for text areas in AutoProxy and AutoTest
from javax.swing import JTextPane # for html text area
from javax.swing import RowFilter # for filtering the log table
from javax.swing import SortOrder # for setting AutoProxy log table sort order ascending descending unsorted
from javax.swing import SwingUtilities # for swing utilities
from javax.swing.event import DocumentListener # for filtering log table by host and method
from javax.swing.filechooser import FileNameExtensionFilter # for AutoConfig and AutoBlock dialog boxes
from javax.swing.table import AbstractTableModel # for log table in AutoProxy
from javax.swing.table import DefaultTableModel # for host table in AutoProxy
from javax.swing.table import TableCellRenderer # for aligning column headers in AutoProxy host table
from javax.swing.table import TableRowSorter # for sorting and filtering the log table
from javax.swing.text import DefaultHighlighter # for highlighting regex errors in AutoProxy and AutoTest
from thread import start_new_thread # for downloading block lists
from threading import Lock # for logging in AutoProxy
import base64 # for requests when saving/restoring state and exporting/importing log table
import csv # for exporting/importing log table to/from csv
import httplib # for testing connections when downloading AutoBlock files
import json # for saving/restoring state
import os # for splitting the file name and file extension in AutoConfig and AutoBlock and for checking file vs directory in AutoBlock
import Queue # to get return value from new thread
import re # for regex support in AutoProxy and AutoTest
#
# Burp extender main class
#
class BurpExtender(IBurpExtender, ITab, IProxyListener, IMessageEditorController, AbstractTableModel, IContextMenuFactory):
#
# implement IBurpExtender when the extension is loaded
#
def registerExtenderCallbacks(self, callbacks):
# keep reference to callbacks object
self._callbacks = callbacks
# obtain extension helpers object
self._helpers = callbacks.getHelpers()
# set the extension name
self._EXTENSION_NAME = "Active AutoProxy"
# set the extension version
self._EXTENSION_VERSION = "1.0"
# set extension name
callbacks.setExtensionName(self._EXTENSION_NAME)
# create log and lock to synchronize when adding log entries
self._log = ArrayList()
self._lock = Lock()
# create an option to automatically clear the log table
self._autoClearLogTable = False
# set the auto clear amount
self._autoClearLogTableAmount = 0
#
# AutoProxy Tab - Start
#
##### AutoProxy Tab - Top Section - Start #####
# create label for AutoProxy forward input
self._labelAutoProxyForwardHostsInput = JLabel("AutoForward Hosts", JLabel.CENTER)
# create custom text area
self._textAreaAutoProxyForwardHostsInput = CustomJTextArea()
# add focus listener to text area to remove regex error highlights on focus
self._textAreaAutoProxyForwardHostsInput.addFocusListener(CustomFocusListener(self._textAreaAutoProxyForwardHostsInput))
# create scroll pane
self._scrollPaneAutoProxyForwardHostsInput = JScrollPane(self._textAreaAutoProxyForwardHostsInput)
# create panel
self._panelAutoProxyForwardHostsInput = JPanel()
# set layout
self._panelAutoProxyForwardHostsInput.setLayout(BorderLayout())
# add label and scroll pane to panel
self._panelAutoProxyForwardHostsInput.add(self._labelAutoProxyForwardHostsInput, BorderLayout.NORTH)
self._panelAutoProxyForwardHostsInput.add(self._scrollPaneAutoProxyForwardHostsInput, BorderLayout.CENTER)
# create label for AutoProxy intercept input
self._labelAutoProxyInterceptHostsInput = JLabel("AutoIntercept Hosts", JLabel.CENTER)
# create custom text area
self._textAreaAutoProxyInterceptHostsInput = CustomJTextArea()
# add focus listener to text area to remove regex error highlights on focus
self._textAreaAutoProxyInterceptHostsInput.addFocusListener(CustomFocusListener(self._textAreaAutoProxyInterceptHostsInput))
# create scroll pane
self._scrollPaneAutoProxyInterceptHostsInput = JScrollPane(self._textAreaAutoProxyInterceptHostsInput)
# create panel
self._panelAutoProxyInterceptHostsInput = JPanel()
# set layout
self._panelAutoProxyInterceptHostsInput.setLayout(BorderLayout())
# add label and scroll pane to panel
self._panelAutoProxyInterceptHostsInput.add(self._labelAutoProxyInterceptHostsInput, BorderLayout.NORTH)
self._panelAutoProxyInterceptHostsInput.add(self._scrollPaneAutoProxyInterceptHostsInput, BorderLayout.CENTER)
# create label for AutoProxy drop input
self._labelAutoProxyDropHostsInput = JLabel("AutoDrop Hosts", JLabel.CENTER)
# create custom text area
self._textAreaAutoProxyDropHostsInput = CustomJTextArea()
# add focus listener to text area to remove regex error highlights on focus
self._textAreaAutoProxyDropHostsInput.addFocusListener(CustomFocusListener(self._textAreaAutoProxyDropHostsInput))
# create scroll pane
self._scrollPaneAutoProxyDropHostsInput = JScrollPane(self._textAreaAutoProxyDropHostsInput)
# create panel
self._panelAutoProxyDropHostsInput = JPanel()
# set layout
self._panelAutoProxyDropHostsInput.setLayout(BorderLayout())
# add label and scroll pane to panel
self._panelAutoProxyDropHostsInput.add(self._labelAutoProxyDropHostsInput, BorderLayout.NORTH)
self._panelAutoProxyDropHostsInput.add(self._scrollPaneAutoProxyDropHostsInput, BorderLayout.CENTER)
# create primary AutoProxy split pane for top section
self._splitpaneAutoProxyHorizontal1 = JSplitPane(JSplitPane.HORIZONTAL_SPLIT)
self._splitpaneAutoProxyHorizontal1.setResizeWeight(0.3)
self._splitpaneAutoProxyHorizontal1.setDividerLocation(0.3)
# create secondary AutoProxy split pane for top section
self._splitpaneAutoProxyHorizontal2 = JSplitPane(JSplitPane.HORIZONTAL_SPLIT)
self._splitpaneAutoProxyHorizontal2.setResizeWeight(0.5)
self._splitpaneAutoProxyHorizontal2.setDividerLocation(0.5)
# set top left pane to forward hosts input
self._splitpaneAutoProxyHorizontal1.setLeftComponent(self._panelAutoProxyForwardHostsInput)
# set right pane to secondary split pane
self._splitpaneAutoProxyHorizontal1.setRightComponent(self._splitpaneAutoProxyHorizontal2)
# set top middle pane to intercept hosts input
self._splitpaneAutoProxyHorizontal2.setLeftComponent(self._panelAutoProxyInterceptHostsInput)
# set top right pane to drop hosts input
self._splitpaneAutoProxyHorizontal2.setRightComponent(self._panelAutoProxyDropHostsInput)
##### AutoProxy Tab - Top Section - End #####
##### AutoProxy Tab - Middle Section - Log Table - Start #####
# create lock to not update request viewer when clearing the log table
self._customJTableLogsTableChangeLock = False
# create custom JTable for logs
self._tableAutoProxyLogs = CustomJTableLogs(self)
# set minimum column widths for log table
self._tableAutoProxyLogs.getColumnModel().getColumn(0).setMinWidth(10)
self._tableAutoProxyLogs.getColumnModel().getColumn(1).setMinWidth(10)
self._tableAutoProxyLogs.getColumnModel().getColumn(2).setMinWidth(10)
self._tableAutoProxyLogs.getColumnModel().getColumn(3).setMinWidth(10)
self._tableAutoProxyLogs.getColumnModel().getColumn(4).setMinWidth(10)
self._tableAutoProxyLogs.getColumnModel().getColumn(5).setMinWidth(10)
self._tableAutoProxyLogs.getColumnModel().getColumn(6).setMinWidth(10)
self._tableAutoProxyLogs.getColumnModel().getColumn(7).setMinWidth(10)
self._tableAutoProxyLogs.getColumnModel().getColumn(8).setMinWidth(10)
self._tableAutoProxyLogs.getColumnModel().getColumn(9).setMinWidth(10)
# set preferred column widths for log table
self._tableAutoProxyLogs.getColumnModel().getColumn(0).setPreferredWidth(110)
self._tableAutoProxyLogs.getColumnModel().getColumn(1).setPreferredWidth(80)
self._tableAutoProxyLogs.getColumnModel().getColumn(2).setPreferredWidth(80)
self._tableAutoProxyLogs.getColumnModel().getColumn(3).setPreferredWidth(60)
self._tableAutoProxyLogs.getColumnModel().getColumn(4).setPreferredWidth(220)
self._tableAutoProxyLogs.getColumnModel().getColumn(5).setPreferredWidth(80)
self._tableAutoProxyLogs.getColumnModel().getColumn(6).setPreferredWidth(150)
self._tableAutoProxyLogs.getColumnModel().getColumn(7).setPreferredWidth(100)
self._tableAutoProxyLogs.getColumnModel().getColumn(8).setPreferredWidth(60)
self._tableAutoProxyLogs.getColumnModel().getColumn(9).setPreferredWidth(60)
# create scroll pane for log table
self._scrollPaneAutoProxyLogTable = JScrollPane(self._tableAutoProxyLogs)
# create variable to mark if restoring/importing log table to help with duplicate log entries when restoring/importing
self._autoConfigRestoreOrImportLogTableFlag = False
# create variable to store a current filter value to help with duplicate log entries when restoring/importing
self._autoConfigRestoreOrImportLogTableFilterValue = False
# set the last selected row to -1
self._currentlySelectedLogTableRow = -1
##### AutoProxy Tab - Middle Section - Log Table - End #####
##### AutoProxy Tab - Middle Section - Host Table - Start #####
# create headers for host table
headersHostTable = ["First Time Logged", "Host", "AutoForward", "AutoIntercept", "AutoDrop"]
# create custom DefaultTableModel for host table tab
self._tableModelAutoProxyAutoAction = CustomDefaultTableModelHosts(None, headersHostTable)
# create custom JTable for host table tab
self._tableAutoProxyAutoAction = CustomJTableHosts(self._tableModelAutoProxyAutoAction, self._textAreaAutoProxyForwardHostsInput, self._textAreaAutoProxyInterceptHostsInput, self._textAreaAutoProxyDropHostsInput)
# get header row for host table
headerRowHostTable = self._tableAutoProxyAutoAction.getTableHeader()
# get default renderer for host table
defaultRendererHostTable = headerRowHostTable.getDefaultRenderer()
# get custom table cell renderer for host table
customTableCellRendererHostTable = CustomTableCellRendererHostTable(defaultRendererHostTable)
# align columns in header row for host table
headerRowHostTable.setDefaultRenderer(customTableCellRendererHostTable)
# set minimum column widths for host table
self._tableAutoProxyAutoAction.getColumnModel().getColumn(0).setMinWidth(80)
self._tableAutoProxyAutoAction.getColumnModel().getColumn(1).setMinWidth(100)
self._tableAutoProxyAutoAction.getColumnModel().getColumn(2).setMinWidth(55)
self._tableAutoProxyAutoAction.getColumnModel().getColumn(3).setMinWidth(55)
self._tableAutoProxyAutoAction.getColumnModel().getColumn(4).setMinWidth(55)
# set preferred column widths for host table
self._tableAutoProxyAutoAction.getColumnModel().getColumn(0).setPreferredWidth(180)
self._tableAutoProxyAutoAction.getColumnModel().getColumn(1).setPreferredWidth(400)
self._tableAutoProxyAutoAction.getColumnModel().getColumn(2).setPreferredWidth(145)
self._tableAutoProxyAutoAction.getColumnModel().getColumn(3).setPreferredWidth(150)
self._tableAutoProxyAutoAction.getColumnModel().getColumn(4).setPreferredWidth(125)
# create custom table row sorter that can unsort
self._tableRowSorterAutoProxyAutoAction = CustomTableRowSorter(self._tableAutoProxyAutoAction.getModel())
# set row sorter
self._tableAutoProxyAutoAction.setRowSorter(self._tableRowSorterAutoProxyAutoAction)
# create scroll pane for host table
self._scrollPaneAutoProxyHostTable = JScrollPane(self._tableAutoProxyAutoAction)
##### AutoProxy - Middle Section - Host Table - End #####
##### AutoProxy - Middle Section - Host List Regex Format - Start #####
# create text editors for list of unique hosts in regex format
self._textEditorAutoProxyHostListRegexFormat = callbacks.createTextEditor()
# set text area to read only
self._textEditorAutoProxyHostListRegexFormat.setEditable(False)
##### AutoProxy Tab - Middle Section - Host List Regex Format - End #####
##### AutoProxy Tab - Middle Section - Host List Text Format - Start #####
# create text editors for list of unique hosts in text format
self._textEditorAutoProxyHostListTextFormat = callbacks.createTextEditor()
# set text area to read only
self._textEditorAutoProxyHostListTextFormat.setEditable(False)
##### AutoProxy Tab - Middle Section - Host List Text Format - End #####
##### AutoProxy Tab - Middle Section - Help - Start #####
# create JTextPane
textPaneHelp = JTextPane()
# set editable to false
textPaneHelp.setEditable(False)
# set content type to html
textPaneHelp.setContentType("text/html")
# implicitly joined string
textPaneHelp.setText(""
"<html>"
"<body>"
"<b style='font-size: 150%;'>" + "<u>" + self._EXTENSION_NAME + "</u>" + "</b>" + "<br>"
"<br>"
" " + u"\u2022" + " " + "This extension can automatically forward, intercept, and drop proxy requests while actively displaying proxy log information and centralizing list management." + "<br>"
" " + u"\u2022" + " " + "This extension can also block ads, tracking sites, malware sites, etc." + "<br>"
" " + u"\u2022" + " " + "The state of the extension including the settings, filters, and data can easily be exported and imported." + "<br>"
"<br>"
"<br>"
"<b style='font-size: 150%;'>" + "<u>" + "Main Features" + "</u>" + "</b>" + "<br>"
"<br>"
" " + u"\u2022" + " " + "Automatically drop specific requests while browsing the web. (Proxy Intercept turned off.)" + "<br>"
" " + u"\u2022" + " " + "Automatically drop specific requests while intercepting requests to all other hosts. (Proxy Intercept turned on.)" + "<br>"
" " + u"\u2022" + " " + "Automatically forward specific requests while intercepting all other hosts. (Proxy Intercept turned on.)" + "<br>"
" " + u"\u2022" + " " + "Automatically intercept specific requests while browsing the web. (Proxy Intercept turned off.)" + "<br>"
" " + u"\u2022" + " " + "Automatically block specific requests to hosts that are known for ads, tracking, malware, etc." + "<br>"
" " + u"\u2022" + " " + "Automatically flag specific requests for later review if they match the specified criteria." + "<br>"
" " + u"\u2022" + " " + "Centralize the location of the lists that have to be managed to drop, forward, and intercept requests." + "<br>"
" " + u"\u2022" + " " + "Actively view information from the proxy logs." + "<br>"
"<br>"
"<br>"
"<b style='font-size: 150%;'>" + "<u>" + "Matching Options for the Main Features (To AutoForward, AutoIntercept, & AutoDrop Requests)" + "</u>" + "</b>" + "<br>"
"<br>"
"Requests can automatically be forwarded, intercepted, or dropped using a variety of matching options. Case insensitive, regex matching on the host name is used by default. Enter one host per line to use the default matching option." + "<br>"
"<br>"
"The order of precedence if from left to right. The forward action takes precedence of the intercept action. The intercept action takes precedence of the drop action. The drop action takes precedence of the block action. Within the forward, intercept, and drop sections, the order of precedence if from top to bottom." + "<br>"
"<br>"
"Other matching options are listed below. Enter one matching option per line. There should be one space after each semicolon, followed by a regex search string." + "<br>"
" " + u"\u2022" + " " + "<b>" + "Method:" + "</b>" + " " + "<br>"
" " + u"\u2022" + " " + "<b>" + "Protocol:" + "</b>" + " " + "<br>"
" " + u"\u2022" + " " + "<b>" + "Port:" + "</b>" + " " + "<br>"
" " + u"\u2022" + " " + "<b>" + "Host:" + "</b>" + " " + "<br>"
" " + u"\u2022" + " " + "<b>" + "Referer:" + "</b>" + " " + "<br>"
" " + u"\u2022" + " " + "<b>" + "URL:" + "</b>" + " " + "<br>"
" " + u"\u2022" + " " + "<b>" + "Path:" + "</b>" + " " + "<br>"
" " + u"\u2022" + " " + "<b>" + "Body:" + "</b>" + " " + "<br>"
"<br>"
"<i>" + "<b>" + "Note: " + "</b>" + "The 'Protocol: ' and 'Port: ' options use starting and ending anchors '^$' with the matching string in between. This is so 'Port: 80' will only match port 80, but regex can still be used to make it match any port that contains 80. The 'Body: ' option does not search the URL row, Host row, or Referer row within the request body. The URL, Host, and Referer options can be used to match these fields. The URL field will not include the port if the protocol/port is http/80 or https/443." + "</i>" + "<br>"
"<br>"
"<br>"
"<b style='font-size: 150%;'>" + "<u>" + "Whitelisting Requests from Being AutoBlocked" + "</u>" + "</b>" + "<br>"
"<br>"
"If a block list is imported from the AutoBlock tab, any requests to matching hosts will be blocked. Entering hosts in the AutoForward Hosts section can act like a whitelist by allowing traffic to the specified hosts even if they are in a block list. Some websites require tracking to function properly." + "<br>"
"<br>"
"<br>"
"<b style='font-size: 150%;'>" + "<u>" + "Matching Examples" + "</u>" + "</b>" + "<br>"
"<br>"
"The bullets below could be entered in the AutoForward, AutoIntercept, or AutoDrop sections to match the corresponding URL." + "<br>"
"<br>"
"In the examples below, notice the following:" + "<br>"
" " + u"\u2022" + " " + "The word 'ampl' can be typed in a row by itself and it would match any host containing ampl such as example.com." + "<br>"
" " + u"\u2022" + " " + "Regex can be used to match any sites that use https on port 8443." + "<br>"
" " + u"\u2022" + " " + "Specific words can be searched within the url, path, body, etc." + "<br>"
"<br>"
"Below are matching examples for " + "<b>" + "http://www.example.com/path/resource?a=b&c=d" + "</b>" + "." + "<br>"
" " + u"\u2022" + " " + "example" + "<br>"
" " + u"\u2022" + " " + "<b>" + "Method: " + "</b>" + "get" + "<br>"
" " + u"\u2022" + " " + "<b>" + "Protocol: " + "</b>" + "http" + "<br>"
" " + u"\u2022" + " " + "<b>" + "Port: " + "</b>" + "80" + "<br>"
" " + u"\u2022" + " " + "<b>" + "Host: " + "</b>" + "www\.example\.com" + "<br>"
" " + u"\u2022" + " " + "<b>" + "Referer: " + "</b>" + "Referer_Domain_Name_Here" + "<br>"
" " + u"\u2022" + " " + "<b>" + "URL: " + "</b>" + "http://www.example.com/path/resource?a=b&c=d" + "<br>"
" " + u"\u2022" + " " + "<b>" + "Path: " + "</b>" + "/path/resource?a=b&c=d" + "<br>"
" " + u"\u2022" + " " + "<b>" + "Body: " + "</b>" + "Text_String_Within_The_Request_Body_Here" + "<br>"
"<br>"
"Below are some additional examples for " + "<b>" + "https://example.com:8443/path/file.asp?name=test&a=b" + "</b>" + "." + "<br>"
" " + u"\u2022" + " " + "ampl" + "<br>"
" " + u"\u2022" + " " + "<b>" + "Protocol: " + "</b>" + "https" + "<br>"
" " + u"\u2022" + " " + "<b>" + "Port: " + "</b>" + "8443" + "<br>"
" " + u"\u2022" + " " + "<b>" + "Host: " + "</b>" + "example.com" + "<br>"
" " + u"\u2022" + " " + "<b>" + "Host: " + "</b>" + "ampl" + "<br>"
" " + u"\u2022" + " " + "<b>" + "URL: " + "</b>" + "https://example.com:8443/path/file.asp?name=test&a=b" + "<br>"
" " + u"\u2022" + " " + "<b>" + "URL: " + "</b>" + "https.*example.*8443" + "<br>"
" " + u"\u2022" + " " + "<b>" + "URL: " + "</b>" + "^https.*8443" + "<br>"
" " + u"\u2022" + " " + "<b>" + "Path: " + "</b>" + "/path/file.asp?name=test&a=b" + "<br>"
" " + u"\u2022" + " " + "<b>" + "Path: " + "</b>" + "file.asp" + "<br>"
"<br>"
"<br>"
"<b style='font-size: 150%;'>" + "<u>" + "Filtering the Log Table" + "</u>" + "</b>" + "<br>"
"<br>"
"The log table can be filtered using a variety of case insensitive filters. Enter one filter string per line." + "<br>"
"<br>"
"The Protocol and Port filters use an exact match. The Request filter does not search the URL row, Host row, or Referer row within the request body. The URL, Host, or Referer filters can be used to search these fields. The URL field will not include the port if the protocol/port is http/80 or https/443." + "<br>"
"<br>"
"Case sensitive searching can be performed on the request and the response by using the filter option listed below. There should be one space after the semicolon, followed by a regex filter string." + "<br>"
" " + u"\u2022" + " " + "<b>" + "Case Sensitive:" + "</b>" + " " + "<br>"
"<br>"
"Starting a row with a hyphen '-' will filter out matches. If you need to filter something with a hyphen in the filter string, put another character before the hyphen. The hyphen works for all filters except the request and response filters. The request and response filters will search for the string with the hyphen in it." + "<br>"
" " + u"\u2022" + " " + "<b>" + "-" + "</b>" + "<br>"
"<br>"
"<br>"
"<b style='font-size: 150%;'>" + "<u>" + "Clearing the Log Table" + "</u>" + "</b>" + "<br>"
"<br>"
"The log table can be cleared automatically if the size reaches 100 or 1000 rows. The AutoClear button is located near the log table filters within the main AutoProxy tab." + "<br>"
"The log table can also be cleared completely from the AutoConfig tab." + "<br>"
"<br>"
"<br>"
"<b style='font-size: 150%;'>" + "<u>" + "Other Tabs" + "</u>" + "</b>" + "<br>"
"<br>"
" " + u"\u2022" + " " + "<b>" + "AutoTest: " + "</b>" + "Test the default AutoProxy host matching option, without visiting any hosts." + "<br>"
" " + u"\u2022" + " " + "<b>" + "AutoConfig: " + "</b>" + "Save, restore, copy, and clear data." + "<br>"
" " + u"\u2022" + " " + "<b>" + "AutoBlock: " + "</b>" + "Download and import lists of hosts to block traffic to. Ads, tracking sites, malware, and more can be blocked." + "<br>"
"<br>"
"<br>"
"</body>"
"</html>")
# create scroll pane
scrollPaneAutoProxyHelp = JScrollPane(textPaneHelp)
##### AutoProxy Tab - Middle Section - Help - End #####
##### AutoProxy Tab - Bottom Section - Request Viewer and Log Table Filter - Start #####
# create request viewer for bottom tabs
self._requestViewerAutoProxy = callbacks.createMessageEditor(self, False)
# create response viewer for bottom tabs
self._responseViewerAutoProxy = callbacks.createMessageEditor(self, False)
# create label for AutoAction filter
self._labelAutoProxyAutoFilterAction = JLabel("AutoAction", JLabel.CENTER)
# create checkboxes for filter
self._checkboxAutoProxyAutoFilterActionNo = JCheckBox("No")
self._checkboxAutoProxyAutoFilterActionForwarded = JCheckBox("Forwarded")
self._checkboxAutoProxyAutoFilterActionIntercepted = JCheckBox("Intercepted")
self._checkboxAutoProxyAutoFilterActionDropped = JCheckBox("Dropped")
self._checkboxAutoProxyAutoFilterActionBlocked = JCheckBox("Blocked")
# set checkboxes to true
self._checkboxAutoProxyAutoFilterActionNo.setSelected(True)
self._checkboxAutoProxyAutoFilterActionForwarded.setSelected(True)
self._checkboxAutoProxyAutoFilterActionIntercepted.setSelected(True)
self._checkboxAutoProxyAutoFilterActionDropped.setSelected(True)
self._checkboxAutoProxyAutoFilterActionBlocked.setSelected(True)
# add listener to checkboxes
self._checkboxAutoProxyAutoFilterActionNo.addItemListener(CustomItemListener(self))
self._checkboxAutoProxyAutoFilterActionForwarded.addItemListener(CustomItemListener(self))
self._checkboxAutoProxyAutoFilterActionIntercepted.addItemListener(CustomItemListener(self))
self._checkboxAutoProxyAutoFilterActionDropped.addItemListener(CustomItemListener(self))
self._checkboxAutoProxyAutoFilterActionBlocked.addItemListener(CustomItemListener(self))
# create panels for checkboxes
self._panelAutoProxyAutoFilterActionCheckboxes1 = JPanel()
self._panelAutoProxyAutoFilterActionCheckboxes2 = JPanel()
self._panelAutoProxyAutoFilterActionCheckboxes3 = JPanel()
self._panelAutoProxyAutoFilterActionCheckboxes4 = JPanel()
self._panelAutoProxyAutoFilterActionCheckboxes5 = JPanel()
# set layout
self._panelAutoProxyAutoFilterActionCheckboxes1.setLayout(GridBagLayout())
self._panelAutoProxyAutoFilterActionCheckboxes2.setLayout(GridBagLayout())
self._panelAutoProxyAutoFilterActionCheckboxes3.setLayout(GridBagLayout())
self._panelAutoProxyAutoFilterActionCheckboxes4.setLayout(GridBagLayout())
self._panelAutoProxyAutoFilterActionCheckboxes5.setLayout(GridBagLayout())
# add checkboxes to panels
self._panelAutoProxyAutoFilterActionCheckboxes1.add(self._checkboxAutoProxyAutoFilterActionNo)
self._panelAutoProxyAutoFilterActionCheckboxes2.add(self._checkboxAutoProxyAutoFilterActionForwarded)
self._panelAutoProxyAutoFilterActionCheckboxes3.add(self._checkboxAutoProxyAutoFilterActionIntercepted)
self._panelAutoProxyAutoFilterActionCheckboxes4.add(self._checkboxAutoProxyAutoFilterActionDropped)
self._panelAutoProxyAutoFilterActionCheckboxes5.add(self._checkboxAutoProxyAutoFilterActionBlocked)
# create main panel for checkboxes
self._panelAutoProxyAutoFilterActionCheckboxesMain = JPanel()
# set layout
self._panelAutoProxyAutoFilterActionCheckboxesMain.setLayout(GridLayout(5, 1))
# add checkbox panels to main panel
self._panelAutoProxyAutoFilterActionCheckboxesMain.add(self._panelAutoProxyAutoFilterActionCheckboxes1)
self._panelAutoProxyAutoFilterActionCheckboxesMain.add(self._panelAutoProxyAutoFilterActionCheckboxes2)
self._panelAutoProxyAutoFilterActionCheckboxesMain.add(self._panelAutoProxyAutoFilterActionCheckboxes3)
self._panelAutoProxyAutoFilterActionCheckboxesMain.add(self._panelAutoProxyAutoFilterActionCheckboxes4)
self._panelAutoProxyAutoFilterActionCheckboxesMain.add(self._panelAutoProxyAutoFilterActionCheckboxes5)
# create scroll pane to allow split pane to close more
self._scrollPaneAutoProxyAutoFilterCheckboxes = JScrollPane(self._panelAutoProxyAutoFilterActionCheckboxesMain)
# create panel
self._panelAutoProxyAutoFilterAction = JPanel()
# set layout
self._panelAutoProxyAutoFilterAction.setLayout(BorderLayout())
# add label and pane to panel
self._panelAutoProxyAutoFilterAction.add(self._labelAutoProxyAutoFilterAction, BorderLayout.NORTH)
self._panelAutoProxyAutoFilterAction.add(self._scrollPaneAutoProxyAutoFilterCheckboxes, BorderLayout.CENTER)
# create label for AutoAction method filter
self._labelAutoProxyAutoFilterMethod = JLabel("Method", JLabel.CENTER)
# create custom text area
self._textAreaAutoProxyAutoFilterMethodInput = CustomJTextArea()
# add listener to text area to filter when text area changes
self._textAreaAutoProxyAutoFilterMethodInput.getDocument().addDocumentListener(CustomDocumentListener(self))
# create scroll pane for text area
self._scrollPaneAutoProxyAutoFilterMethodInput = JScrollPane(self._textAreaAutoProxyAutoFilterMethodInput)
# create panel
self._panelAutoProxyAutoFilterMethod = JPanel()
# set layout
self._panelAutoProxyAutoFilterMethod.setLayout(BorderLayout())
# add label and scroll pane to panel
self._panelAutoProxyAutoFilterMethod.add(self._labelAutoProxyAutoFilterMethod, BorderLayout.NORTH)
self._panelAutoProxyAutoFilterMethod.add(self._scrollPaneAutoProxyAutoFilterMethodInput, BorderLayout.CENTER)
# create label for AutoAction protocol filter
self._labelAutoProxyAutoFilterProtocol = JLabel("Protocol", JLabel.CENTER)
# create custom text area
self._textAreaAutoProxyAutoFilterProtocolInput = CustomJTextArea()
# add listener to text area to filter when text area changes
self._textAreaAutoProxyAutoFilterProtocolInput.getDocument().addDocumentListener(CustomDocumentListener(self))
# create scroll pane for text area
self._scrollPaneAutoProxyAutoFilterProtocolInput = JScrollPane(self._textAreaAutoProxyAutoFilterProtocolInput)
# create panel
self._panelAutoProxyAutoFilterProtocol = JPanel()
# set layout
self._panelAutoProxyAutoFilterProtocol.setLayout(BorderLayout())
# add label and scroll pane to panel
self._panelAutoProxyAutoFilterProtocol.add(self._labelAutoProxyAutoFilterProtocol, BorderLayout.NORTH)
self._panelAutoProxyAutoFilterProtocol.add(self._scrollPaneAutoProxyAutoFilterProtocolInput, BorderLayout.CENTER)
# create label for AutoAction port filter
self._labelAutoProxyAutoFilterPort = JLabel(" Port ", JLabel.CENTER)
# create custom text area
self._textAreaAutoProxyAutoFilterPortInput = CustomJTextArea()
# add listener to text area to filter when text area changes
self._textAreaAutoProxyAutoFilterPortInput.getDocument().addDocumentListener(CustomDocumentListener(self))
# create scroll pane for text area
self._scrollPaneAutoProxyAutoFilterPortInput = JScrollPane(self._textAreaAutoProxyAutoFilterPortInput)
# create panel
self._panelAutoProxyAutoFilterPort = JPanel()
# set layout
self._panelAutoProxyAutoFilterPort.setLayout(BorderLayout())
# add label and scroll pane to panel
self._panelAutoProxyAutoFilterPort.add(self._labelAutoProxyAutoFilterPort, BorderLayout.NORTH)
self._panelAutoProxyAutoFilterPort.add(self._scrollPaneAutoProxyAutoFilterPortInput, BorderLayout.CENTER)
# create label for AutoAction host filter
self._labelAutoProxyAutoFilterHost = JLabel(" Host ", JLabel.CENTER)
# create custom text area
self._textAreaAutoProxyAutoFilterHostInput = CustomJTextArea()
# add listener to text area to filter when text area changes
self._textAreaAutoProxyAutoFilterHostInput.getDocument().addDocumentListener(CustomDocumentListener(self))
# create scroll pane for text area
self._scrollPaneAutoProxyAutoFilterHostInput = JScrollPane(self._textAreaAutoProxyAutoFilterHostInput)
# create panel
self._panelAutoProxyAutoFilterHost = JPanel()
# set layout
self._panelAutoProxyAutoFilterHost.setLayout(BorderLayout())
# add label and scroll pane to panel
self._panelAutoProxyAutoFilterHost.add(self._labelAutoProxyAutoFilterHost, BorderLayout.NORTH)
self._panelAutoProxyAutoFilterHost.add(self._scrollPaneAutoProxyAutoFilterHostInput, BorderLayout.CENTER)
# create label for AutoAction referer filter
self._labelAutoProxyAutoFilterReferer = JLabel("Referer", JLabel.CENTER)
# create custom text area
self._textAreaAutoProxyAutoFilterRefererInput = CustomJTextArea()
# add listener to text area to filter when text area changes
self._textAreaAutoProxyAutoFilterRefererInput.getDocument().addDocumentListener(CustomDocumentListener(self))
# create scroll pane for text area
self._scrollPaneAutoProxyAutoFilterRefererInput = JScrollPane(self._textAreaAutoProxyAutoFilterRefererInput)
# create panel
self._panelAutoProxyAutoFilterReferer = JPanel()
# set layout
self._panelAutoProxyAutoFilterReferer.setLayout(BorderLayout())
# add label and scroll pane to panel
self._panelAutoProxyAutoFilterReferer.add(self._labelAutoProxyAutoFilterReferer, BorderLayout.NORTH)
self._panelAutoProxyAutoFilterReferer.add(self._scrollPaneAutoProxyAutoFilterRefererInput, BorderLayout.CENTER)
# create label for AutoAction url filter
self._labelAutoProxyAutoFilterUrl = JLabel(" URL ", JLabel.CENTER)
# create custom text area
self._textAreaAutoProxyAutoFilterUrlInput = CustomJTextArea()
# add listener to text area to filter when text area changes
self._textAreaAutoProxyAutoFilterUrlInput.getDocument().addDocumentListener(CustomDocumentListener(self))
# create scroll pane for text area
self._scrollPaneAutoProxyAutoFilterUrlInput = JScrollPane(self._textAreaAutoProxyAutoFilterUrlInput)
# create panel
self._panelAutoProxyAutoFilterUrl = JPanel()
# set layout
self._panelAutoProxyAutoFilterUrl.setLayout(BorderLayout())
# add label and scroll pane to panel
self._panelAutoProxyAutoFilterUrl.add(self._labelAutoProxyAutoFilterUrl, BorderLayout.NORTH)
self._panelAutoProxyAutoFilterUrl.add(self._scrollPaneAutoProxyAutoFilterUrlInput, BorderLayout.CENTER)
# create label for AutoAction path filter
self._labelAutoProxyAutoFilterPath = JLabel(" Path ", JLabel.CENTER)
# create custom text area
self._textAreaAutoProxyAutoFilterPathInput = CustomJTextArea()
# add listener to text area to filter when text area changes
self._textAreaAutoProxyAutoFilterPathInput.getDocument().addDocumentListener(CustomDocumentListener(self))
# create scroll pane for text area
self._scrollPaneAutoProxyAutoFilterPathInput = JScrollPane(self._textAreaAutoProxyAutoFilterPathInput)
# create panel
self._panelAutoProxyAutoFilterPath = JPanel()
# set layout
self._panelAutoProxyAutoFilterPath.setLayout(BorderLayout())
# add label and scroll pane to panel
self._panelAutoProxyAutoFilterPath.add(self._labelAutoProxyAutoFilterPath, BorderLayout.NORTH)
self._panelAutoProxyAutoFilterPath.add(self._scrollPaneAutoProxyAutoFilterPathInput, BorderLayout.CENTER)
# create label for AutoAction request filter
self._labelAutoProxyAutoFilterRequest = JLabel("Request", JLabel.CENTER)
# create custom text area
self._textAreaAutoProxyAutoFilterRequestInput = CustomJTextArea()
# add listener to text area to filter when text area changes
self._textAreaAutoProxyAutoFilterRequestInput.getDocument().addDocumentListener(CustomDocumentListener(self))
# create scroll pane for text area
self._scrollPaneAutoProxyAutoFilterRequestInput = JScrollPane(self._textAreaAutoProxyAutoFilterRequestInput)
# create panel
self._panelAutoProxyAutoFilterRequest = JPanel()
# set layout
self._panelAutoProxyAutoFilterRequest.setLayout(BorderLayout())
# add label and scroll pane to panel
self._panelAutoProxyAutoFilterRequest.add(self._labelAutoProxyAutoFilterRequest, BorderLayout.NORTH)
self._panelAutoProxyAutoFilterRequest.add(self._scrollPaneAutoProxyAutoFilterRequestInput, BorderLayout.CENTER)
# create label for AutoAction response filter
self._labelAutoProxyAutoFilterResponse = JLabel("Response", JLabel.CENTER)
# create custom text area
self._textAreaAutoProxyAutoFilterResponseInput = CustomJTextArea()
# add listener to text area to filter when text area changes
self._textAreaAutoProxyAutoFilterResponseInput.getDocument().addDocumentListener(CustomDocumentListener(self))
# create scroll pane for text area
self._scrollPaneAutoProxyAutoFilterResponseInput = JScrollPane(self._textAreaAutoProxyAutoFilterResponseInput)
# create panel
self._panelAutoProxyAutoFilterResponse = JPanel()
# set layout
self._panelAutoProxyAutoFilterResponse.setLayout(BorderLayout())
# add label and scroll pane to panel
self._panelAutoProxyAutoFilterResponse.add(self._labelAutoProxyAutoFilterResponse, BorderLayout.NORTH)
self._panelAutoProxyAutoFilterResponse.add(self._scrollPaneAutoProxyAutoFilterResponseInput, BorderLayout.CENTER)
# create label for AutoAction auto clear
self._labelAutoProxyAutoClear = JLabel("AutoClear", JLabel.CENTER)
# create button
self._buttonAutoProxyAutoClear = JButton("Off", actionPerformed=self.buttonActionAutoProxyAutoClear)
# create panel
self._panelAutoProxyAutoClear = JPanel()
# set layout
self._panelAutoProxyAutoClear.setLayout(BorderLayout())
# add label and scroll pane to panel
self._panelAutoProxyAutoClear.add(self._labelAutoProxyAutoClear, BorderLayout.NORTH)
self._panelAutoProxyAutoClear.add(self._buttonAutoProxyAutoClear, BorderLayout.CENTER)
# create first AutoFilter split pane
self._splitpaneAutoProxyAutoFilterHorizontal1 = JSplitPane(JSplitPane.HORIZONTAL_SPLIT)
self._splitpaneAutoProxyAutoFilterHorizontal1.setResizeWeight(0.636)
self._splitpaneAutoProxyAutoFilterHorizontal1.setDividerLocation(0.65)
# create second AutoFilter split pane
self._splitpaneAutoProxyAutoFilterHorizontal2 = JSplitPane(JSplitPane.HORIZONTAL_SPLIT)
self._splitpaneAutoProxyAutoFilterHorizontal2.setResizeWeight(0.571)
self._splitpaneAutoProxyAutoFilterHorizontal2.setDividerLocation(0.571)
# create third AutoFilter split pane
self._splitpaneAutoProxyAutoFilterHorizontal3 = JSplitPane(JSplitPane.HORIZONTAL_SPLIT)
self._splitpaneAutoProxyAutoFilterHorizontal3.setResizeWeight(0.5)
self._splitpaneAutoProxyAutoFilterHorizontal3.setDividerLocation(0.5)
# create fourth AutoFilter split pane
self._splitpaneAutoProxyAutoFilterHorizontal4 = JSplitPane(JSplitPane.HORIZONTAL_SPLIT)
self._splitpaneAutoProxyAutoFilterHorizontal4.setResizeWeight(0.5)
self._splitpaneAutoProxyAutoFilterHorizontal4.setDividerLocation(0.5)
# create fifth AutoFilter split pane
self._splitpaneAutoProxyAutoFilterHorizontal5 = JSplitPane(JSplitPane.HORIZONTAL_SPLIT)
self._splitpaneAutoProxyAutoFilterHorizontal5.setResizeWeight(0.667)
self._splitpaneAutoProxyAutoFilterHorizontal5.setDividerLocation(0.667)
# create sixth AutoFilter split pane
self._splitpaneAutoProxyAutoFilterHorizontal6 = JSplitPane(JSplitPane.HORIZONTAL_SPLIT)
self._splitpaneAutoProxyAutoFilterHorizontal6.setResizeWeight(0.5)
self._splitpaneAutoProxyAutoFilterHorizontal6.setDividerLocation(0.5)
# create seventh AutoFilter split pane
self._splitpaneAutoProxyAutoFilterHorizontal7 = JSplitPane(JSplitPane.HORIZONTAL_SPLIT)
self._splitpaneAutoProxyAutoFilterHorizontal7.setResizeWeight(0.5)
self._splitpaneAutoProxyAutoFilterHorizontal7.setDividerLocation(0.4)
# create eighth AutoFilter split pane
self._splitpaneAutoProxyAutoFilterHorizontal8 = JSplitPane(JSplitPane.HORIZONTAL_SPLIT)
self._splitpaneAutoProxyAutoFilterHorizontal8.setResizeWeight(0.5)
self._splitpaneAutoProxyAutoFilterHorizontal8.setDividerLocation(0.5)
# create ninth AutoFilter split pane
self._splitpaneAutoProxyAutoFilterHorizontal9 = JSplitPane(JSplitPane.HORIZONTAL_SPLIT)
self._splitpaneAutoProxyAutoFilterHorizontal9.setResizeWeight(0.5)
self._splitpaneAutoProxyAutoFilterHorizontal9.setDividerLocation(0.5)
# create tenth AutoFilter split pane
self._splitpaneAutoProxyAutoFilterHorizontal10 = JSplitPane(JSplitPane.HORIZONTAL_SPLIT)
self._splitpaneAutoProxyAutoFilterHorizontal10.setResizeWeight(0.5)
self._splitpaneAutoProxyAutoFilterHorizontal10.setDividerLocation(0.5)
# set left side of first pane
self._splitpaneAutoProxyAutoFilterHorizontal1.setLeftComponent(self._splitpaneAutoProxyAutoFilterHorizontal2)
# set right side of first pane
self._splitpaneAutoProxyAutoFilterHorizontal1.setRightComponent(self._splitpaneAutoProxyAutoFilterHorizontal3)
# set left side second pane
self._splitpaneAutoProxyAutoFilterHorizontal2.setLeftComponent(self._splitpaneAutoProxyAutoFilterHorizontal4)
# set right side of second pane
self._splitpaneAutoProxyAutoFilterHorizontal2.setRightComponent(self._splitpaneAutoProxyAutoFilterHorizontal5)
# set left side of third pane
self._splitpaneAutoProxyAutoFilterHorizontal3.setLeftComponent(self._splitpaneAutoProxyAutoFilterHorizontal6)
# set right side of third pane
self._splitpaneAutoProxyAutoFilterHorizontal3.setRightComponent(self._splitpaneAutoProxyAutoFilterHorizontal7)
# set left side of fourth pane
self._splitpaneAutoProxyAutoFilterHorizontal4.setLeftComponent(self._splitpaneAutoProxyAutoFilterHorizontal8)
# set right side of fourth pane
self._splitpaneAutoProxyAutoFilterHorizontal4.setRightComponent(self._splitpaneAutoProxyAutoFilterHorizontal9)
# set left side of fifth pane
self._splitpaneAutoProxyAutoFilterHorizontal5.setLeftComponent(self._splitpaneAutoProxyAutoFilterHorizontal10)
# set right side of fifth pane
self._splitpaneAutoProxyAutoFilterHorizontal5.setRightComponent(self._panelAutoProxyAutoFilterUrl)
# set left side of sixth pane
self._splitpaneAutoProxyAutoFilterHorizontal6.setLeftComponent(self._panelAutoProxyAutoFilterPath)
# set right side of sixth pane
self._splitpaneAutoProxyAutoFilterHorizontal6.setRightComponent(self._panelAutoProxyAutoFilterRequest)
# set left side of seventh pane
self._splitpaneAutoProxyAutoFilterHorizontal7.setLeftComponent(self._panelAutoProxyAutoFilterResponse)
# set right side of seventh pane
self._splitpaneAutoProxyAutoFilterHorizontal7.setRightComponent(self._panelAutoProxyAutoClear)
# set left side of eighth pane
self._splitpaneAutoProxyAutoFilterHorizontal8.setLeftComponent(self._panelAutoProxyAutoFilterAction)
# set right side of eighth pane
self._splitpaneAutoProxyAutoFilterHorizontal8.setRightComponent(self._panelAutoProxyAutoFilterMethod)
# set left side of ninth pane
self._splitpaneAutoProxyAutoFilterHorizontal9.setLeftComponent(self._panelAutoProxyAutoFilterProtocol)
# set right side of ninth pane
self._splitpaneAutoProxyAutoFilterHorizontal9.setRightComponent(self._panelAutoProxyAutoFilterPort)
# set left side of tenth pane
self._splitpaneAutoProxyAutoFilterHorizontal10.setLeftComponent(self._panelAutoProxyAutoFilterHost)
# set right side of tenth pane
self._splitpaneAutoProxyAutoFilterHorizontal10.setRightComponent(self._panelAutoProxyAutoFilterReferer)
# create custom table row sorter that can unsort
self._tableRowSorterAutoProxyLogs = CustomTableRowSorter(self)
# create custom row filter
self._filterAutoAction = CustomRowFilter(self)
# set row filter
self._tableRowSorterAutoProxyLogs.setRowFilter(self._filterAutoAction)
# set row sorter
self._tableAutoProxyLogs.setRowSorter(self._tableRowSorterAutoProxyLogs)
##### AutoProxy Tab - Bottom Section - Request Viewer and Log Table Filter - End #####
##### AutoProxy Tab - Main Split Panes and Tabs - Start #####
# create main split pane for hosts inputs and middle tabs
self._splitpaneAutoProxyVertical1 = JSplitPane(JSplitPane.VERTICAL_SPLIT)
self._splitpaneAutoProxyVertical1.setResizeWeight(0.25)
self._splitpaneAutoProxyVertical1.setDividerLocation(0.25)
# create second split pane for log table and request details
self._splitpaneAutoProxyVertical2 = JSplitPane(JSplitPane.VERTICAL_SPLIT)
self._splitpaneAutoProxyVertical2.setResizeWeight(0.75)
self._splitpaneAutoProxyVertical2.setDividerLocation(0.75)
# create middle tabs
self._tabbedPaneAutoProxyMiddle = JTabbedPane()
self._tabbedPaneAutoProxyMiddle.addTab("AutoProxy Logs", self._splitpaneAutoProxyVertical2)
self._tabbedPaneAutoProxyMiddle.addTab("AutoAction Hosts", self._scrollPaneAutoProxyHostTable)
self._tabbedPaneAutoProxyMiddle.addTab("AutoRegex Hosts", self._textEditorAutoProxyHostListRegexFormat.getComponent())
self._tabbedPaneAutoProxyMiddle.addTab("AutoText Hosts", self._textEditorAutoProxyHostListTextFormat.getComponent())
self._tabbedPaneAutoProxyMiddle.addTab("AutoProxy Details", scrollPaneAutoProxyHelp)
# set top pane main horizontal split pane
self._splitpaneAutoProxyVertical1.setLeftComponent(self._splitpaneAutoProxyHorizontal1)
# set bottom pane to middle tabs
self._splitpaneAutoProxyVertical1.setRightComponent(self._tabbedPaneAutoProxyMiddle)
# create bottom tabs for request details and filter
self._tabbedPaneAutoProxyBottom = JTabbedPane()
self._tabbedPaneAutoProxyBottom.addTab("AutoFilter Logs", self._splitpaneAutoProxyAutoFilterHorizontal1)
self._tabbedPaneAutoProxyBottom.addTab("Request Details", self._requestViewerAutoProxy.getComponent())
self._tabbedPaneAutoProxyBottom.addTab("Response Details", self._responseViewerAutoProxy.getComponent())
# when using three bottom sections instead of four, keep them the same size as the top three sections
# self._tabbedPaneAutoProxyBottom.addChangeListener(self.propertyChangeAutoProxyBottomTabs)
# set top of second split pane to log table
self._splitpaneAutoProxyVertical2.setLeftComponent(self._scrollPaneAutoProxyLogTable)
# set bottom of second split pane to bottom tabs
self._splitpaneAutoProxyVertical2.setRightComponent(self._tabbedPaneAutoProxyBottom)
##### AutoProxy Tab - Main Split Panes and Tabs - End #####
#
# AutoTest Tab - Start
#
##### AutoTest Tab - Top Section - Start #####
# create label for AutoTest hosts input
self._labelAutoTestHostsInput = JLabel("AutoTest Hosts", JLabel.CENTER)
# create button
self._buttonAutoTest = JButton("Start AutoTest", actionPerformed=self.buttonActionAutoTest)
# create custom text area
self._textAreaAutoTestHostsInput = CustomJTextArea()
# create scroll pane
self._scrollPaneAutoTestHostsInput = JScrollPane(self._textAreaAutoTestHostsInput)
# create panel
self._panelAutoTestHostsInput = JPanel()
# set layout
self._panelAutoTestHostsInput.setLayout(BorderLayout())
# add label and scroll pane and button to panel
self._panelAutoTestHostsInput.add(self._labelAutoTestHostsInput, BorderLayout.NORTH)
self._panelAutoTestHostsInput.add(self._scrollPaneAutoTestHostsInput, BorderLayout.CENTER)
self._panelAutoTestHostsInput.add(self._buttonAutoTest, BorderLayout.SOUTH)
# create section for AutoTest forward input
self._labelAutoTestForwardHostsInput = JLabel("AutoForward Hosts", JLabel.CENTER)
# create custom text area
self._textAreaAutoTestForwardHostsInput = CustomJTextArea()
# add focus listener to text area to remove regex error highlights on focus
self._textAreaAutoTestForwardHostsInput.addFocusListener(CustomFocusListener(self._textAreaAutoTestForwardHostsInput))
# create scroll pane
self._scrollPaneAutoTestForwardHostsInput = JScrollPane(self._textAreaAutoTestForwardHostsInput)
# create panel
self._panelAutoTestForwardHostsInput = JPanel()
# set layout
self._panelAutoTestForwardHostsInput.setLayout(BorderLayout())
# add label and scroll pane to panel
self._panelAutoTestForwardHostsInput.add(self._labelAutoTestForwardHostsInput, BorderLayout.NORTH)
self._panelAutoTestForwardHostsInput.add(self._scrollPaneAutoTestForwardHostsInput, BorderLayout.CENTER)
# create label for AutoTest intercept input
self._labelAutoTestInterceptHostsInput = JLabel("AutoIntercept Hosts", JLabel.CENTER)
# create custom text area
self._textAreaAutoTestInterceptHostsInput = CustomJTextArea()
# add focus listener to text area to remove regex error highlights on focus
self._textAreaAutoTestInterceptHostsInput.addFocusListener(CustomFocusListener(self._textAreaAutoTestInterceptHostsInput))
# create scroll pane
self._scrollPaneAutoTestInterceptHostsInput = JScrollPane(self._textAreaAutoTestInterceptHostsInput)
# create panel
self._panelAutoTestInterceptHostsInput = JPanel()
# set layout
self._panelAutoTestInterceptHostsInput.setLayout(BorderLayout())
# add label and scroll pane to panel
self._panelAutoTestInterceptHostsInput.add(self._labelAutoTestInterceptHostsInput, BorderLayout.NORTH)
self._panelAutoTestInterceptHostsInput.add(self._scrollPaneAutoTestInterceptHostsInput, BorderLayout.CENTER)
# create label for AutoTest drop input
self._labelAutoTestDropHostsInput = JLabel("AutoDrop Hosts", JLabel.CENTER)
# create custom text area
self._textAreaAutoTestDropHostsInput = CustomJTextArea()
# add focus listener to text area to remove regex error highlights on focus
self._textAreaAutoTestDropHostsInput.addFocusListener(CustomFocusListener(self._textAreaAutoTestDropHostsInput))
# create scroll pane
self._scrollPaneAutoTestDropHostsInput = JScrollPane(self._textAreaAutoTestDropHostsInput)
# create panel
self._panelAutoTestDropHostsInput = JPanel()
# set layout
self._panelAutoTestDropHostsInput.setLayout(BorderLayout())
# add label and scroll pane to panel
self._panelAutoTestDropHostsInput.add(self._labelAutoTestDropHostsInput, BorderLayout.NORTH)
self._panelAutoTestDropHostsInput.add(self._scrollPaneAutoTestDropHostsInput, BorderLayout.CENTER)
##### AutoTest Tab - Top Section - End #####
##### AutoTest Tab - Bottom Section - Start #####
# create label for AutoTest no action output
self._labelAutoTestNoActionHostsOutput = JLabel("NoAction", JLabel.CENTER)
# create text area
self._textAreaAutoTestNoActionHostsOutput = JTextArea()
# set text area to read only
self._textAreaAutoTestNoActionHostsOutput.setEditable(False)
# create scroll pane
self._scrollPaneAutoTestNoActionHostsOutput = JScrollPane(self._textAreaAutoTestNoActionHostsOutput)
# create panel