├── .gitattributes ├── .gitignore ├── README ├── build.xml ├── epl-v10.html ├── lib ├── org.eclipse.core.commands_3.6.0.I20100512-1500.jar ├── org.eclipse.core.runtime_3.6.0.v20100505.jar ├── org.eclipse.equinox.common_3.6.0.v20100503.jar ├── org.eclipse.jface.text_3.6.1.r361_v20100825-0800.jar ├── org.eclipse.jface_3.6.1.M20100825-0800.jar ├── org.eclipse.osgi_3.6.1.R36x_v20100806.jar ├── org.eclipse.text_3.5.0.v20100601-1300.jar └── swt │ ├── org.eclipse.swt.cocoa.macosx.x86_64_3.6.1.v3655c.jar │ ├── org.eclipse.swt.cocoa.macosx_3.6.1.v3655c.jar │ ├── org.eclipse.swt.gtk.linux.x86_3.6.1.v3655c.jar │ ├── org.eclipse.swt.gtk.linux.x86_64_3.6.1.v3655c.jar │ ├── org.eclipse.swt.win32.win32.x86_3.6.1.v3655c.jar │ └── org.eclipse.swt.win32.win32.x86_64_3.6.1.v3655c.jar ├── medusa-gui-icon.xpm ├── medusa-gui.desktop └── src └── org └── taksmind └── medusagui ├── MedusaGui.java └── util ├── CommandFormatter.java ├── FileBrowser.java └── MedusaUtil.java /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | [Dd]ebug/ 46 | [Rr]elease/ 47 | *_i.c 48 | *_p.c 49 | *.ilk 50 | *.meta 51 | *.obj 52 | *.pch 53 | *.pdb 54 | *.pgc 55 | *.pgd 56 | *.rsp 57 | *.sbr 58 | *.tlb 59 | *.tli 60 | *.tlh 61 | *.tmp 62 | *.vspscc 63 | .builds 64 | *.dotCover 65 | 66 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 67 | #packages/ 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | 76 | # Visual Studio profiler 77 | *.psess 78 | *.vsp 79 | 80 | # ReSharper is a .NET coding add-in 81 | _ReSharper* 82 | 83 | # Installshield output folder 84 | [Ee]xpress 85 | 86 | # DocProject is a documentation generator add-in 87 | DocProject/buildhelp/ 88 | DocProject/Help/*.HxT 89 | DocProject/Help/*.HxC 90 | DocProject/Help/*.hhc 91 | DocProject/Help/*.hhk 92 | DocProject/Help/*.hhp 93 | DocProject/Help/Html2 94 | DocProject/Help/html 95 | 96 | # Click-Once directory 97 | publish 98 | 99 | # Others 100 | [Bb]in 101 | [Oo]bj 102 | sql 103 | TestResults 104 | *.Cache 105 | ClientBin 106 | stylecop.* 107 | ~$* 108 | *.dbmdl 109 | Generated_Code #added for RIA/Silverlight projects 110 | 111 | # Backup & report files from converting an old project file to a newer 112 | # Visual Studio version. Backup files are not needed, because we have git ;-) 113 | _UpgradeReport_Files/ 114 | Backup*/ 115 | UpgradeLog*.XML 116 | 117 | 118 | 119 | ############ 120 | ## Windows 121 | ############ 122 | 123 | # Windows image file caches 124 | Thumbs.db 125 | 126 | # Folder config file 127 | Desktop.ini 128 | 129 | 130 | ############# 131 | ## Python 132 | ############# 133 | 134 | *.py[co] 135 | 136 | # Packages 137 | *.egg 138 | *.egg-info 139 | dist 140 | build 141 | eggs 142 | parts 143 | bin 144 | var 145 | sdist 146 | develop-eggs 147 | .installed.cfg 148 | 149 | # Installer logs 150 | pip-log.txt 151 | 152 | # Unit test / coverage reports 153 | .coverage 154 | .tox 155 | 156 | #Translations 157 | *.mo 158 | 159 | #Mr Developer 160 | .mr.developer.cfg 161 | 162 | # Mac crap 163 | .DS_Store 164 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Medusa Gui will automatically detect your operating system and compile for it. 2 | 3 | Commands are as follow 4 | 5 | $ ant dist //creates medusa-gui.jar under bin/ 6 | $ ant clean //cleans up compiled files 7 | # ant install //installs the Medusa-GUI 8 | # ant remove //uninstalls the Medusa-GUI 9 | 10 | ----------------------------- 11 | 12 | How to install: 13 | Run the following command as root - 14 | 15 | # ant install 16 | 17 | and the Medusa-GUI will be installed to the /usr/local directory. 18 | 19 | ----------------------------- 20 | 21 | How to uninstall: 22 | 23 | # ant remove 24 | 25 | NOTE: 26 | JAVA_HOME has to be set to your JDK 27 | 28 | JAVA_HOME=/usr/lib/default-java 29 | export JAVA_HOME 30 | -------------------------------------------------------------------------------- /build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | A graphical user interface for the Medusa brute-forcing utility. 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 | -------------------------------------------------------------------------------- /epl-v10.html: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | Eclipse Public License - Version 1.0 13 | 32 | 78 | 79 | 80 | 81 | 82 |
83 | 84 |

Eclipse Public License - v 1.0 85 |

86 | 87 |

THE ACCOMPANYING PROGRAM IS PROVIDED UNDER 88 | THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, 89 | REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE 90 | OF THIS AGREEMENT.

91 | 92 |

1. DEFINITIONS

93 | 94 |

"Contribution" means:

95 | 96 |

a) 97 | in the case of the initial Contributor, the initial code and documentation 98 | distributed under this Agreement, and
99 | b) in the case of each subsequent Contributor:

100 | 101 |

i) 102 | changes to the Program, and

103 | 104 |

ii) 105 | additions to the Program;

106 | 107 |

where 108 | such changes and/or additions to the Program originate from and are distributed 109 | by that particular Contributor. A Contribution 'originates' from a Contributor 110 | if it was added to the Program by such Contributor itself or anyone acting on 111 | such Contributor's behalf. Contributions do not include additions to the 112 | Program which: (i) are separate modules of software distributed in conjunction 113 | with the Program under their own license agreement, and (ii) are not derivative 114 | works of the Program.

115 | 116 |

"Contributor" means any person or 117 | entity that distributes the Program.

118 | 119 |

"Licensed Patents " mean patent 120 | claims licensable by a Contributor which are necessarily infringed by the use 121 | or sale of its Contribution alone or when combined with the Program.

122 | 123 |

