struts2利用工具-源码分享-女黑客-必火安全学院

女黑客

 找回密码
 立即注册

QQ登录

只需一步,快速开始

struts2利用工具-源码分享

[复制链接]
发表于 2017-9-23 00:38:26 | 显示全部楼层 |阅读模式
哈哈,我还没写完,现在只是个样子,不过我会一直更新的。
B79E53F7-7DD5-4249-918B-3FFE8E17CDDD.png
  1. import java.awt.BorderLayout;
  2. import java.awt.EventQueue;

  3. import javax.swing.JFrame;
  4. import javax.swing.JPanel;
  5. import javax.swing.border.EmptyBorder;
  6. import javax.swing.JButton;
  7. import javax.swing.JLabel;
  8. import javax.swing.JTextField;
  9. import javax.swing.SwingConstants;
  10. import java.awt.FlowLayout;
  11. import java.awt.GridLayout;
  12. import java.awt.CardLayout;
  13. import javax.swing.JSplitPane;
  14. import javax.swing.JComboBox;
  15. import javax.swing.DefaultComboBoxModel;
  16. import javax.swing.JTabbedPane;
  17. import java.awt.event.KeyAdapter;
  18. import java.awt.event.KeyEvent;
  19. import java.io.BufferedReader;
  20. import java.io.IOException;
  21. import java.io.InputStream;
  22. import java.io.InputStreamReader;
  23. import java.net.MalformedURLException;
  24. import java.net.URL;
  25. import java.net.URLConnection;

  26. public class Strtus2 extends JFrame {

  27.         private JPanel contentPane;
  28.         private JTextField textField;
  29.     private JLabel label1,label2,label3;  
  30.     private JPanel panel1,panel2,panel3;

  31.         /**
  32.          * Launch the application.
  33.          */
  34.         public static void main(String[] args) {
  35.                 EventQueue.invokeLater(new Runnable() {
  36.                         public void run() {
  37.                                 try {
  38.                                         Strtus2 frame = new Strtus2();
  39.                                         frame.setVisible(true);
  40.                                 } catch (Exception e) {
  41.                                         e.printStackTrace();
  42.                                 }
  43.                         }
  44.                 });
  45.         }

  46.         /**
  47.          * Create the frame.
  48.          */
  49.         public Strtus2() {
  50.                 setTitle("Struts测试工具 - By : www.xss.tv");
  51.                 setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  52.                 setBounds(100, 100, 530, 302);
  53.                 contentPane = new JPanel();
  54.                 contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
  55.                 setContentPane(contentPane);
  56.                 contentPane.setLayout(new CardLayout(0, 0));
  57.                
  58.                 JSplitPane splitPane = new JSplitPane();
  59.                 splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
  60.                 contentPane.add(splitPane, "name_7412453971397");
  61.                
  62.                 JPanel panel_one = new JPanel();
  63.                 splitPane.setLeftComponent(panel_one);
  64.                 panel_one.setLayout(new GridLayout(0, 2, -300, 0));
  65.                
  66.                 JLabel lblNewLabel = new JLabel("目标网址:");
  67.                 panel_one.add(lblNewLabel);
  68.                
  69.                 textField = new JTextField();
  70.                 textField.addKeyListener(new KeyAdapter() {
  71.                         @Override
  72.                         public void keyPressed(KeyEvent e) {
  73.                                 int k = e.getKeyCode();
  74.                                 if(k == e.VK_ENTER){
  75. //                                        textField.setText("我是回车");
  76.                                         new ReadByGet(textField.getText()).start();
  77.                                 }
  78.                         }
  79.                 });
  80.                
  81.                
  82.                 textField.setText("http://xss.tv/1");
  83.                 panel_one.add(textField);
  84.                 textField.setColumns(10);
  85.                
  86.                 JPanel panel_two = new JPanel();
  87.                 splitPane.setRightComponent(panel_two);
  88.                 panel_two.setLayout(new BorderLayout(0, 0));
  89.                
  90.                 JSplitPane splitPane_1 = new JSplitPane();
  91.                 splitPane_1.setContinuousLayout(true);
  92.                 splitPane_1.setOrientation(JSplitPane.VERTICAL_SPLIT);
  93.                 panel_two.add(splitPane_1);
  94.                
  95.                 JPanel panel_1 = new JPanel();
  96.                 splitPane_1.setLeftComponent(panel_1);
  97.                
  98.                 JLabel lblNewLabel_1 = new JLabel("字符集");
  99.                 panel_1.add(lblNewLabel_1);
  100.                
  101.                 JComboBox comboBox_2 = new JComboBox();
  102.                 panel_1.add(comboBox_2);
  103.                 comboBox_2.setModel(new DefaultComboBoxModel(new String[] {"GBK", "UTF-8", "GB2312"}));
  104.                
  105.                 JLabel lblNewLabel_2 = new JLabel("提交方式");
  106.                 panel_1.add(lblNewLabel_2);
  107.                
  108.                 JComboBox comboBox = new JComboBox();
  109.                 panel_1.add(comboBox);
  110.                 comboBox.setModel(new DefaultComboBoxModel(new String[] {"GET", "POST", "UPLOAD"}));
  111.                
  112.                 JLabel lblNewLabel_3 = new JLabel("漏洞编号");
  113.                 panel_1.add(lblNewLabel_3);
  114.                
  115.                 JComboBox comboBox_1 = new JComboBox();
  116.                 panel_1.add(comboBox_1);
  117.                 comboBox_1.setModel(new DefaultComboBoxModel(new String[] {"strtus-053"}));
  118.                
  119.                
  120.         
  121.         JPanel panel_2 = new JPanel();
  122.         splitPane_1.setRightComponent(panel_2);
  123.         panel_2.setLayout(new BorderLayout(0, 0));
  124.         
  125.         JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
  126.         panel_2.add(tabbedPane);
  127.         
  128.                
  129.                 //创建标签  
  130.         label1=new JLabel("第一个标签的面板",SwingConstants.CENTER);  
  131.         label2=new JLabel("第二个标签的面板",SwingConstants.CENTER);  
  132.         label3=new JLabel("第三个标签的面板",SwingConstants.CENTER);  
  133.         //创建面板  
  134.         panel1=new JPanel();  
  135.         panel2=new JPanel();  
  136.         panel3=new JPanel();  
  137.   
  138.         panel1.add(label1);  
  139.         panel2.add(label2);  
  140.         panel3.add(label3);
  141.         
  142.       //将标签面板加入到选项卡面板对象上  
  143.         tabbedPane.addTab("服务器信息",null,panel1,"First panel");  
  144.         tabbedPane.addTab("命令执行",null,panel2,"Second panel");  
  145.         tabbedPane.addTab("反弹shell",null,panel3,"Third panel");  
  146.                
  147.         }

  148. }
  149. class ReadByGet extends Thread{
  150.         String str;
  151.         ReadByGet(String str){
  152.                 this.str = str;
  153.         }
  154.         public void run(){
  155.                 try {
  156.                         URL url = new URL(str);
  157.                         URLConnection connection = url.openConnection();
  158.                         InputStream is = connection.getInputStream();
  159.                         InputStreamReader isr = new InputStreamReader(is);
  160.                         BufferedReader br = new BufferedReader(isr);
  161.                        
  162.                         String line;
  163.                         StringBuilder builder = new StringBuilder();
  164.                        
  165.                         while((line = br.readLine()) != null){
  166.                                 builder.append(line);
  167.                         }
  168.                         br.close();
  169.                         isr.close();
  170.                         is.close();
  171.                        
  172.                         System.out.println(builder.toString());
  173.                 } catch (MalformedURLException e) {
  174.                         e.printStackTrace();
  175.                 }catch (IOException e){
  176.                         e.printStackTrace();
  177.                 }
  178.                
  179.                
  180.         }
  181. }
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|小黑屋|女黑客 |网站地图

© Copyright 2021 版权所有(一极教育科技有限公司)

津ICP备17008032号-3
快速回复 返回顶部 返回列表