Merge branch 'master' of github.com:rapid7/metasploit-framework

This commit is contained in:
HD Moore 2011-11-11 16:20:27 -06:00
commit 2ec21858c6
38 changed files with 573 additions and 259 deletions

29
HACKING
View File

@ -110,29 +110,18 @@ Non-scanner aux modules use run().
Submitting Your Code
====================
When you've finished fixing a bug, adding a feature, or creating a
new module, build a patch by using the following command from the
base installation directory:
The process for submitting new modules via GitHub is documented here:
svn diff > something-descriptive.patch
https://github.com/rapid7/metasploit-framework/wiki/Working-with-the-Framework-Repo
Make sure you add any new files with 'svn add filename' first. If
you have just a single new file (such as when creating a new module)
feel free to just send that file. Once you've created the patch,
there are a couple ways to submit it. The first is to add it as an
attachment to a ticket in our Redmine tracker
(http://dev.metasploit.com/redmine/projects/framework); you can
create a ticket if one does not exist. Alternatively, you can
email it framework@metasploit.com, which is the main mailing list
for framework users, or msfdev@metasploit.com which only goes to
developers.
The SVN keywords for Id and Revision should remain blank, as the SVN
checkin will handle those substitutions automatically. The Author
field is not automatic, and should be filled in in the format of
'Yourname <user[at]domain.tld>' so future developers can contact
you with any questions.
This describes the process of forking, editing, and generating a
pull request, and is the preferred method for bringing new modules
and framework enhancements to the attention of the core Metasploit
development team. Note that this process requires a GitHub account.
For modules, note that Author field is not automatic, and should be
filled in in the format of 'Your Name <user[at]domain.tld>' so future
developers can contact you with any questions.
Licensing
=========

Binary file not shown.

View File

@ -56,79 +56,76 @@
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="1" attributes="0">
<Component id="descriptionBox" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="generateButton" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="displayButton" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="saveButton" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="handleButton" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="handleConsoleButton" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="-2" pref="500" max="-2" attributes="0"/>
<Component id="descriptionBox" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="1394" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="outputScrollPane" min="-2" pref="691" max="-2" attributes="0"/>
<EmptySpace pref="26" max="-2" attributes="0"/>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="1" attributes="0">
<Component id="outputPathLabel" min="-2" max="-2" attributes="1"/>
<Component id="encoderLabel" min="-2" max="-2" attributes="1"/>
<Component id="outputLabel" min="-2" max="-2" attributes="1"/>
<Component id="timesLabel" min="-2" max="-2" attributes="1"/>
<Component id="addCodeLabel" alignment="1" min="-2" max="-2" attributes="1"/>
<Component id="badcharsLabel" alignment="1" min="-2" max="-2" attributes="1"/>
<Component id="archLabel" alignment="1" min="-2" max="-2" attributes="1"/>
<Component id="templateLabel" alignment="1" min="-2" max="-2" attributes="1"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Group type="102" alignment="1" attributes="0">
<Component id="outputPathField" pref="453" max="32767" attributes="1"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="choosePathButton" min="-2" pref="91" max="-2" attributes="0"/>
</Group>
<Component id="archField" alignment="0" pref="550" max="32767" attributes="1"/>
<Component id="badcharsField" alignment="0" pref="550" max="32767" attributes="1"/>
<Component id="timesField" alignment="0" pref="550" max="32767" attributes="1"/>
<Component id="outputCombo" alignment="0" pref="550" max="32767" attributes="1"/>
<Component id="encoderCombo" alignment="0" min="-2" pref="540" max="-2" attributes="1"/>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="103" alignment="0" groupAlignment="0" max="-2" attributes="0">
<Component id="encoderLabel" alignment="0" max="32767" attributes="1"/>
<Component id="outputLabel" alignment="0" max="32767" attributes="1"/>
<Component id="timesLabel" alignment="0" max="32767" attributes="1"/>
<Component id="outputPathLabel" alignment="0" min="-2" max="-2" attributes="1"/>
<Component id="addCodeLabel" alignment="0" max="32767" attributes="1"/>
</Group>
<Component id="templateLabel" min="-2" max="-2" attributes="1"/>
<Component id="archLabel" min="-2" pref="177" max="-2" attributes="1"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="addCodeField" max="32767" attributes="1"/>
<Component id="templateField" alignment="0" pref="447" max="32767" attributes="1"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Component id="archField" alignment="0" pref="310" max="32767" attributes="1"/>
<Component id="timesField" alignment="0" pref="310" max="32767" attributes="1"/>
<Component id="outputCombo" alignment="0" pref="310" max="32767" attributes="1"/>
<Component id="encoderCombo" alignment="0" pref="310" max="32767" attributes="1"/>
<Group type="102" alignment="0" attributes="0">
<Component id="outputPathField" min="-2" pref="213" max="-2" attributes="1"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="choosePathButton" min="-2" pref="91" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<Group type="103" groupAlignment="1" attributes="0">
<Component id="addCodeField" alignment="0" pref="217" max="32767" attributes="0"/>
<Component id="templateField" alignment="1" pref="217" max="32767" attributes="1"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="addCodeButton" max="32767" attributes="1"/>
<Component id="templateButton" alignment="0" pref="87" max="32767" attributes="1"/>
</Group>
</Group>
<Component id="addCodeButton" pref="97" max="32767" attributes="1"/>
<Component id="templateButton" alignment="0" pref="97" max="32767" attributes="1"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="templateWorkingCheck" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="-2" pref="349" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="templateWorkingCheck" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="115" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="generateButton" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="displayButton" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="saveButton" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="handleButton" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="handleConsoleButton" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="121" max="-2" attributes="0"/>
</Group>
<Component id="outputScrollPane" alignment="0" min="-2" pref="691" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="795" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="54" max="-2" attributes="0"/>
<Group type="102" alignment="1" attributes="0">
<EmptySpace min="-2" pref="119" max="-2" attributes="0"/>
<Component id="descriptionBox" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="78" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="generateButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="displayButton" alignment="3" min="-2" max="-2" attributes="0"/>
@ -137,47 +134,52 @@
<Component id="handleConsoleButton" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="outputScrollPane" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="outputScrollPane" pref="12" max="32767" attributes="0"/>
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="outputPathLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="outputPathField" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="outputPathLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="choosePathButton" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="encoderLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="encoderCombo" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="encoderLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="outputLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="outputCombo" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="outputLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="timesLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="timesField" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="timesLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="badcharsField" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="badcharsLabel" alignment="3" min="-2" pref="23" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="archLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="archField" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="archLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="templateLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="templateField" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="templateLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="templateButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="templateWorkingCheck" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="addCodeLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="addCodeField" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="addCodeLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="addCodeButton" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@ -407,6 +409,17 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="addCodeButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="badcharsLabel">
<Properties>
<Property name="text" type="java.lang.String" resourceKey="badcharsLabel.text"/>
<Property name="name" type="java.lang.String" value="badcharsLabel" noResource="true"/>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="badcharsField">
<Properties>
<Property name="name" type="java.lang.String" value="badcharsField" noResource="true"/>
</Properties>
</Component>
</SubComponents>
</Container>
</SubComponents>

View File

@ -13,6 +13,7 @@ import javax.swing.GroupLayout;
import javax.swing.GroupLayout.ParallelGroup;
import javax.swing.GroupLayout.SequentialGroup;
import javax.swing.JFileChooser;
import javax.swing.LayoutStyle;
/**
* Popup for generating payloads and starting handlers.
@ -74,26 +75,28 @@ public class PayloadPopup extends ModuleInfoWindow {
templateWorkingCheck.setVisible(saving);
timesField.setVisible(saving);
timesLabel.setVisible(saving);
badcharsField.setVisible(saving);
badcharsLabel.setVisible(saving);
addCodeButton.setVisible(saving);
addCodeLabel.setVisible(saving);
addCodeField.setVisible(saving);
GroupLayout mainPanelLayout = (GroupLayout)mainPanel.getLayout();
//HORIZONTAL GROUPING
ParallelGroup labelGroup = mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING);
ParallelGroup labelGroup = mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING);
//make label group
for(int i = 0; i < optionalOpts.size(); i+= 2)
labelGroup = labelGroup.addComponent((Component)optionalOpts.get(i), javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE);
labelGroup = labelGroup.addComponent((Component)optionalOpts.get(i), GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE);
//make text box group
ParallelGroup textBoxGroup = mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING);
ParallelGroup textBoxGroup = mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING);
for(int i = 1; i < optionalOpts.size(); i+= 2)
textBoxGroup = textBoxGroup.addComponent((Component)optionalOpts.get(i));
//put it together
mainPanelLayout.setHorizontalGroup(
mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(mainPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(titleLabel)
.addComponent(descriptionBox)
.addComponent(authorsLabel)
@ -101,116 +104,122 @@ public class PayloadPopup extends ModuleInfoWindow {
.addComponent(versionLabel)
.addGroup(mainPanelLayout.createSequentialGroup()
.addGroup(labelGroup)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(textBoxGroup)
.addContainerGap())
.addGroup(mainPanelLayout.createSequentialGroup()
.addComponent(generateButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(displayButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(saveButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(handleButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(handleConsoleButton))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainPanelLayout.createSequentialGroup()
.addComponent(outputScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE)
.addGroup(GroupLayout.Alignment.TRAILING, mainPanelLayout.createSequentialGroup()
.addComponent(outputScrollPane, GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE)
.addContainerGap())
.addGroup(mainPanelLayout.createSequentialGroup()
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(encoderLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(outputLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(archLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(timesLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(outputPathLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(templateLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(addCodeLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(encoderCombo, 0, 188, Short.MAX_VALUE)
.addComponent(outputCombo, 0, 188, Short.MAX_VALUE)
.addComponent(archField, javax.swing.GroupLayout.DEFAULT_SIZE, 188, Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainPanelLayout.createSequentialGroup()
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(templateField, javax.swing.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE)
.addComponent(outputPathField, javax.swing.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE)
.addComponent(addCodeField, javax.swing.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)
.addComponent(encoderLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE)
.addComponent(outputLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE)
.addComponent(archLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE)
.addComponent(badcharsLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE)
.addComponent(timesLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE)
.addComponent(outputPathLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE)
.addComponent(templateLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE)
.addComponent(addCodeLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE))
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(encoderCombo, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(outputCombo, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(archField, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(badcharsField, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(GroupLayout.Alignment.TRAILING, mainPanelLayout.createSequentialGroup()
.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(templateField, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(outputPathField, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(addCodeField, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)
.addComponent(templateButton)
.addComponent(choosePathButton)
.addComponent(addCodeButton)))
.addComponent(timesField, javax.swing.GroupLayout.DEFAULT_SIZE, 188, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(timesField, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(templateWorkingCheck)))
.addContainerGap()));
//VERTICAL GROUPING
SequentialGroup groupie = mainPanelLayout.createSequentialGroup().
addComponent(titleLabel).
addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).
addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).
addComponent(descriptionBox).
addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).
addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).
addComponent(authorsLabel).
addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).
addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).
addComponent(licenseLabel).
addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).
addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).
addComponent(versionLabel);
for(int i = 0; i < optionalOpts.size(); i+=2){
groupie = groupie.addGroup(mainPanelLayout.createParallelGroup(
javax.swing.GroupLayout.Alignment.BASELINE)
GroupLayout.Alignment.BASELINE)
.addComponent((Component)optionalOpts.get(i)) //LABEL
.addComponent((Component)optionalOpts.get(i+1), //TEXT BOX
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED);
GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED);
}
groupie = groupie
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(generateButton)
.addComponent(displayButton)
.addComponent(saveButton)
.addComponent(handleButton)
.addComponent(handleConsoleButton))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(outputScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE);
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(outputScrollPane, GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE);
if(saving)
groupie = groupie.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
groupie = groupie.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(outputPathLabel)
.addComponent(outputPathField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(outputPathField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addComponent(choosePathButton))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(encoderLabel)
.addComponent(encoderCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(encoderCombo, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(outputLabel)
.addComponent(outputCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(outputCombo, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(timesLabel)
.addComponent(timesField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(timesField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(badcharsLabel)
.addComponent(badcharsField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(archLabel)
.addComponent(archField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(archField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(templateLabel)
.addComponent(templateField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(templateField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addComponent(templateButton)
.addComponent(templateWorkingCheck))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(addCodeLabel)
.addComponent(addCodeField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(addCodeField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addComponent(addCodeButton));
groupie = groupie.addContainerGap();
mainPanelLayout.setVerticalGroup(mainPanelLayout.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING).addGroup(groupie));
GroupLayout.Alignment.LEADING).addGroup(groupie));
}
/** Displays payload info and options. */
private void showOptions(String fullName) {
@ -257,6 +266,8 @@ public class PayloadPopup extends ModuleInfoWindow {
addCodeLabel = new javax.swing.JLabel();
addCodeField = new javax.swing.JTextField();
addCodeButton = new javax.swing.JButton();
badcharsLabel = new javax.swing.JLabel();
badcharsField = new javax.swing.JTextField();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setName("Form"); // NOI18N
@ -389,6 +400,11 @@ public class PayloadPopup extends ModuleInfoWindow {
}
});
badcharsLabel.setText(resourceMap.getString("badcharsLabel.text")); // NOI18N
badcharsLabel.setName("badcharsLabel"); // NOI18N
badcharsField.setName("badcharsField"); // NOI18N
javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);
mainPanel.setLayout(mainPanelLayout);
mainPanelLayout.setHorizontalGroup(
@ -397,62 +413,62 @@ public class PayloadPopup extends ModuleInfoWindow {
.addContainerGap()
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(mainPanelLayout.createSequentialGroup()
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(descriptionBox, javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, mainPanelLayout.createSequentialGroup()
.addComponent(generateButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(displayButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(saveButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(handleButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(handleConsoleButton)))
.addGap(500, 500, 500))
.addComponent(descriptionBox)
.addGap(1394, 1394, 1394))
.addGroup(mainPanelLayout.createSequentialGroup()
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(outputPathLabel)
.addComponent(encoderLabel)
.addComponent(outputLabel)
.addComponent(timesLabel)
.addComponent(addCodeLabel)
.addComponent(badcharsLabel)
.addComponent(archLabel)
.addComponent(templateLabel))
.addGap(18, 18, 18)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(mainPanelLayout.createSequentialGroup()
.addComponent(outputScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 691, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 26, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(mainPanelLayout.createSequentialGroup()
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(encoderLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(outputLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(timesLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(outputPathLabel)
.addComponent(addCodeLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addComponent(templateLabel)
.addComponent(archLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(outputPathField, javax.swing.GroupLayout.DEFAULT_SIZE, 453, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(choosePathButton, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(archField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 550, Short.MAX_VALUE)
.addComponent(badcharsField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 550, Short.MAX_VALUE)
.addComponent(timesField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 550, Short.MAX_VALUE)
.addComponent(outputCombo, javax.swing.GroupLayout.Alignment.LEADING, 0, 550, Short.MAX_VALUE)
.addComponent(encoderCombo, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 540, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, mainPanelLayout.createSequentialGroup()
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(addCodeField)
.addComponent(templateField, javax.swing.GroupLayout.DEFAULT_SIZE, 447, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(archField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 310, Short.MAX_VALUE)
.addComponent(timesField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 310, Short.MAX_VALUE)
.addComponent(outputCombo, javax.swing.GroupLayout.Alignment.LEADING, 0, 310, Short.MAX_VALUE)
.addComponent(encoderCombo, javax.swing.GroupLayout.Alignment.LEADING, 0, 310, Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, mainPanelLayout.createSequentialGroup()
.addComponent(outputPathField, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(choosePathButton, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(mainPanelLayout.createSequentialGroup()
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(addCodeField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 217, Short.MAX_VALUE)
.addComponent(templateField, javax.swing.GroupLayout.DEFAULT_SIZE, 217, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(addCodeButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(templateButton, javax.swing.GroupLayout.DEFAULT_SIZE, 87, Short.MAX_VALUE))))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(templateWorkingCheck)))
.addGap(349, 349, 349))))
.addComponent(addCodeButton, javax.swing.GroupLayout.DEFAULT_SIZE, 97, Short.MAX_VALUE)
.addComponent(templateButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 97, Short.MAX_VALUE))))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(templateWorkingCheck)
.addGap(115, 115, 115))))
.addGroup(mainPanelLayout.createSequentialGroup()
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(mainPanelLayout.createSequentialGroup()
.addComponent(generateButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(displayButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(saveButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(handleButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(handleConsoleButton)
.addGap(121, 121, 121))
.addComponent(outputScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 691, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(795, 795, 795))
);
mainPanelLayout.setVerticalGroup(
mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(mainPanelLayout.createSequentialGroup()
.addGap(54, 54, 54)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainPanelLayout.createSequentialGroup()
.addGap(119, 119, 119)
.addComponent(descriptionBox)
.addGap(78, 78, 78)
.addGap(18, 18, 18)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(generateButton)
.addComponent(displayButton)
@ -460,38 +476,42 @@ public class PayloadPopup extends ModuleInfoWindow {
.addComponent(handleButton)
.addComponent(handleConsoleButton))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(outputScrollPane)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(outputScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 12, Short.MAX_VALUE)
.addGap(6, 6, 6)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(outputPathLabel)
.addComponent(outputPathField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(outputPathLabel)
.addComponent(choosePathButton))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(encoderLabel)
.addComponent(encoderCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(encoderCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(encoderLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(outputLabel)
.addComponent(outputCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(outputCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(outputLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(timesLabel)
.addComponent(timesField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(timesField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(timesLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(archLabel)
.addComponent(archField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(badcharsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(badcharsLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(archField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(archLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(templateLabel)
.addComponent(templateField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(templateLabel)
.addComponent(templateButton)
.addComponent(templateWorkingCheck))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(addCodeLabel)
.addComponent(addCodeField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(addCodeLabel)
.addComponent(addCodeButton))
.addContainerGap())
);
@ -535,6 +555,13 @@ public class PayloadPopup extends ModuleInfoWindow {
hash.put("format", outputCombo.getSelectedItem().toString());
if(timesField.getText().length() > 0)
hash.put("ecount", timesField.getText());
if(badcharsField.getText().length() > 0){
StringBuffer badbinary = new StringBuffer();
for(String s : badcharsField.getText().split("\\\\x"))
if(s.length() > 0)
badbinary.append((char)Integer.parseInt(s, 16));
hash.put("badchars", badbinary.toString());
}
if(archField.getText().length() > 0)
hash.put("arch", archField.getText());
if(addCodeField.getText().length() > 0)
@ -625,6 +652,8 @@ public class PayloadPopup extends ModuleInfoWindow {
private javax.swing.JLabel addCodeLabel;
private javax.swing.JTextField archField;
private javax.swing.JLabel archLabel;
private javax.swing.JTextField badcharsField;
private javax.swing.JLabel badcharsLabel;
private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.JButton choosePathButton;
public javax.swing.JLabel descriptionBox;

View File

@ -22,3 +22,4 @@ descriptionBox.text=Description
addCodeLabel.text=(win32 only) add shellcode
addCodeButton.text=Choose...
addCodeField.text=
badcharsLabel.text=Badchars (\\xff\\x00)

View File

@ -18,7 +18,7 @@ module Buffer
#
# Serializes a buffer to a provided format. The formats supported are raw,
# ruby, perl, c, js_be, js_le and java
# ruby, perl, bash, c, js_be, js_le and java
#
def self.transform(buf, fmt = "ruby")
case fmt
@ -27,6 +27,8 @@ module Buffer
buf = Rex::Text.to_ruby(buf)
when 'perl', 'pl'
buf = Rex::Text.to_perl(buf)
when 'bash', 'sh'
buf = Rex::Text.to_bash(buf)
when 'c'
buf = Rex::Text.to_c(buf)
when 'js_be'
@ -44,7 +46,7 @@ module Buffer
#
# Creates a comment using the supplied format. The formats supported are
# raw, ruby, perl, js_be, js_le, c, and java.
# raw, ruby, perl, bash, js_be, js_le, c, and java.
#
def self.comment(buf, fmt = "ruby")
case fmt
@ -53,6 +55,8 @@ module Buffer
buf = Rex::Text.to_ruby_comment(buf)
when 'perl', 'pl'
buf = Rex::Text.to_perl_comment(buf)
when 'bash', 'sh'
buf = Rex::Text.to_bash_comment(buf)
when 'c'
buf = Rex::Text.to_c_comment(buf)
when 'js_be', 'js_le'
@ -70,7 +74,7 @@ module Buffer
# Returns the list of supported formats
#
def self.transform_formats
['raw','ruby','rb','perl','pl','c','js_be','js_le','java']
['raw','ruby','rb','perl','pl','bash','sh','c','js_be','js_le','java']
end
end

View File

@ -79,11 +79,14 @@ module Auxiliary::JohnTheRipper
@session_id ||= ::Rex::Text.rand_text_alphanumeric(8)
end
def john_pot_file
::File.join( ::Msf::Config.config_directory, "john.pot" )
end
def john_cracked_passwords
ret = {}
pot = ::File.join( ::File.dirname( john_binary_path ), "john.pot" )
return ret if not ::File.exist?(pot)
::File.open(pot, "rb") do |fd|
return ret if not ::File.exist?(john_pot_file)
::File.open(john_pot_file, "rb") do |fd|
fd.each_line do |line|
hash,clear = line.sub(/\r?\n$/, '').split(",", 2)
ret[hash] = clear
@ -94,7 +97,12 @@ module Auxiliary::JohnTheRipper
def john_show_passwords(hfile, format=nil)
res = {:cracked => 0, :uncracked => 0, :users => {} }
cmd = [ john_binary_path, "--show", "--conf=" + ::File.join(john_base_path, "confs", "john.conf"), hfile]
pot = john_pot_file
conf = ::File.join(john_base_path, "confs", "john.conf")
cmd = [ john_binary_path, "--show", "--conf=#{conf}", "--pot=#{pot}", hfile]
if format
cmd << "--format=" + format
end
@ -221,7 +229,9 @@ module Auxiliary::JohnTheRipper
res = {:cracked => 0, :uncracked => 0, :users => {} }
cmd = [ john_binary_path, "--session=" + john_session_id]
# Don't bother making a log file, we'd just have to rm it when we're
# done anyway.
cmd = [ john_binary_path, "--session=" + john_session_id, "--nolog"]
if opts[:conf]
cmd << ( "--conf=" + opts[:conf] )
@ -229,6 +239,12 @@ module Auxiliary::JohnTheRipper
cmd << ( "--conf=" + ::File.join(john_base_path, "confs", "john.conf") )
end
if opts[:pot]
cmd << ( "--pot=" + opts[:pot] )
else
cmd << ( "--pot=" + john_pot_file )
end
if opts[:format]
cmd << ( "--format=" + opts[:format] )
end
@ -261,11 +277,6 @@ module Auxiliary::JohnTheRipper
end
end
# Clean up temporary files created by --session
# XXX: Surely there is a better way to control
# the location of these.
::FileUtils.rm_f("#{john_session_id}.log")
res
end
end

View File

@ -2970,6 +2970,11 @@ class DBManager
cred_data[datum.gsub("-","_")] = nils_for_nulls(cred.elements[datum].text.to_s.strip)
end
}
%W{source-type source-id}.each { |datum|
if cred.elements[datum].respond_to? :text
cred_data[datum.gsub("-","_").intern] = nils_for_nulls(cred.elements[datum].text.to_s.strip)
end
}
if cred_data[:pass] == "<masked>"
cred_data[:pass] = ""
cred_data[:active] = false

View File

@ -94,6 +94,13 @@ module Text
return hexify(str, wrap, '"', '" .', "my $#{name} = \n", '";')
end
#
# Converts a raw string into a Bash buffer
#
def self.to_bash(str, wrap = DefaultWrap, name = "buf")
return hexify(str, wrap, '$\'', '\'\\', "export #{name}=\\\n", '\'')
end
#
# Converts a raw string into a java byte array
#
@ -124,6 +131,13 @@ module Text
return wordwrap(str, 0, wrap, '', '# ')
end
#
# Creates a Bash-style comment
#
def self.to_bash_comment(str, wrap = DefaultWrap)
return wordwrap(str, 0, wrap, '', '# ')
end
#
# Returns the raw string
#
@ -829,7 +843,7 @@ module Text
# Return stupid uses
return "" if length.to_i < 1
return sets[0][0] * length if sets.size == 1 and sets[0].size == 1
return sets[0][0].chr * length if sets.size == 1 and sets[0].size == 1
sets.length.times { offsets << 0 }

View File

@ -158,6 +158,7 @@ class Rex::Text::UnitTest < Test::Unit::TestCase
assert_equal("buf = \n\"\\x01\\x02\\xff\\x00\"\n", Rex::Text.to_ruby(str), 'to_ruby')
assert_equal("my $buf = \n\"\\x01\\x02\\xff\\x00\";\n", Rex::Text.to_perl(str), 'to_perl')
assert_equal("export buf=\\\n$'\\x01\\x02\\xff\\x00\'\n", Rex::Text.to_bash(str), 'to_bash')
assert_equal("unsigned char buf[] = \n\"\\x01\\x02\\xff\\x00\";\n", Rex::Text.to_c(str), 'to_c')
# 0 -> 20
@ -165,6 +166,7 @@ class Rex::Text::UnitTest < Test::Unit::TestCase
assert_equal("buf = \n\"\\x00\\x01\\x02\\x03\" +\n\"\\x04\\x05\\x06\\x07\" +\n\"\\x08\\x09\\x0a\\x0b\" +\n\"\\x0c\\x0d\\x0e\\x0f\" +\n\"\\x10\\x11\\x12\\x13\"\n", Rex::Text.to_ruby(str, 20), 'to_ruby with wrap')
assert_equal("my $buf = \n\"\\x00\\x01\\x02\\x03\" .\n\"\\x04\\x05\\x06\\x07\" .\n\"\\x08\\x09\\x0a\\x0b\" .\n\"\\x0c\\x0d\\x0e\\x0f\" .\n\"\\x10\\x11\\x12\\x13\";\n", Rex::Text.to_perl(str, 20), 'to_perl with wrap')
assert_equal("export buf=\\\n$'\\x00\\x01\\x02\\x03\'\\\n$'\\x04\\x05\\x06\\x07\'\\\n$'\\x08\\x09\\x0a\\x0b'\\\n$'\\x0c\\x0d\\x0e\\x0f'\\\n$'\\x10\\x11\\x12\\x13\'\n", Rex::Text.to_bash(str, 20), 'to_bash with wrap')
assert_equal("unsigned char buf[] = \n\"\\x00\\x01\\x02\\x03\\x04\"\n\"\\x05\\x06\\x07\\x08\\x09\"\n\"\\x0a\\x0b\\x0c\\x0d\\x0e\"\n\"\\x0f\\x10\\x11\\x12\\x13\";\n", Rex::Text.to_c(str, 20, "buf"), 'to_c with wrap')
assert_equal("\\x0a", Rex::Text.to_hex("\n"), 'to_hex newline')

View File

@ -158,7 +158,7 @@ class Metasploit3 < Msf::Auxiliary
:user => user,
:pass => pass,
:type => "password#{access == :read ? "_ro" : "" }",
:source_type => "user supplied",
:source_type => "user_supplied",
:active => true
)
end

View File

@ -81,7 +81,7 @@ class Metasploit3 < Msf::Auxiliary
:user => user,
:pass => pass,
:proof => "WEBAPP=\"Apache Axis\", VHOST=#{vhost}",
:source_type => "user supplied",
:source_type => "user_supplied",
:active => true
)

View File

@ -88,7 +88,7 @@ class Metasploit3 < Msf::Auxiliary
:user => user,
:pass => pass,
:proof => "WEBAPP=\"GlassFish\", VHOST=#{vhost}",
:source_type => "user supplied",
:source_type => "user_supplied",
:active => true
)
end
@ -155,7 +155,7 @@ class Metasploit3 < Msf::Auxiliary
:user => '',
:pass => '',
:proof => "WEBAPP=\"GlassFish\", VHOST=#{vhost}",
:source_type => "user supplied",
:source_type => "user_supplied",
:active => true
)
else

View File

@ -183,7 +183,7 @@ class Metasploit3 < Msf::Auxiliary
:user => user,
:pass => pass,
:proof => "WEBAPP=\"Generic\", PROOF=#{proof}",
:source_type => "user supplied",
:source_type => "user_supplied",
:active => true
)

View File

@ -0,0 +1,162 @@
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##
require 'msf/core'
class Metasploit3 < Msf::Auxiliary
include Msf::Auxiliary::Report
include Msf::Auxiliary::AuthBrute
include Msf::Exploit::Remote::HttpClient
def initialize
super(
'Name' => 'Outlook Web App (OWA) Brute Force Utility',
'Description' => %q{
This module tests credentials on OWA 2003, 2007 and 2010 servers.
},
'Author' =>
[
'Vitor Moreira',
'Spencer McIntyre',
'SecureState R&D Team'
],
'License' => MSF_LICENSE
)
register_options(
[
OptInt.new('RPORT', [ true, "The target port", 443]),
OptString.new('VERSION', [ true, "OWA VERSION (2003, 2007, or 2010)", '2007'])
], self.class)
register_advanced_options(
[
OptString.new('AD_DOMAIN', [ false, "Optional AD domain to prepend to usernames", '']),
OptBool.new('SSL', [ true, "Negotiate SSL for outgoing connections", true])
], self.class)
deregister_options('BLANK_PASSWORDS')
end
def run
datastore['BLANK_PASSWORDS'] = false # OWA doesn't support blank passwords
vhost = datastore['VHOST'] || datastore['RHOST']
if datastore['VERSION'] == '2003'
authPath = '/exchweb/bin/auth/owaauth.dll'
inboxPath = '/exchange/'
loginCheck = /Inbox/
elsif datastore['VERSION'] == '2007'
authPath = '/owa/auth/owaauth.dll'
inboxPath = '/owa/'
loginCheck = /addrbook.gif/
elsif datastore['VERSION'] == '2010'
authPath = '/owa/auth.owa' # Post creds here
inboxPath = '/owa/' # Get request with cookie/sessionid
loginCheck = /Inbox/ # check result
else
print_error('Invalid Version, Select 2003, 2007, or 2010')
return
end
print_status("Testing OWA: version #{datastore['VERSION']} against #{vhost}:#{datastore['RPORT'].to_s}")
begin
each_user_pass do |user, pass|
vprint_status("Trying #{user} : #{pass}")
try_user_pass(user, pass, authPath, inboxPath, loginCheck, vhost)
end
rescue ::Rex::ConnectionError, Errno::ECONNREFUSED
print_error('HTTP Connection Error, Aborting')
end
end
def try_user_pass(user, pass, authPath, inboxPath, loginCheck, vhost)
user = datastore['AD_DOMAIN'] + '\\' + user if datastore['AD_DOMAIN'] != ''
headers = {
'Cookie' => 'PBack=0'
}
if (datastore['SSL'].to_s.match(/^(t|y|1)/i))
data = 'destination=https://' << vhost << '&flags=0&trusted=0&username=' << user << '&password=' << pass
else
data = 'destination=http://' << vhost << '&flags=0&trusted=0&username=' << user << '&password=' << pass
end
begin
res = send_request_cgi({
'encode' => true,
'uri' => authPath,
'method' => 'POST',
'headers' => headers,
'data' => data
}, 20)
rescue ::Rex::ConnectionError, Errno::ECONNREFUSED, Errno::ETIMEDOUT
print_error('HTTP Connection Failed, Aborting')
return :abort
end
if not res
print_error('HTTP Connection Error, Aborting')
return :abort
end
if not res.headers['set-cookie']
print_error('Received Invalid Repsonse due to a missing cookie (Possibly Due To Invalid Version), Aborting')
return :abort
end
# these two lines are the authentication info
sessionid = 'sessionid=' << res.headers['set-cookie'].split('sessionid=')[1].split('; ')[0]
cadata = 'cadata=' << res.headers['set-cookie'].split('cadata=')[1].split('; ')[0]
headers['Cookie'] = 'PBack=0; ' << sessionid << '; ' << cadata
begin
res = send_request_cgi({
'uri' => inboxPath,
'method' => 'GET',
'headers' => headers
}, 20)
rescue ::Rex::ConnectionError, Errno::ECONNREFUSED, Errno::ETIMEDOUT
print_error('HTTP Connection Failed, Aborting')
return :abort
end
if not res
print_error('HTTP Connection Error, Aborting')
return :abort
end
if res.code == 302
vprint_error("FAILED LOGIN. #{user} : #{pass}")
return :skip_pass
end
if res.body =~ loginCheck
print_good("SUCCESSFUL LOGIN. '#{user}' : '#{pass}'")
report_hash = {
:host => datastore['RHOST'],
:port => datastore['RPORT'],
:sname => 'owa',
:user => user,
:pass => pass,
:active => true,
:type => 'password'}
report_auth_info(report_hash)
return :next_user
else
vprint_error("FAILED LOGIN. #{user} : #{pass}")
return :skip_pass
end
end
end

View File

@ -145,7 +145,7 @@ class Metasploit3 < Msf::Auxiliary
:user => user,
:pass => pass,
:proof => "WEBAPP=\"Tomcat Application Manager\"",
:source_type => "user supplied",
:source_type => "user_supplied",
:active => true
)

View File

@ -62,7 +62,7 @@ class Metasploit3 < Msf::Auxiliary
:user => user,
:pass => pass,
:proof => "WEBAPP=\"Lotus Domino\", VHOST=#{vhost}, COOKIE=#{res.headers['Set-Cookie']}",
:source_type => "user supplied",
:source_type => "user_supplied",
:active => true
)
return :next_user

View File

@ -64,7 +64,7 @@ class Metasploit3 < Msf::Auxiliary
:sname => 'mssql',
:user => user,
:pass => pass,
:source_type => "user supplied",
:source_type => "user_supplied",
:active => true
)
return :next_user

View File

@ -116,7 +116,7 @@ class Metasploit3 < Msf::Auxiliary
:sname => 'mysql',
:user => user,
:pass => pass,
:source_type => "user supplied",
:source_type => "user_supplied",
:active => true
)
return :next_user

View File

@ -236,7 +236,7 @@ class Metasploit3 < Msf::Auxiliary
def report_isqlauth_info(ip,user,pass,sid)
ora_info = {
:host => ip, :port => rport, :proto => "tcp",
:pass => pass, :source_type => "user supplied",
:pass => pass, :source_type => "user_supplied",
:active => true
}
if sid.nil? || sid.empty?

View File

@ -166,7 +166,7 @@ class Metasploit3 < Msf::Auxiliary
report_auth_info(
:host => addr, :port => port, :proto => "tcp",
:user => "#{sid}/#{user}", :pass => pass,
:source_type => "user supplied", :active => true
:source_type => "user_supplied", :active => true
)
elsif oline =~ /Account locked/
if not @oracle_reported
@ -179,7 +179,7 @@ class Metasploit3 < Msf::Auxiliary
report_auth_info(
:host => addr, :port => port, :proto => "tcp",
:user => "#{sid}/#{user}",
:source_type => "user supplied", :active => false
:source_type => "user_supplied", :active => false
)
elsif oline =~ /^\s+ERROR: (.*)/
print_error "#{msg} NSE script error: #{$1}"

View File

@ -117,7 +117,7 @@ class Metasploit3 < Msf::Auxiliary
:sname => 'pop3',
:user => user,
:pass => pass,
:source_type => "user supplied",
:source_type => "user_supplied",
:active => true
)
disconnect

View File

@ -127,7 +127,7 @@ class Metasploit3 < Msf::Auxiliary
:sname => "postgres",
:user => user,
:pass => pass,
:source_type => "user supplied",
:source_type => "user_supplied",
:active => true
}
result_hash[:user] = "#{db}/#{user}" if db_ok

View File

@ -175,7 +175,7 @@ class Metasploit3 < Msf::Auxiliary
:user => user,
:pass => pass,
:proof => proof,
:source_type => "user supplied",
:source_type => "user_supplied",
:active => true
)

View File

@ -313,7 +313,7 @@ class Metasploit3 < Msf::Auxiliary
:sname => 'login',
:user => user,
:proof => proof,
:source_type => "user supplied",
:source_type => "user_supplied",
:active => true
}

View File

@ -233,7 +233,7 @@ class Metasploit3 < Msf::Auxiliary
:user => user,
:luser => luser,
:proof => proof,
:source_type => "user supplied",
:source_type => "user_supplied",
:active => true
)

View File

@ -166,7 +166,7 @@ class Metasploit4 < Msf::Auxiliary
:port => rport,
:user => user,
:pass => pass,
:source_type => "user supplied",
:source_type => "user_supplied",
:target_host => rhost,
:target_port => rport
)

View File

@ -208,7 +208,7 @@ class Metasploit3 < Msf::Auxiliary
:port => datastore['RPORT'],
:sname => 'smb',
:pass => pass,
:source_type => "user supplied",
:source_type => "user_supplied",
:active => true
}
if accepts_bogus_domains? rhost

View File

@ -953,7 +953,7 @@ class Metasploit3 < Msf::Auxiliary
disconnect_snmp
rescue SNMP::RequestTimeout
print_status("#{ip}, SNMP request timeout.")
vprint_status("#{ip}, SNMP request timeout.")
rescue Errno::ECONNREFUSED
print_status("#{ip}, Connection refused.")
rescue SNMP::InvalidIpAddress

View File

@ -187,7 +187,7 @@ class Metasploit3 < Msf::Auxiliary
:pass => comm,
:duplicate_ok => true,
:active => true,
:source_type => "user supplied",
:source_type => "user_supplied",
:type => "password"
)
end
@ -202,7 +202,7 @@ class Metasploit3 < Msf::Auxiliary
:pass => comm,
:duplicate_ok => true,
:active => true,
:source_type => "user supplied",
:source_type => "user_supplied",
:type => "password_ro"
)
end

View File

@ -142,7 +142,7 @@ class Metasploit3 < Msf::Auxiliary
:user => user,
:pass => pass,
:proof => proof,
:source_type => "user supplied",
:source_type => "user_supplied",
:active => true
)
end

View File

@ -223,7 +223,7 @@ class Metasploit3 < Msf::Auxiliary
:user => user,
:pass => pass,
:proof => proof,
:source_type => "user supplied",
:source_type => "user_supplied",
:active => true
)
end

View File

@ -126,7 +126,7 @@ class Metasploit3 < Msf::Auxiliary
:pass => pass,
:type => access_type,
:duplicate_ok => true,
:source_type => "user supplied",
:source_type => "user_supplied",
:active => true
})
return :next_user

View File

@ -30,7 +30,7 @@ class Metasploit3 < Msf::Auxiliary
[
['URL', 'http://www.asterisk.org/astdocs/node201.html'], # Docs for AMI
],
'License' => MSF_LICENSE,
'License' => MSF_LICENSE
))
register_options(

View File

@ -36,7 +36,8 @@ class Metasploit3 < Msf::Exploit::Remote
'Version' => '$Revision$',
'References' =>
[
[ 'OSVDB', '66814'],
[ 'OSVDB', '66814' ],
[ 'BID', '42293' ],
[ 'URL', 'http://www.aushack.com/advisories/' ],
],
'Privileged' => true,

View File

@ -63,8 +63,12 @@ class Metasploit3 < Msf::Post
info = service_info(service)
paths << info['Command']
services << service
service_stop(service) # temporarily stop the service
print_status("Found #{info['Name']} installed")
begin
service_stop(service) # temporarily stop the service
print_status("Found #{info['Name']} installed")
rescue
print_error("We do not appear to have access to stop #{info['Name']}")
end
else
next
end

View File

@ -0,0 +1,79 @@
##
# ## This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##
require 'msf/core'
require 'msf/core/post/common'
require 'msf/core/post/windows/priv'
class Metasploit3 < Msf::Post
include Msf::Post::Common
include Msf::Post::Windows::Registry
include Msf::Auxiliary::Report
def initialize(info={})
super( update_info( info,
'Name' => 'Duqu Registry Check',
'Description' => %q{ This module searches for CVE-2011-3402 [Duqu] related registry artifacts.},
'License' => MSF_LICENSE,
'Author' => [ 'Marcus J. Carey <mjc[at]threatagent.com>'],
'Platform' => [ 'windows' ],
'SessionTypes' => [ 'meterpreter' ],
'References' =>
[
[ 'CVE', '2011-3402' ],
[ 'URL', 'http://r-7.co/w5h7fY' ]
]
))
end
def run
# Registry artifacts sourced from Symantec report
artifacts =
[
'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\"CFID"',
'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\CFID',
'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\JmiNET3',
'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\JmiNET3\FILTER'
]
match = 0
print_status("Searching registry on #{sysinfo['Computer']} for CVE-2011-3402 exploitation [Duqu] artifacts.")
begin
artifacts.each do |artifact|
(path, query) = parse_path(artifact)
has_key = registry_enumkeys(path)
has_val = registry_enumvals(path)
if has_key.include?(query) or has_val.include?(query)
print_good("#{sysinfo['Computer']}: #{path}\\#{query} found in registry.")
match += 1
report_vuln(
:host => target_host,
:name => self.fullname,
:info => "#{path}\\#{query} possible CVE-2011-3402 exploitation [Duqu] artifact.",
:refs => self.references,
:exploited_at => Time.now.utc
)
end
end
rescue # Probably should do something here...
end
print_status("#{sysinfo['Computer']}: #{match.to_s} artifact(s) found in registry.")
end
def parse_path(artifact)
parts = artifact.split("\\")
query = parts[-1]
parts.pop
path = parts.join("\\")
return path, query
end
end

View File

@ -379,12 +379,12 @@ if opts[:nopsled]
end
$stdout.binmode
if opts[:format] !~/ruby|rb|perl|pl|c|js|dll|elf/i
if opts[:format] !~/ruby|rb|perl|pl|bash|sh|c|js|dll|elf/i
exe = Msf::Util::EXE.to_executable_fmt($framework, opts[:arch], opts[:platform], payload_raw, opts[:format], exeopts)
end
case opts[:format]
when /ruby|rb|perl|pl|c|js_le|raw/i
when /ruby|rb|perl|pl|bash|sh|c|js_le|raw/i
$stdout.write Msf::Simple::Buffer.transform(payload_raw, opts[:format])
when /asp/
asp = Msf::Util::EXE.to_win32pe_asp($framework, payload_raw, exeopts)