"Program" means the Contributions 124 | distributed in accordance with this Agreement.

125 | 126 |

"Recipient" means anyone who 127 | receives the Program under this Agreement, including all Contributors.

128 | 129 |

2. GRANT OF RIGHTS

130 | 131 |

a) 132 | Subject to the terms of this Agreement, each Contributor hereby grants Recipient 133 | a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly 135 | display, publicly perform, distribute and sublicense the Contribution of such 136 | Contributor, if any, and such derivative works, in source code and object code 137 | form.

138 | 139 |

b) 140 | Subject to the terms of this Agreement, each Contributor hereby grants 141 | Recipient a non-exclusive, worldwide, royalty-free 142 | patent license under Licensed Patents to make, use, sell, offer to sell, import 143 | and otherwise transfer the Contribution of such Contributor, if any, in source 144 | code and object code form. This patent license shall apply to the combination 145 | of the Contribution and the Program if, at the time the Contribution is added 146 | by the Contributor, such addition of the Contribution causes such combination 147 | to be covered by the Licensed Patents. The patent license shall not apply to 148 | any other combinations which include the Contribution. No hardware per se is 149 | licensed hereunder.

150 | 151 |

c) 152 | Recipient understands that although each Contributor grants the licenses to its 153 | Contributions set forth herein, no assurances are provided by any Contributor 154 | that the Program does not infringe the patent or other intellectual property 155 | rights of any other entity. Each Contributor disclaims any liability to Recipient 156 | for claims brought by any other entity based on infringement of intellectual 157 | property rights or otherwise. As a condition to exercising the rights and 158 | licenses granted hereunder, each Recipient hereby assumes sole responsibility 159 | to secure any other intellectual property rights needed, if any. For example, 160 | if a third party patent license is required to allow Recipient to distribute 161 | the Program, it is Recipient's responsibility to acquire that license before 162 | distributing the Program.

163 | 164 |

d) 165 | Each Contributor represents that to its knowledge it has sufficient copyright 166 | rights in its Contribution, if any, to grant the copyright license set forth in 167 | this Agreement.

168 | 169 |

3. REQUIREMENTS

170 | 171 |

A Contributor may choose to distribute the 172 | Program in object code form under its own license agreement, provided that: 173 |

174 | 175 |

a) 176 | it complies with the terms and conditions of this Agreement; and

177 | 178 |

b) 179 | its license agreement:

180 | 181 |

i) 182 | effectively disclaims on behalf of all Contributors all warranties and 183 | conditions, express and implied, including warranties or conditions of title 184 | and non-infringement, and implied warranties or conditions of merchantability 185 | and fitness for a particular purpose;

186 | 187 |

ii) 188 | effectively excludes on behalf of all Contributors all liability for damages, 189 | including direct, indirect, special, incidental and consequential damages, such 190 | as lost profits;

191 | 192 |

iii) 193 | states that any provisions which differ from this Agreement are offered by that 194 | Contributor alone and not by any other party; and

195 | 196 |

iv) 197 | states that source code for the Program is available from such Contributor, and 198 | informs licensees how to obtain it in a reasonable manner on or through a 199 | medium customarily used for software exchange.

200 | 201 |

When the Program is made available in source 202 | code form:

203 | 204 |

a) 205 | it must be made available under this Agreement; and

206 | 207 |

b) a 208 | copy of this Agreement must be included with each copy of the Program.

209 | 210 |

Contributors may not remove or alter any 211 | copyright notices contained within the Program.

212 | 213 |

Each Contributor must identify itself as the 214 | originator of its Contribution, if any, in a manner that reasonably allows 215 | subsequent Recipients to identify the originator of the Contribution.

216 | 217 |

4. COMMERCIAL DISTRIBUTION

218 | 219 |

Commercial distributors of software may 220 | accept certain responsibilities with respect to end users, business partners 221 | and the like. While this license is intended to facilitate the commercial use 222 | of the Program, the Contributor who includes the Program in a commercial 223 | product offering should do so in a manner which does not create potential 224 | liability for other Contributors. Therefore, if a Contributor includes the 225 | Program in a commercial product offering, such Contributor ("Commercial 226 | Contributor") hereby agrees to defend and indemnify every other 227 | Contributor ("Indemnified Contributor") against any losses, damages and 228 | costs (collectively "Losses") arising from claims, lawsuits and other 229 | legal actions brought by a third party against the Indemnified Contributor to 230 | the extent caused by the acts or omissions of such Commercial Contributor in 231 | connection with its distribution of the Program in a commercial product 232 | offering. The obligations in this section do not apply to any claims or Losses 233 | relating to any actual or alleged intellectual property infringement. In order 234 | to qualify, an Indemnified Contributor must: a) promptly notify the Commercial 235 | Contributor in writing of such claim, and b) allow the Commercial Contributor 236 | to control, and cooperate with the Commercial Contributor in, the defense and 237 | any related settlement negotiations. The Indemnified Contributor may participate 238 | in any such claim at its own expense.

239 | 240 |

For example, a Contributor might include the 241 | Program in a commercial product offering, Product X. That Contributor is then a 242 | Commercial Contributor. If that Commercial Contributor then makes performance 243 | claims, or offers warranties related to Product X, those performance claims and 244 | warranties are such Commercial Contributor's responsibility alone. Under this 245 | section, the Commercial Contributor would have to defend claims against the 246 | other Contributors related to those performance claims and warranties, and if a 247 | court requires any other Contributor to pay any damages as a result, the 248 | Commercial Contributor must pay those damages.

249 | 250 |

5. NO WARRANTY

251 | 252 |

EXCEPT AS EXPRESSLY SET FORTH IN THIS 253 | AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT 254 | WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, 255 | WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, 256 | MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely 257 | responsible for determining the appropriateness of using and distributing the 258 | Program and assumes all risks associated with its exercise of rights under this 259 | Agreement , including but not limited to the risks and costs of program errors, 260 | compliance with applicable laws, damage to or loss of data, programs or 261 | equipment, and unavailability or interruption of operations.

262 | 263 |

6. DISCLAIMER OF LIABILITY

264 | 265 |

