| skipped 18 lines |
19 | 19 | | from java.awt import EventQueue |
20 | 20 | | from java.lang import Runnable |
21 | 21 | | from thread import start_new_thread |
| 22 | + | from javax.swing import JFileChooser |
22 | 23 | | |
23 | 24 | | # Using the Runnable class for thread-safety with Swing |
24 | 25 | | class Run(Runnable): |
| skipped 38 lines |
63 | 64 | | self.outputTxtArea.setLineWrap(True) |
64 | 65 | | self.logPane.setViewportView(self.outputTxtArea) |
65 | 66 | | self.clearBtn = swing.JButton("Clear Log", actionPerformed=self.clearLog) |
| 67 | + | self.exportBtn = swing.JButton("Export Log", actionPerformed=self.exportLog) |
| 68 | + | self.parentFrm = swing.JFileChooser() |
| 69 | + | |
| 70 | + | |
66 | 71 | | |
67 | 72 | | # Layout |
68 | 73 | | layout = swing.GroupLayout(self.tab) |
| skipped 8 lines |
77 | 82 | | .addComponent(self.outputLabel) |
78 | 83 | | .addComponent(self.logPane) |
79 | 84 | | .addComponent(self.clearBtn) |
| 85 | + | .addComponent(self.exportBtn) |
80 | 86 | | ) |
81 | 87 | | ) |
82 | 88 | | ) |
| skipped 5 lines |
88 | 94 | | .addComponent(self.outputLabel) |
89 | 95 | | .addComponent(self.logPane) |
90 | 96 | | .addComponent(self.clearBtn) |
| 97 | + | .addComponent(self.exportBtn) |
91 | 98 | | ) |
92 | 99 | | ) |
93 | 100 | | ) |
| skipped 6 lines |
100 | 107 | | |
101 | 108 | | def clearLog(self, event): |
102 | 109 | | self.outputTxtArea.setText("Burp JS LinkFinder loaded." + "\n" + "Copyright (c) 2019 Frans Hendrik Botes" + "\n" ) |
| 110 | + | |
| 111 | + | def exportLog(self, event): |
| 112 | + | chooseFile = JFileChooser() |
| 113 | + | ret = chooseFile.showDialog(self.logPane, "Choose file") |
| 114 | + | filename = chooseFile.getSelectedFile().getCanonicalPath() |
| 115 | + | print("\n" + "Export to : " + filename) |
| 116 | + | open(filename, 'w', 0).write(self.outputTxtArea.text) |
103 | 117 | | |
104 | 118 | | |
105 | 119 | | def doPassiveScan(self, ihrr): |
| skipped 175 lines |