EXCEPT AS EXPRESSLY SET FORTH IN THIS 266 | AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR 267 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 268 | (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY 269 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 270 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF 271 | THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF 272 | THE POSSIBILITY OF SUCH DAMAGES.

273 | 274 |

7. GENERAL

275 | 276 |

If any provision of this Agreement is invalid 277 | or unenforceable under applicable law, it shall not affect the validity or 278 | enforceability of the remainder of the terms of this Agreement, and without 279 | further action by the parties hereto, such provision shall be reformed to the 280 | minimum extent necessary to make such provision valid and enforceable.

281 | 282 |

If Recipient institutes patent litigation 283 | against any entity (including a cross-claim or counterclaim in a lawsuit) 284 | alleging that the Program itself (excluding combinations of the Program with 285 | other software or hardware) infringes such Recipient's patent(s), then such 286 | Recipient's rights granted under Section 2(b) shall terminate as of the date 287 | such litigation is filed.

288 | 289 |

All Recipient's rights under this Agreement 290 | shall terminate if it fails to comply with any of the material terms or 291 | conditions of this Agreement and does not cure such failure in a reasonable 292 | period of time after becoming aware of such noncompliance. If all Recipient's 293 | rights under this Agreement terminate, Recipient agrees to cease use and 294 | distribution of the Program as soon as reasonably practicable. However, 295 | Recipient's obligations under this Agreement and any licenses granted by 296 | Recipient relating to the Program shall continue and survive.

297 | 298 |

Everyone is permitted to copy and distribute 299 | copies of this Agreement, but in order to avoid inconsistency the Agreement is 300 | copyrighted and may only be modified in the following manner. The Agreement 301 | Steward reserves the right to publish new versions (including revisions) of 302 | this Agreement from time to time. No one other than the Agreement Steward has 303 | the right to modify this Agreement. The Eclipse Foundation is the initial 304 | Agreement Steward. The Eclipse Foundation may assign the responsibility to 305 | serve as the Agreement Steward to a suitable separate entity. Each new version 306 | of the Agreement will be given a distinguishing version number. The Program 307 | (including Contributions) may always be distributed subject to the version of 308 | the Agreement under which it was received. In addition, after a new version of 309 | the Agreement is published, Contributor may elect to distribute the Program 310 | (including its Contributions) under the new version. Except as expressly stated 311 | in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to 312 | the intellectual property of any Contributor under this Agreement, whether 313 | expressly, by implication, estoppel or otherwise. All rights in the Program not 314 | expressly granted under this Agreement are reserved.

315 | 316 |

This Agreement is governed by the laws of the 317 | State of New York and the intellectual property laws of the United States of 318 | America. No party to this Agreement will bring a legal action under this 319 | Agreement more than one year after the cause of action arose. Each party waives 320 | its rights to a jury trial in any resulting litigation.

321 | 322 |

 

323 | 324 |
325 | 326 | 327 | 328 | -------------------------------------------------------------------------------- /lib/org.eclipse.core.commands_3.6.0.I20100512-1500.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tak31337/medusa-gui/1b6f74c60fadc9d140b173f8b08f656195da78b6/lib/org.eclipse.core.commands_3.6.0.I20100512-1500.jar -------------------------------------------------------------------------------- /lib/org.eclipse.core.runtime_3.6.0.v20100505.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tak31337/medusa-gui/1b6f74c60fadc9d140b173f8b08f656195da78b6/lib/org.eclipse.core.runtime_3.6.0.v20100505.jar -------------------------------------------------------------------------------- /lib/org.eclipse.equinox.common_3.6.0.v20100503.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tak31337/medusa-gui/1b6f74c60fadc9d140b173f8b08f656195da78b6/lib/org.eclipse.equinox.common_3.6.0.v20100503.jar -------------------------------------------------------------------------------- /lib/org.eclipse.jface.text_3.6.1.r361_v20100825-0800.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tak31337/medusa-gui/1b6f74c60fadc9d140b173f8b08f656195da78b6/lib/org.eclipse.jface.text_3.6.1.r361_v20100825-0800.jar -------------------------------------------------------------------------------- /lib/org.eclipse.jface_3.6.1.M20100825-0800.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tak31337/medusa-gui/1b6f74c60fadc9d140b173f8b08f656195da78b6/lib/org.eclipse.jface_3.6.1.M20100825-0800.jar -------------------------------------------------------------------------------- /lib/org.eclipse.osgi_3.6.1.R36x_v20100806.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tak31337/medusa-gui/1b6f74c60fadc9d140b173f8b08f656195da78b6/lib/org.eclipse.osgi_3.6.1.R36x_v20100806.jar -------------------------------------------------------------------------------- /lib/org.eclipse.text_3.5.0.v20100601-1300.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tak31337/medusa-gui/1b6f74c60fadc9d140b173f8b08f656195da78b6/lib/org.eclipse.text_3.5.0.v20100601-1300.jar -------------------------------------------------------------------------------- /lib/swt/org.eclipse.swt.cocoa.macosx.x86_64_3.6.1.v3655c.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tak31337/medusa-gui/1b6f74c60fadc9d140b173f8b08f656195da78b6/lib/swt/org.eclipse.swt.cocoa.macosx.x86_64_3.6.1.v3655c.jar -------------------------------------------------------------------------------- /lib/swt/org.eclipse.swt.cocoa.macosx_3.6.1.v3655c.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tak31337/medusa-gui/1b6f74c60fadc9d140b173f8b08f656195da78b6/lib/swt/org.eclipse.swt.cocoa.macosx_3.6.1.v3655c.jar -------------------------------------------------------------------------------- /lib/swt/org.eclipse.swt.gtk.linux.x86_3.6.1.v3655c.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tak31337/medusa-gui/1b6f74c60fadc9d140b173f8b08f656195da78b6/lib/swt/org.eclipse.swt.gtk.linux.x86_3.6.1.v3655c.jar -------------------------------------------------------------------------------- /lib/swt/org.eclipse.swt.gtk.linux.x86_64_3.6.1.v3655c.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tak31337/medusa-gui/1b6f74c60fadc9d140b173f8b08f656195da78b6/lib/swt/org.eclipse.swt.gtk.linux.x86_64_3.6.1.v3655c.jar -------------------------------------------------------------------------------- /lib/swt/org.eclipse.swt.win32.win32.x86_3.6.1.v3655c.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tak31337/medusa-gui/1b6f74c60fadc9d140b173f8b08f656195da78b6/lib/swt/org.eclipse.swt.win32.win32.x86_3.6.1.v3655c.jar -------------------------------------------------------------------------------- /lib/swt/org.eclipse.swt.win32.win32.x86_64_3.6.1.v3655c.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tak31337/medusa-gui/1b6f74c60fadc9d140b173f8b08f656195da78b6/lib/swt/org.eclipse.swt.win32.win32.x86_64_3.6.1.v3655c.jar -------------------------------------------------------------------------------- /medusa-gui-icon.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * medusa_gui_icon_xpm[] = { 3 | "57 57 257 2", 4 | " c None", 5 | ". c #6FCE00", 6 | "+ c #6ACC00", 7 | "@ c #62CD00", 8 | "# c #61CE00", 9 | "$ c #57D100", 10 | "% c #63D200", 11 | "& c #5ED100", 12 | "* c #60CD00", 13 | "= c #56D200", 14 | "- c #6FC600", 15 | "; c #65D200", 16 | "> c #5FC700", 17 | ", c #55CB00", 18 | "' c #5EC700", 19 | ") c #63D100", 20 | "! c #6ACD00", 21 | "~ c #5BD400", 22 | "{ c #5DD100", 23 | "] c #5FD400", 24 | "^ c #63D000", 25 | "/ c #60D100", 26 | "( c #5FD200", 27 | "_ c #61D300", 28 | ": c #63D300", 29 | "< c #5ED200", 30 | "[ c #61D000", 31 | "} c #64CA00", 32 | "| c #62D200", 33 | "1 c #65D300", 34 | "2 c #60D600", 35 | "3 c #5FCF00", 36 | "4 c #5CD500", 37 | "5 c #67D500", 38 | "6 c #5DD000", 39 | "7 c #5ECE00", 40 | "8 c #6BD000", 41 | "9 c #6ACB00", 42 | "0 c #62D400", 43 | "a c #63D400", 44 | "b c #60D400", 45 | "c c #62D300", 46 | "d c #61D200", 47 | "e c #5ACE00", 48 | "f c #5CD300", 49 | "g c #63CE00", 50 | "h c #63CF00", 51 | "i c #64D600", 52 | "j c #65CF00", 53 | "k c #6DC800", 54 | "l c #60D000", 55 | "m c #5FD100", 56 | "n c #59CE00", 57 | "o c #62CE00", 58 | "p c #71CF00", 59 | "q c #64D000", 60 | "r c #62D500", 61 | "s c #5FD300", 62 | "t c #68D000", 63 | "u c #5FD500", 64 | "v c #60D500", 65 | "w c #64D500", 66 | "x c #59D300", 67 | "y c #66CB00", 68 | "z c #74D800", 69 | "A c #61D400", 70 | "B c #5DD400", 71 | "C c #66CD00", 72 | "D c #5FC500", 73 | "E c #6BD100", 74 | "F c #5DD300", 75 | "G c #53D100", 76 | "H c #64D300", 77 | "I c #68CF00", 78 | "J c #60D300", 79 | "K c #66CE00", 80 | "L c #5DCC00", 81 | "M c #60CC00", 82 | "N c #61D700", 83 | "O c #62C700", 84 | "P c #6ECE00", 85 | "Q c #69DA00", 86 | "R c #61D100", 87 | "S c #71CC00", 88 | "T c #65CA00", 89 | "U c #64D100", 90 | "V c #5ED300", 91 | "W c #5BD200", 92 | "X c #5ECD00", 93 | "Y c #66CF00", 94 | "Z c #61CD00", 95 | "` c #73C600", 96 | " . c #64D200", 97 | ".. c #60D200", 98 | "+. c #64CF00", 99 | "@. c #5CD100", 100 | "#. c #67D200", 101 | "$. c #65D500", 102 | "%. c #5DD500", 103 | "&. c #66C800", 104 | "*. c #69D100", 105 | "=. c #72CA00", 106 | "-. c #5FD600", 107 | ";. c #58D300", 108 | ">. c #65D000", 109 | ",. c #67D000", 110 | "'. c #56D000", 111 | "). c #61D500", 112 | "!. c #5FCE00", 113 | "~. c #66D300", 114 | "{. c #66D400", 115 | "]. c #6EC900", 116 | "^. c #78C600", 117 | "/. c #62D700", 118 | "(. c #5ED000", 119 | "_. c #63D600", 120 | ":. c #62D100", 121 | "<. c #67CC00", 122 | "[. c #6EC200", 123 | "}. c #65CC00", 124 | "|. c #5CD000", 125 | "1. c #68D100", 126 | "2. c #6CC700", 127 | "3. c #5FCC00", 128 | "4. c #69D000", 129 | "5. c #67D100", 130 | "6. c #5CD400", 131 | "7. c #64D400", 132 | "8. c #6DD000", 133 | "9. c #62C300", 134 | "0. c #56CB00", 135 | "a. c #59D100", 136 | "b. c #66D200", 137 | "c. c #62D000", 138 | "d. c #5BD100", 139 | "e. c #65D100", 140 | "f. c #65D400", 141 | "g. c #65CD00", 142 | "h. c #70D100", 143 | "i. c #5DD200", 144 | "j. c #61CF00", 145 | "k. c #66C300", 146 | "l. c #5FD900", 147 | "m. c #57D400", 148 | "n. c #66D000", 149 | "o. c #62CF00", 150 | "p. c #6CD400", 151 | "q. c #59CF00", 152 | "r. c #65C300", 153 | "s. c #53D300", 154 | "t. c #68D200", 155 | "u. c #5ACF00", 156 | "v. c #63D500", 157 | "w. c #5ED400", 158 | "x. c #58D500", 159 | "y. c #6EC400", 160 | "z. c #5FC800", 161 | "A. c #6CCE00", 162 | "B. c #6BCF00", 163 | "C. c #5FCB00", 164 | "D. c #5DC800", 165 | "E. c #61CB00", 166 | "F. c #52D500", 167 | "G. c #5BCA00", 168 | "H. c #58D100", 169 | "I. c #5DC900", 170 | "J. c #60CA00", 171 | "K. c #5AD100", 172 | "L. c #57CD00", 173 | "M. c #6FCB00", 174 | "N. c #6ECD00", 175 | "O. c #58D400", 176 | "P. c #65CE00", 177 | "Q. c #61D600", 178 | "R. c #6BCE00", 179 | "S. c #5ECB00", 180 | "T. c #67D300", 181 | "U. c #64CB00", 182 | "V. c #56D100", 183 | "W. c #5DC500", 184 | "X. c #5ECF00", 185 | "Y. c #77D000", 186 | "Z. c #4FD300", 187 | "`. c #54D000", 188 | " + c #66D100", 189 | ".+ c #57CB00", 190 | "++ c #69CD00", 191 | "@+ c #77D100", 192 | "#+ c #5BD600", 193 | "$+ c #63CB00", 194 | "%+ c #51D300", 195 | "&+ c #5CCF00", 196 | "*+ c #6AD800", 197 | "=+ c #5BD300", 198 | "-+ c #69C400", 199 | ";+ c #68D400", 200 | ">+ c #6DC500", 201 | ",+ c #6CD200", 202 | "'+ c #5FD000", 203 | ")+ c #60CF00", 204 | "!+ c #5BD700", 205 | "~+ c #68CE00", 206 | "{+ c #66D500", 207 | "]+ c #60C400", 208 | "^+ c #5BD500", 209 | "/+ c #56CF00", 210 | "(+ c #5BBE00", 211 | "_+ c #5DCE00", 212 | ":+ c #58D000", 213 | "<+ c #68CD00", 214 | "[+ c #69CE00", 215 | "}+ c #64C800", 216 | "|+ c #5FC600", 217 | "1+ c #63CD00", 218 | "2+ c #6AD600", 219 | "3+ c #70CA00", 220 | "4+ c #76CA00", 221 | "5+ c #56D700", 222 | "6+ c #56CD00", 223 | "7+ c #5AD200", 224 | "8+ c #5AD600", 225 | "9+ c #6CD000", 226 | "0+ c #6AD000", 227 | "a+ c #5BCF00", 228 | "b+ c #64CD00", 229 | "c+ c #72CB00", 230 | "d+ c #5ED600", 231 | "e+ c #60D700", 232 | "f+ c #50D100", 233 | "g+ c #5DCD00", 234 | "h+ c #64C500", 235 | "i+ c #63C700", 236 | "j+ c #60CE00", 237 | "k+ c #68D700", 238 | "l+ c #6BC900", 239 | "m+ c #6BC200", 240 | "n+ c #5BD000", 241 | "o+ c #5EC500", 242 | "p+ c #53CE00", 243 | "q+ c #63C800", 244 | "r+ c #72CF00", 245 | "s+ c #75C600", 246 | "t+ c #73C900", 247 | "u+ c #5FCA00", 248 | "v+ c #68C900", 249 | "w+ c #68C700", 250 | "x+ c #5ED500", 251 | "y+ c #6CD300", 252 | "z+ c #54D100", 253 | "A+ c #5FCD00", 254 | "B+ c #5ED800", 255 | "C+ c #64CC00", 256 | "D+ c #65C800", 257 | "E+ c #6DD400", 258 | "F+ c #67CF00", 259 | "G+ c #5CD200", 260 | "H+ c #67C800", 261 | " ", 262 | " . + @ # $ % ", 263 | " & * = - ; > , ' ) ! ~ { ] * ", 264 | " ^ / ( _ : < % ~ [ } | _ 1 2 3 4 5 6 7 8 ", 265 | " 9 6 0 a 0 0 a 0 0 : a b c 0 0 : a d e f g ", 266 | " h % i j : a a a a a a a 0 a 0 a a a 0 : = k l m n o < 6 p ", 267 | " q _ _ r s 0 a a a a a a a a a a a a a : _ ~ t _ d u v w x y ", 268 | " z ^ A a a c a : a a a a a a a a a a a a a a % B C a D l A : c r E F ", 269 | " g G | 0 a a a a a a a a a a a a a a a a a a c H u } I 3 F : : J K b L ", 270 | " M d a 0 : a a a a a a a a a a a a a a a a a a a | N O P Q s R s S T / { U ", 271 | " x : a a a a a a a a a a a a a a a a a a a a a 0 H d ~ V W X Y : c h Z u 0 $ ` ", 272 | " _ V : a a a a a a a a a a a a a a a a a a a a a a c . .| 0 1 ..A 2 ) % & . +.B q ", 273 | " X @.#.: a a a a a a a a a a a a a a a a a a a a a a c 0 0 a c 0 0 : s $.> Z %.: % ", 274 | " Y d ; v c a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a { &. *. =.-.J : c ", 275 | " ;.>.c : a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a : r ,. '.6 : ).% ", 276 | " !.~...a 0 c a a a a a a a a a a a a a a a a a a a a a a a a a a a a a 0 ) q / [ h / a {.~ m o ].S ^. ", 277 | " : [ /.c a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a : 0 ( : (._.A :.<.[.}.| :. ", 278 | " + s 0 c a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a c : : : : q ", 279 | " J : a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a |.1.2. ", 280 | " B : a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a 0 3.4. 5.W 6 6.7.8. ", 281 | " 9...c a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a 0 % 0. ,.5.a._ a b.c.c [ ", 282 | " d.e.0 a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a c c a a a a 0 f.!.m s :.; 0 a B g. h. ", 283 | " $ ] : a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a c 0 a J o i.c | x ", 284 | "C ( j.a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a : a : : a : a a a a 0 : .. k.l.n ", 285 | "m.).a c a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a c :.( R | a : 0 : : _ n. o.a. ", 286 | "& a c a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a V l ] p.R q.0 c a R d w r. s.t. ", 287 | "{ a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a : b c.u. 2 ^ 0 c A e.c J v. ", 288 | "{ a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a : d r ).% w.y |.m i 4.x. ( y. z.# A. ", 289 | "< a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a c _ R ) a : %.B. b.C.~ e.D. E.c ] F. ", 290 | "{ a c a a a a a a a a a a a a a a a a a a a a a a a a a : 0 0 c 0 0 r f.{.0 a d s G. H.6 U Z I.g J...6 R ", 291 | "f ( c c a a a a a a a a a a a a a a a a a a a a a a a a c ( 3 2 7 ) / !.K.< & .._ L.M. 0 c F N. O. P.Q.c W ", 292 | "R.B ^ 0 a a a a a a a a a a a a a a a a a a a a a : 0 : 0 / H s B S.T.b U. ^ a a m x _ a V. ", 293 | "W.6.q 0 a a a a a a a a a a a a a a a a a a a a a 0 .b J ( d f R X. Y. ) H _ 6 Z.V | `. ", 294 | " / c a a a a a a a a a a a a a a a a a a a a a a 0 d d + q .+ W q : ++ @+b. ", 295 | " u.c a a a a a a a a a a a a a a a a a a a a a a : #+>. $+%+&+| V *+h % (.h M e.a =+-+ ", 296 | " 3.c.0 a a a a a a a a a a a a a a a a a a a a a a @.;+>+s | 0 d 0 H i.( | .% _ 6 ,+ j.a c ..'+) )+!+ ", 297 | " ~+| 0 a a a a a a a a a a a a a a a a a a a a a 0 q (.x : c a a 0 )+# U : {+1 | e. ]+^+: a v./+V (+ ", 298 | " s : a a a a a a a a a a a a a a a a a a a a a c _ R _+0 a a a a F h 7.:+r l <+ b.0 : [+ h. ", 299 | " J a 0 a a a a a a a a a a a a a a a a a a a a a c 0 a c a a a c +f }+ |+( 1+ 2+%.U e. ", 300 | " 1+s 0 a a a a a a a a a a a a a a a a a a a a a a a a a a a a : o.%.@.3+ . q. 4+J d ,+ ", 301 | " )+d c 0 a a a a a a a a a a a a a a a a a a a a a a a a a a a '+& 1 5+ L.; 3 :. R ", 302 | " P.j.7.0 a a a a a a a a a a a a a a a a a a a a a a a a a a 0 | j.6+ j. * n #+ ", 303 | " 7+l : A 0 a a a a a a a a a a a a a a a a a a a a a a a a : R s h 3 8+ 9+&+ ", 304 | " [+e :.(.: a a a a a a a a a a a a a a a a a a a a a a a a 0 c.,. 0+ a+ .b+n.:. ", 305 | " | %.^ c 0 0 a a a a a a a a a a a a a a a a a 0 : 0 0 : : d. c+:. 6 ..:.t.% ", 306 | " d+( : c : c a a a a a a a a a a a a a a a a : e+c.+.] R f+ g+! h+(.o.a.#.| i+ ", 307 | " B :.H % 0 a a a a a a a a a a a a a a a a 0 j+d.k+@.H 8 j.R l+ m+| a 0 : ).n+ ", 308 | " a H H 0 0 a 0 a a a a a a a a a a a a a 0 ( o+ 4. p+_ c.1. q.m m s c b q+ ", 309 | " r+:.c c.: ] : a a a a a a a a a a a a a : V s+a m T.t+ u+& w.: ; H c v+ ", 310 | " J F 0 _ c a a a a a a a a a a a a a c % j+a+( 0 : H b R { ", 311 | " w+W f.c a c a a a a a a a a a a a 0 @ t.H.x+g | c a c R t. ", 312 | " y+z+0+7.0 a a a a a a a a a a a c o. e.J c c : a [ % ] o. ", 313 | " H.< c a 0 0 0 0 0 0 : a a 0 : f '+ 6 c 0 c : c v ^+q+ ", 314 | " )+7+d c.>._ ; +0 a a a 0 A+_. s 1 [ a B+_+<+ ", 315 | " (.w.s U ^+F : : a c 0 ^ f C+@.V e D+ ", 316 | " E+F+z+'.G+< ( ( J )+H+ ", 317 | " "}; 318 | -------------------------------------------------------------------------------- /medusa-gui.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=Medusa Gui 4 | Comment=A graphical front-end for the medusa bruteforcer client 5 | Exec=medusa-gui 6 | Icon=/usr/local/share/medusa-gui/medusa-gui-icon.xpm 7 | Type=Application 8 | Categories=Application;Network 9 | Terminal=false 10 | -------------------------------------------------------------------------------- /src/org/taksmind/medusagui/MedusaGui.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010 Hippos Development Team 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.opensource.org/licenses/eclipse-1.0.php 7 | * Contributors: 8 | * 9 | * Hippos Development Team - Medusa Graphical User Interface 10 | * 11 | ******************************************************************************/ 12 | package org.taksmind.medusagui; 13 | 14 | 15 | import java.io.IOException; 16 | import java.util.Scanner; 17 | 18 | import org.eclipse.jface.action.StatusLineManager; 19 | import org.eclipse.jface.viewers.ArrayContentProvider; 20 | import org.eclipse.jface.viewers.ComboViewer; 21 | import org.eclipse.jface.window.ApplicationWindow; 22 | import org.eclipse.swt.SWT; 23 | import org.eclipse.swt.SWTException; 24 | import org.eclipse.swt.events.FocusEvent; 25 | import org.eclipse.swt.events.FocusListener; 26 | import org.eclipse.swt.events.SelectionAdapter; 27 | import org.eclipse.swt.events.SelectionEvent; 28 | import org.eclipse.swt.events.SelectionListener; 29 | import org.eclipse.swt.graphics.Image; 30 | import org.eclipse.swt.layout.GridData; 31 | import org.eclipse.swt.layout.GridLayout; 32 | import org.eclipse.swt.widgets.Button; 33 | import org.eclipse.swt.widgets.Composite; 34 | import org.eclipse.swt.widgets.Control; 35 | import org.eclipse.swt.widgets.Display; 36 | import org.eclipse.swt.widgets.Group; 37 | import org.eclipse.swt.widgets.Label; 38 | import org.eclipse.swt.widgets.Shell; 39 | import org.eclipse.swt.widgets.Text; 40 | import org.eclipse.swt.widgets.Tray; 41 | import org.eclipse.swt.widgets.TrayItem; 42 | import org.taksmind.medusagui.util.CommandFormatter; 43 | import org.taksmind.medusagui.util.FileBrowser; 44 | import org.taksmind.medusagui.util.MedusaUtil; 45 | 46 | public class MedusaGui extends ApplicationWindow { 47 | 48 | private boolean editing; //Some obscure variable, like you probably haven't heard of it. 49 | 50 | public MedusaGui() { 51 | super(null); 52 | } 53 | 54 | public void run() { 55 | setBlockOnOpen(true); 56 | open(); 57 | addStatusLine(); 58 | Display.getCurrent().dispose(); 59 | } 60 | 61 | protected void configureShell(Shell shell) { 62 | super.configureShell(shell); 63 | shell.setText("Medusa-GUI"); 64 | shell.setSize(800, 600); 65 | shell.setImage(new Image(Display.getCurrent(), "/usr/local/share/medusa-gui/medusa-gui-icon.xpm")); 66 | } 67 | 68 | protected Control createContents(final Composite parent) { 69 | final Composite composite = new Composite(parent, SWT.NONE); 70 | composite.setLayout(new GridLayout()); 71 | 72 | createLabelGroup(composite, "Target", "Mods"); 73 | 74 | Group group1 = new Group(composite, SWT.NONE); 75 | group1.setLayout(new GridLayout(2, true)); 76 | group1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); 77 | 78 | final Text target = new Text(group1, SWT.NONE); 79 | target.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); 80 | 81 | final ComboViewer mods = new ComboViewer(group1, SWT.DROP_DOWN 82 | | SWT.READ_ONLY); 83 | mods.getCombo().setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); 84 | mods.setContentProvider(new ArrayContentProvider()); 85 | try { 86 | mods.setInput(MedusaUtil.getModules()); 87 | } catch (IOException e) { 88 | e.printStackTrace(); 89 | } 90 | 91 | /** 92 | * Groups in groups in groups.. 93 | */ 94 | Group radioGroup = new Group(composite, SWT.NONE); 95 | radioGroup.setLayout(new GridLayout(2, true)); 96 | radioGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); 97 | 98 | final Button[] usernameSelection = createRadioGroup(radioGroup, 99 | "Username Text File", "Username Single Value"); 100 | final Button[] passwordSelection = createRadioGroup(radioGroup, 101 | "Password Text File", "Password Single Value"); 102 | 103 | createLabelGroup(composite, "User List", "Password List"); 104 | final Text[] listOption = createTextGroup(composite, true); 105 | createLabelGroup(composite, "User Single", "Password Single"); 106 | final Text[] singleOption = createTextGroup(composite, false); 107 | 108 | /** 109 | * do you want a username list? 110 | */ 111 | usernameSelection[0].addSelectionListener(new SelectionAdapter() { 112 | @Override 113 | public void widgetSelected(SelectionEvent event) { 114 | singleOption[0].setEnabled(false); 115 | listOption[0].setEnabled(true); 116 | editing = false; 117 | } 118 | }); 119 | 120 | /** 121 | * do you want a single password? 122 | */ 123 | passwordSelection[1].addSelectionListener(new SelectionAdapter() { 124 | @Override 125 | public void widgetSelected(SelectionEvent event) { 126 | listOption[1].setEnabled(false); 127 | singleOption[1].setEnabled(true); 128 | editing = false; 129 | } 130 | }); 131 | 132 | /** 133 | * do you want a password list? 134 | */ 135 | passwordSelection[0].addSelectionListener(new SelectionAdapter() { 136 | @Override 137 | public void widgetSelected(SelectionEvent event) { 138 | singleOption[1].setEnabled(false); 139 | listOption[1].setEnabled(true); 140 | editing = false; 141 | } 142 | }); 143 | 144 | /** 145 | * do you want a single username? 146 | */ 147 | usernameSelection[1].addSelectionListener(new SelectionAdapter() { 148 | @Override 149 | public void widgetSelected(SelectionEvent event) { 150 | listOption[0].setEnabled(false); 151 | singleOption[0].setEnabled(true); 152 | editing = false; 153 | } 154 | }); 155 | 156 | Group commandGroup = new Group(composite, SWT.NONE); 157 | commandGroup.setLayout(new GridLayout(2, false)); 158 | commandGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); 159 | 160 | Label commandLabel = new Label(commandGroup, SWT.NONE); 161 | commandLabel.setText("Command: "); 162 | commandLabel.setLayoutData(new GridData( 163 | GridData.HORIZONTAL_ALIGN_CENTER)); 164 | 165 | final Text commandText = new Text(commandGroup, SWT.NONE); 166 | commandText.setLayoutData(new GridData(GridData.FILL_BOTH)); 167 | 168 | Label outputLabel = new Label(composite, SWT.NONE); 169 | outputLabel.setText("Output:"); 170 | 171 | final Text output = new Text(composite, SWT.READ_ONLY | SWT.MULTI 172 | | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL); 173 | output.setLayoutData(new GridData(GridData.FILL_BOTH)); 174 | 175 | Button execute = new Button(composite, SWT.PUSH); 176 | execute.setText("Execute"); 177 | execute.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END)); 178 | execute.addSelectionListener(new SelectionAdapter() { 179 | @Override 180 | public void widgetSelected(SelectionEvent event) { 181 | /** 182 | * Oh Mr. CommandFormatter, what shall the command be? 183 | */ 184 | editing = false; 185 | 186 | String command = commandText.getText(); 187 | 188 | Runtime run = Runtime.getRuntime(); 189 | try { 190 | output.append(command + "\n"); 191 | Process proc = run.exec(command); 192 | final Scanner scan = new Scanner(proc.getInputStream()); 193 | Runnable thr = new Runnable() { 194 | 195 | @Override 196 | public void run() { 197 | if (scan.hasNextLine()) { 198 | output.append(scan.nextLine() + "\n"); 199 | } 200 | parent.getDisplay().timerExec(50, this); 201 | } 202 | }; 203 | parent.getDisplay().timerExec(50, thr); 204 | // output.append(out); 205 | } catch (IOException e) { 206 | e.printStackTrace(); 207 | } 208 | 209 | } 210 | }); 211 | 212 | editing = false; 213 | 214 | commandText.addFocusListener(new FocusListener() { 215 | 216 | @Override 217 | public void focusLost(FocusEvent arg0) { 218 | //do nothing 219 | } 220 | 221 | @Override 222 | public void focusGained(FocusEvent arg0) { 223 | editing = true; 224 | } 225 | }); 226 | 227 | Runnable runnable = new Runnable() { 228 | public void run() { 229 | if (!editing) { 230 | commandText.setText(CommandFormatter.getCommand( 231 | usernameSelection, passwordSelection, listOption, 232 | singleOption, mods, target)); 233 | } 234 | parent.getDisplay().timerExec(400, this); 235 | } 236 | }; 237 | 238 | parent.getDisplay().timerExec(400, runnable); 239 | 240 | final Shell shell = composite.getShell(); 241 | final Tray tray = composite.getDisplay().getSystemTray(); 242 | final TrayItem item = new TrayItem(tray, SWT.None); 243 | Image i = new Image(composite.getDisplay(), "/usr/local/share/medusa-gui/medusa-gui-icon.xpm"); 244 | item.setImage(i); 245 | item.addSelectionListener(new SelectionListener() { 246 | 247 | @Override 248 | public void widgetSelected(SelectionEvent arg0) { 249 | // do nothing. 250 | } 251 | 252 | @Override 253 | public void widgetDefaultSelected(SelectionEvent arg0) { 254 | shell.setVisible(!shell.getVisible()); 255 | } 256 | }); 257 | 258 | return composite; 259 | } 260 | 261 | /** 262 | * Create the labels 263 | */ 264 | protected void createLabelGroup(Composite parent, String text1, String text2) { 265 | Group group = new Group(parent, SWT.NONE); 266 | group.setLayout(new GridLayout(2, true)); 267 | group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); 268 | 269 | Label label1 = new Label(group, SWT.NONE); 270 | label1.setText(text1); 271 | label1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); 272 | 273 | Label label2 = new Label(group, SWT.NONE); 274 | label2.setText(text2); 275 | label2.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); 276 | } 277 | 278 | protected Button[] createRadioGroup(Composite parent, String text1, 279 | String text2) { 280 | Group group = new Group(parent, SWT.NONE); 281 | group.setLayout(new GridLayout(1, true)); 282 | group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); 283 | 284 | Button button1 = new Button(group, SWT.RADIO); 285 | button1.setText(text1); 286 | button1.setSelection(true); 287 | 288 | Button button2 = new Button(group, SWT.RADIO); 289 | button2.setText(text2); 290 | 291 | return (new Button[] { button1, button2 }); 292 | } 293 | 294 | protected Text[] createTextGroup(Composite parent, boolean browse) { 295 | Group group = new Group(parent, SWT.NONE); 296 | group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); 297 | 298 | Text text1; 299 | Text text2; 300 | if (browse) { 301 | group.setLayout(new GridLayout(4, false)); 302 | text1 = new Text(group, SWT.NONE); 303 | text1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); 304 | 305 | Button browse1 = new Button(group, SWT.PUSH); 306 | browse1.setText("..."); 307 | browse1.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END)); 308 | browse1.addSelectionListener(new FileBrowser(text1)); 309 | 310 | text2 = new Text(group, SWT.NONE); 311 | text2.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); 312 | 313 | Button browse2 = new Button(group, SWT.PUSH); 314 | browse2.setText("..."); 315 | browse2.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END)); 316 | browse2.addSelectionListener(new FileBrowser(text2)); 317 | } else { 318 | group.setLayout(new GridLayout(2, true)); 319 | text1 = new Text(group, SWT.NONE); 320 | text1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); 321 | text1.setEnabled(false); 322 | text2 = new Text(group, SWT.NONE); 323 | text2.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); 324 | text2.setEnabled(false); 325 | } 326 | 327 | return (new Text[] { text1, text2 }); 328 | } 329 | 330 | /** 331 | * Creates the status line manager 332 | */ 333 | protected StatusLineManager createStatusLineManager() { 334 | return super.createStatusLineManager(); 335 | } 336 | 337 | /** 338 | * @param args 339 | */ 340 | public static void main(String[] args) { 341 | new MedusaGui().run(); 342 | } 343 | } 344 | -------------------------------------------------------------------------------- /src/org/taksmind/medusagui/util/CommandFormatter.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010 Hippos Development Team 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.opensource.org/licenses/eclipse-1.0.php 7 | * Contributors: 8 | * 9 | * Hippos Development Team - Medusa Graphical User Interface 10 | * 11 | ******************************************************************************/ 12 | package org.taksmind.medusagui.util; 13 | 14 | import org.eclipse.jface.viewers.ComboViewer; 15 | import org.eclipse.swt.widgets.Button; 16 | import org.eclipse.swt.widgets.Text; 17 | 18 | public class CommandFormatter { 19 | public static String getCommand(Button[] usernameSelection, 20 | Button[] passwordSelection, Text[] listOption, Text[] singleOption, 21 | ComboViewer mods, Text target) { 22 | String command = ""; 23 | if (usernameSelection[0].getSelection() 24 | && passwordSelection[0].getSelection()) { 25 | command = "medusa -h " + target.getText() + " -U " 26 | + listOption[0].getText() + " -P " 27 | + listOption[1].getText() + " -M " 28 | + mods.getElementAt(mods.getCombo().getSelectionIndex()); 29 | } else if (usernameSelection[0].getSelection() 30 | && passwordSelection[1].getSelection()) { 31 | command = "medusa -h " + target.getText() + " -U " 32 | + listOption[0].getText() + " -p " 33 | + singleOption[1].getText() + " -M " 34 | + mods.getElementAt(mods.getCombo().getSelectionIndex()); 35 | } else if (usernameSelection[1].getSelection() 36 | && passwordSelection[1].getSelection()) { 37 | command = "medusa -h " + target.getText() + " -u " 38 | + singleOption[0].getText() + " -p " 39 | + singleOption[1].getText() + " -M " 40 | + mods.getElementAt(mods.getCombo().getSelectionIndex()); 41 | } else if (usernameSelection[1].getSelection() 42 | && passwordSelection[0].getSelection()) { 43 | command = "medusa -h " + target.getText() + " -u " 44 | + singleOption[0].getText() + " -P " 45 | + listOption[1].getText() + " -M " 46 | + mods.getElementAt(mods.getCombo().getSelectionIndex()); 47 | } 48 | 49 | return command; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/org/taksmind/medusagui/util/FileBrowser.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010 Hippos Development Team 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.opensource.org/licenses/eclipse-1.0.php 7 | * Contributors: 8 | * 9 | * Hippos Development Team - Java Subnetting Calculator 10 | * 11 | ******************************************************************************/ 12 | package org.taksmind.medusagui.util; 13 | 14 | import org.eclipse.swt.events.*; 15 | import org.eclipse.swt.widgets.*; 16 | 17 | /** 18 | * This class allows users to browse for a directory 19 | */ 20 | public class FileBrowser extends SelectionAdapter { 21 | // The Text this browser is tied to 22 | private Text text; 23 | 24 | /** 25 | * DirectoryBrowser constructor 26 | * 27 | * @param text 28 | */ 29 | public FileBrowser(Text text) { 30 | this.text = text; 31 | } 32 | 33 | /** 34 | * Called when the browse button is pushed 35 | * 36 | * @param event the generated event 37 | */ 38 | public void widgetSelected(SelectionEvent event) { 39 | FileDialog dlg = new FileDialog(Display.getCurrent() 40 | .getActiveShell()); 41 | dlg.setFilterPath(text.getText()); 42 | String file = dlg.open(); 43 | if (file != null) { 44 | text.setText(file); 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /src/org/taksmind/medusagui/util/MedusaUtil.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010 Hippos Development Team 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.opensource.org/licenses/eclipse-1.0.php 7 | * Contributors: 8 | * 9 | * Hippos Development Team - Medusa Graphical User Interface 10 | * 11 | ******************************************************************************/ 12 | package org.taksmind.medusagui.util; 13 | 14 | import java.io.IOException; 15 | import java.util.ArrayList; 16 | import java.util.Scanner; 17 | import java.util.regex.Matcher; 18 | import java.util.regex.Pattern; 19 | 20 | public class MedusaUtil { 21 | public static Object[] getModules() throws IOException { 22 | Runtime r = Runtime.getRuntime(); 23 | Process proc = r.exec("medusa -d"); 24 | 25 | Scanner s = new Scanner(proc.getInputStream()); 26 | Pattern p = Pattern.compile("[+] (.*?).mod"); 27 | Matcher m; 28 | ArrayList mods = new ArrayList(); 29 | 30 | while(s.hasNextLine()) { 31 | m = p.matcher(s.nextLine()); 32 | if(m.find()) { 33 | mods.add(m.group(1)); 34 | } 35 | } 36 | 37 | return mods.toArray(); 38 | } 39 | } 40 | --------------------------------------------------------------------------------