From 90b86553c9dfe3825addd8373e1c31037913a618 Mon Sep 17 00:00:00 2001 From: gdgd009xcd Date: Wed, 17 Apr 2024 19:57:49 +0900 Subject: [PATCH] ## [v1.1.20] - 2024-04-17 ### Changed - maintenance: Removed unused classes (related to "Tamper" GUI) - bugfix: fixed bug in embeding tracking value to path Signed-off-by: gdgd009xcd --- addOns/automacrobuilder/CHANGELOG.md | 6 + .../automacrobuilder.gradle.kts | 2 +- .../extension/automacrobuilder/AppValue.java | 95 +++-- .../extension/automacrobuilder/ParmGen.java | 8 +- .../generated/ParmGenAddParms.java | 4 +- .../generated/ParmGenAttackListDialog.java | 367 ------------------ .../generated/ParmGenAutoTrack.java | 16 +- .../generated/ParmGenNew.java | 241 +----------- .../generated/ParmGenTamperOpt.form | 174 --------- .../generated/ParmGenTamperOpt.java | 184 --------- .../generated/SelectRequest.java | 1 + .../generated/TamperProxy.form | 306 --------------- .../generated/TamperProxy.java | 239 ------------ .../src/main/resources/burp/Bundle.properties | 7 - .../resources/burp/Bundle_ja_JP.properties | 7 - 15 files changed, 86 insertions(+), 1571 deletions(-) delete mode 100644 addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenAttackListDialog.java delete mode 100644 addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenTamperOpt.form delete mode 100644 addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenTamperOpt.java delete mode 100644 addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/TamperProxy.form delete mode 100644 addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/TamperProxy.java diff --git a/addOns/automacrobuilder/CHANGELOG.md b/addOns/automacrobuilder/CHANGELOG.md index 2696959..588b780 100644 --- a/addOns/automacrobuilder/CHANGELOG.md +++ b/addOns/automacrobuilder/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this add-on will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + +## [v1.1.20] - 2024-04-17 +### Changed +- maintenance: Removed unused classes (related to "Tamper" GUI) +- bugfix: fixed bug in embeding tracking value to path + ## [v1.1.19] - 2024-03-28 ### Changed - bugfix: Changed to correctly encode and decode the HttpRequest body based on Content-Encoding. diff --git a/addOns/automacrobuilder/automacrobuilder.gradle.kts b/addOns/automacrobuilder/automacrobuilder.gradle.kts index 6e5e077..b1a14e9 100644 --- a/addOns/automacrobuilder/automacrobuilder.gradle.kts +++ b/addOns/automacrobuilder/automacrobuilder.gradle.kts @@ -1,6 +1,6 @@ import org.zaproxy.gradle.addon.AddOnStatus -version = "1.1.19" +version = "1.1.20" description = "AutoMacroBuilder for ZAP" tasks.withType { diff --git a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/AppValue.java b/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/AppValue.java index b1c41e4..a1e0f0d 100644 --- a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/AppValue.java +++ b/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/AppValue.java @@ -35,8 +35,8 @@ public class AppValue { private static final ResourceBundle bundle = ResourceBundle.getBundle("burp/Bundle"); // valparttype, value, token, tamattack,tamadvance,tamposition,urlencode - // 置換位置,置換しない, value, Name, Attack, Advance, Position, URLencode - private String valpart; // 置換位置 + // target part, replace or not, value, Name, Attack, Advance, Position, URLencode + private String valpart; // target part of replacing in Http request private int valparttype; // 1-query, 2-body 3-header 4-path.... 16(10000) bit == no count // 32(100000) == no modify private String value = null; // Target Regex String to embed value in @@ -53,10 +53,9 @@ public class AppValue { private int resRegexPos = -1; // Tracking token position on page(start 0) private String token; // Tracking token name // - // 下記パラメータは、GUI操作時の一時保存値で、保存対象外。スキャン時は未使用。 - // This parameter does not use when scanning. only temporarily use for GUI manipulation + // This parameter does not use when scanning. only temporarily use for GUI manipulation, so it is not saved to file. private String resFetchedValue = - null; // レスポンスからフェッチしたtokenの値 Token obtained from response during tracking process + null; // Token extracted from response during tracking process private TokenTypeNames tokentype = TokenTypeNames.INPUT; @@ -89,7 +88,7 @@ public enum TokenTypeNames { private boolean urlencode; // Whether to encode URL private ResEncodeTypes resencodetype = - ResEncodeTypes.RAW; // 追跡元のエンコードタイプ Encode type of tracking param json/raw/urlencode + ResEncodeTypes.RAW; // Encode type of tracking source public enum ResEncodeTypes { RAW, @@ -97,13 +96,10 @@ public enum ResEncodeTypes { URLENCODE, } - private int fromStepNo = -1; // TRACK追跡元 <0 : 無条件で追跡 >=0: 指定StepNoのリクエスト追跡 - // Line number of response from which getting tracking parameter in RequestList sequence + private int fromStepNo = -1;// this is the position to extract the tracking parameter value // < 0: get tracking value from any response // >=0: get tracking value from specified request line number's response - private int toStepNo = EnvironmentVariables.TOSTEPANY; // TRACK:更新先 - //  >0:指定したStepNoのリクエスト更新 - // Line number of request to which setting tracking paramter in RequestList sequence + private int toStepNo = EnvironmentVariables.TOSTEPANY; // this is the position to embed the tracking parameter value // <0 : No Operation. // >=0 and < TOSTEPANY: set tracking value to specified line number's request // ==TOSTEPANY: set tracking value to any request. @@ -143,15 +139,6 @@ public enum ResEncodeTypes { public static final int I_REPLACE = 2; public static final int I_REGEX = 3; - private static String[] payloadpositionnames = { - // 診断パターン挿入位置 - // append 値末尾に追加 - // insert 値先頭に挿入 - // replace 値をパターンに置き換え - // regex 埋め込み箇所正規表現指定 - "append", "insert", "replace", "regex", null - }; - private boolean enabled = true; // enable/disable flag private void initctype() { @@ -387,13 +374,6 @@ public void setEnabled(boolean b) { enabled = b; } - public String getPayloadPositionName(int it) { - if (payloadpositionnames.length > it && it >= 0) { - return payloadpositionnames[it]; - } - return ""; - } - /** * Get ResEncodeTypes : response page content type JSON/RAW/URLENCODE.. * @@ -431,16 +411,7 @@ public ResEncodeTypes parseResEncodeTypeString(String t) { return ResEncodeTypes.RAW; } - public static String[] makePayloadPositionNames() { - return new String[] { - payloadpositionnames[I_APPEND], - payloadpositionnames[I_INSERT], - payloadpositionnames[I_REPLACE], - payloadpositionnames[I_REGEX] - }; - } - - // ParmGenNew 数値、追跡テーブル用 ターゲットリクエストパラメータタイプリスト + // Target Request Parameter Type List for tracking table public static String[] makeTargetRequestParamTypes() { return new String[] { ctypestr[V_PATH], ctypestr[V_QUERY], ctypestr[V_BODY], ctypestr[V_HEADER] @@ -725,7 +696,7 @@ public static int parseValPartType(String _valtype) { int _valparttype = 0; String[] ivals = _valtype.split(":"); String valtypewithflags = ivals[0]; - String _ctypestr = valtypewithflags.replaceAll("[^0-9a-zA-Z]", ""); // 英数字以外を除去 + String _ctypestr = valtypewithflags.replaceAll("[^0-9a-zA-Z]", ""); // exclude other than alphanum for (int i = 1; ctypestr[i] != null; i++) { if (_ctypestr.equalsIgnoreCase(ctypestr[i])) { _valparttype = i; @@ -795,23 +766,56 @@ String getVal() { return value; } - String[] replaceContents( + public String[] replacePathContents( + ParmGenMacroTrace pmt, + AppParmsIni pini, + String contents, + String org_contents_iso8859, + ParmGenHashMap errorhash + ){ + return replaceContents(pmt, pini, contents, org_contents_iso8859, errorhash, 1); + } + + public String[] replaceContents( + ParmGenMacroTrace pmt, + AppParmsIni pini, + String contents, + String org_contents_iso8859, + ParmGenHashMap errorhash + ){ + return replaceContents(pmt, pini, contents, org_contents_iso8859, errorhash, -1); + } + + /** + * replace target contents with value of org_contents_iso8859 + * + * @param pmt + * @param pini + * @param contents replace target + * @param org_contents_iso8859 the value of replacing + * @param errorhash buffer for collecting results or errors. + * @param foundCount matcher.find counter.
>0: replace until reaching this value.
==-1 : replace All. + * @return + */ + private String[] replaceContents( ParmGenMacroTrace pmt, - int currentStepNo, AppParmsIni pini, String contents, String org_contents_iso8859, - ParmGenHashMap errorhash) { + ParmGenHashMap errorhash, + int foundCount + ) { if (contents == null) return null; if (valueregex == null) return null; + int currentStepNo = pmt.getStepNo(); ParmGenTokenKey tk = null; if (toStepNo >= 0) { if (toStepNo != EnvironmentVariables.TOSTEPANY) { if (currentStepNo != toStepNo) { return null; // } - // tokentype 固定。tokentypeは追跡元のタイプなので、追跡先toStepNoの埋め込み先タイプとは無関係で無視する。 - // tk = new ParmGenTokenKey(AppValue.TokenTypeNames.DEFAULT, token, toStepNo); + // tokentype is static. tokentype is the type for tracking value source, it is no relation to toStepNo. + // toStepNo is the type for tracking value destination. tk = new ParmGenTokenKey( TokenTypeNames.DEFAULT, @@ -933,6 +937,11 @@ String[] replaceContents( o_tailcontents = org_contents_iso8859.substring(o_ept); } } + if (foundCount > 0) { + if (--foundCount <= 0) { + break; + } + } } newcontents = newcontents + tailcontents; if (newcontents.length() == 0) { diff --git a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/ParmGen.java b/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/ParmGen.java index e60c33c..692cd31 100644 --- a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/ParmGen.java +++ b/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/ParmGen.java @@ -84,7 +84,7 @@ PRequest ParseRequest( // switch(av.valparttype & AppValue.C_VTYPE){ case AppValue.V_PATH: // path // path = url - nvcont = av.replaceContents(pmt, pmt.getStepNo(), pini, path, orig_url, errorhash); + nvcont = av.replacePathContents(pmt, pini, path, orig_url, errorhash); if (nvcont != null) { String n_path = nvcont[0]; String o_path = nvcont[1]; @@ -109,7 +109,7 @@ PRequest ParseRequest( String query = url.substring(qpos + 1); nvcont = av.replaceContents( - pmt, pmt.getStepNo(), pini, query, orig_query, errorhash); + pmt, pini, query, orig_query, errorhash); if (nvcont != null) { String n_query = nvcont[0]; @@ -166,7 +166,7 @@ PRequest ParseRequest( } nvcont = av.replaceContents( - pmt, pmt.getStepNo(), pini, hval, orig_hval, errorhash); + pmt, pini, hval, orig_hval, errorhash); if (nvcont != null) { String n_hval = nvcont[0]; String o_hval = nvcont[1]; @@ -208,7 +208,6 @@ PRequest ParseRequest( nvcont = av.replaceContents( pmt, - pmt.getStepNo(), pini, content, org_content_iso8859, @@ -311,7 +310,6 @@ PRequest ParseRequest( nvcont = av.replaceContents( pmt, - pmt.getStepNo(), pini, partdatastr, org_content_iso8859, diff --git a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenAddParms.java b/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenAddParms.java index 9a7581c..7e2a7f5 100644 --- a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenAddParms.java +++ b/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenAddParms.java @@ -199,8 +199,8 @@ public void update(){ String namedecoded = name; try { namedecoded = URLDecoder.decode(name, selectedRequestEncode.getIANACharsetName()); - } catch (UnsupportedEncodingException ex) { - Logger.getLogger(ParmGenAddParms.class.getName()).log(Level.SEVERE, null, ex); + } catch (Exception ex) {// catch all Exceptions which contains null. + LOGGER4J.error(ex.getMessage(), ex); } if(names.contains(namedecoded)){// select list entry which value matched namedecoded lmodel.addSelectionInterval(j, j); diff --git a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenAttackListDialog.java b/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenAttackListDialog.java deleted file mode 100644 index 10ee0f9..0000000 --- a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenAttackListDialog.java +++ /dev/null @@ -1,367 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package org.zaproxy.zap.extension.automacrobuilder.generated; - -import java.io.File; -import java.io.FileNotFoundException; -import java.util.List; -import javax.swing.DefaultComboBoxModel; -import javax.swing.DefaultListModel; -import javax.swing.JFileChooser; -import javax.swing.JOptionPane; -import javax.swing.ListModel; -import org.zaproxy.zap.extension.automacrobuilder.ParmFileFilter; -import org.zaproxy.zap.extension.automacrobuilder.ParmGenReadFile; -import org.zaproxy.zap.extension.automacrobuilder.ParmGenWriteFile; -import org.zaproxy.zap.extension.automacrobuilder.EnvironmentVariables; - -/** - * - * @author gdgd009xcd - */ -@Deprecated -@SuppressWarnings("serial") -public class ParmGenAttackListDialog extends javax.swing.JDialog { - - private ParmGenNew parentwin; -// private java.awt.Frame parentwin; - private String defaultAtkListFileName = "AttackList.txt"; - private String currentAtkListFile ; - private DefaultListModel PatternModel; - - /** - * Creates new form ParmGenAttackListDialog - */ - public ParmGenAttackListDialog(ParmGenNew parent, boolean modal, String currentFile) { - super(parent, modal); - initComponents(); - //パターンリストのモデルをDefaultListModelに置き換える。 - ListModel m = PatternList.getModel(); - PatternModel = new DefaultListModel<>(); - for(int i = 0; i < m.getSize(); i++){ - String d = m.getElementAt(i); - PatternModel.addElement(d); - } - PatternList.setModel(PatternModel); - parentwin = parent; - if(currentFile != null && !currentFile.isEmpty()){ - currentAtkListFile = currentFile; - }else{ - currentAtkListFile = EnvironmentVariables.projectdir + "\\" + defaultAtkListFileName; - } - } - - /** - * This method is called from within the constructor to initialize the form. - * WARNING: Do NOT modify this code. The content of this method is always - * regenerated by the Form Editor. - */ - @SuppressWarnings({"unchecked","rawtypes","serial"}) - // //GEN-BEGIN:initComponents - private void initComponents() { - - jScrollPane1 = new javax.swing.JScrollPane(); - PatternList = new javax.swing.JList<>(); - AttackList = new javax.swing.JComboBox<>(); - jLabel1 = new javax.swing.JLabel(); - Load = new javax.swing.JButton(); - PatternEditor = new javax.swing.JTextField(); - jButton1 = new javax.swing.JButton(); - Delete = new javax.swing.JButton(); - Save = new javax.swing.JButton(); - jSeparator1 = new javax.swing.JSeparator(); - OK = new javax.swing.JButton(); - Cancel = new javax.swing.JButton(); - jLabel2 = new javax.swing.JLabel(); - StartAdvance = new javax.swing.JTextField(); - - setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); - - PatternList.setModel(new javax.swing.AbstractListModel() { - String[] strings = { "'", "%0a", "'||'", "'|'", "/**/", "/*/", "-0", "-", " and 1%3D1 ", " bnd 1%3D1 ", "%09and%091%3D1%09", "%09bnd%091%3D1%09", "; select pg_sleep(120); -- ", "'; select pg_sleep(120); -- ", " " }; - public int getSize() { return strings.length; } - public String getElementAt(int i) { return strings[i]; } - }); - PatternList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); - PatternList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { - public void valueChanged(javax.swing.event.ListSelectionEvent evt) { - PatternListValueChanged(evt); - } - }); - jScrollPane1.setViewportView(PatternList); - - AttackList.setEditable(true); - AttackList.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "C:\\Users\\xxxx\\Desktop\\ParmGenParms\\SQL Injection.txt", "C:\\Users\\xxxx\\Desktop\\ParmGenParms\\XSS.txt", "C:\\Users\\xxxxx\\Desktop\\ParmGenParms\\HTTP Response Divide.txt", "C:\\Users\\xxxxx\\Desktop\\ParmGenParms\\OS command injection.txt" })); - - jLabel1.setText("Attack Pattern List"); - - Load.setText("Load"); - Load.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - LoadActionPerformed(evt); - } - }); - - PatternEditor.setText("jTextField2"); - - jButton1.setText("Add/Updt"); - jButton1.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton1ActionPerformed(evt); - } - }); - - Delete.setText("Delete"); - Delete.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - DeleteActionPerformed(evt); - } - }); - - Save.setText("Save"); - Save.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - SaveActionPerformed(evt); - } - }); - - OK.setText("OK"); - OK.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - OKActionPerformed(evt); - } - }); - - Cancel.setText("Cancel"); - Cancel.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - CancelActionPerformed(evt); - } - }); - - jLabel2.setText("開始位置"); - - StartAdvance.setText("0"); - StartAdvance.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - StartAdvanceActionPerformed(evt); - } - }); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jSeparator1) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) - .addGroup(layout.createSequentialGroup() - .addComponent(OK) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(Cancel)) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(AttackList, javax.swing.GroupLayout.PREFERRED_SIZE, 388, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 388, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(layout.createSequentialGroup() - .addComponent(jButton1) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(PatternEditor))) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(Load, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(Save, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(Delete, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)))) - .addGroup(layout.createSequentialGroup() - .addComponent(jLabel2) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(StartAdvance, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGap(0, 0, Short.MAX_VALUE))) - .addContainerGap()) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addComponent(jLabel1) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jLabel2) - .addComponent(StartAdvance, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(15, 15, 15) - .addComponent(AttackList, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(layout.createSequentialGroup() - .addComponent(Load) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(Save) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(Delete))) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jButton1) - .addComponent(PatternEditor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(18, 18, 18) - .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(OK) - .addComponent(Cancel)) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - ); - - pack(); - }// //GEN-END:initComponents - - private void CancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CancelActionPerformed - // TODO add your handling code here: - dispose(); - }//GEN-LAST:event_CancelActionPerformed - - private void OKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_OKActionPerformed - // TODO add your handling code here: - DefaultComboBoxModel cmodel = (DefaultComboBoxModel)AttackList.getModel(); - String selectedPattern = (String)cmodel.getSelectedItem(); - parentwin.setPatternFileName(selectedPattern); - }//GEN-LAST:event_OKActionPerformed - - private void PatternListValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_PatternListValueChanged - // TODO add your handling code here: - String result = ""; - List alist = PatternList.getSelectedValuesList(); - //Object[] arr = PatternList.getSelectedValues(); // java v1.7 obsolete - //for(Object obj:arr){ - // result = (String)obj;//最後の選択 - //} - for(String data:alist){ - result = data;//最後の選択 - } - PatternEditor.setText(result); - }//GEN-LAST:event_PatternListValueChanged - - private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed - // TODO add your handling code here: - String pattern = PatternEditor.getText(); - int sidx = PatternList.getSelectedIndex(); - PatternModel.insertElementAt(pattern, sidx); - int maxidx = PatternModel.getSize(); - if(sidx+2 < maxidx){ - PatternModel.remove(sidx+1); - } - - }//GEN-LAST:event_jButton1ActionPerformed - - private void DeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_DeleteActionPerformed - // TODO add your handling code here: - int sidx = PatternList.getSelectedIndex(); - int maxidx = PatternModel.getSize(); - if(sidx>=0&& sidx+1 < maxidx){ - PatternModel.remove(sidx); - } - }//GEN-LAST:event_DeleteActionPerformed - - private void LoadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_LoadActionPerformed - // TODO add your handling code here: - File cfile = new File(currentAtkListFile); - String dirname = cfile.getParent(); - JFileChooser jfc = new JFileChooser(dirname); - jfc.setSelectedFile(cfile); - ParmFileFilter pFilter=new ParmFileFilter(); - jfc.setFileFilter(pFilter); - if(jfc.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { - //code to handle choosed file here. - File file = jfc.getSelectedFile(); - String name = file.getAbsolutePath().replaceAll("\\\\", "\\\\\\\\"); - currentAtkListFile = name; - AttackList.removeItem((Object)currentAtkListFile); - AttackList.addItem(currentAtkListFile); - //追加した項目を選択 - DefaultComboBoxModel cmodel = (DefaultComboBoxModel)AttackList.getModel(); - int lastidx = cmodel.getSize()-1; - if(lastidx>=0){ - Object sobj = cmodel.getElementAt(lastidx); - cmodel.setSelectedItem(sobj); - } - //ファイルをPatternListに設定 - try { - ParmGenReadFile rfile = new ParmGenReadFile(currentAtkListFile); - String rec; - PatternModel.clear(); - while((rec=rfile.read())!=null){ - PatternModel.addElement(rec); - } - PatternModel.addElement(" "); - rfile.close(); - } catch (FileNotFoundException ex) { - EnvironmentVariables.plog.printException(ex); - JOptionPane.showMessageDialog(this,"パターンファイル読み込みエラー\n"+ ex.toString() , "パターンファイルエラー", JOptionPane.ERROR_MESSAGE); - } - - - } - }//GEN-LAST:event_LoadActionPerformed - - private void SaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SaveActionPerformed - // TODO add your handling code here: - File cfile = new File(currentAtkListFile); - String dirname = cfile.getParent(); - JFileChooser jfc = new JFileChooser(dirname); - jfc.setSelectedFile(cfile); - ParmFileFilter pFilter=new ParmFileFilter(); - jfc.setFileFilter(pFilter); - if(jfc.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) { - //code to handle choosed file here. - File file = jfc.getSelectedFile(); - String name = file.getAbsolutePath().replaceAll("\\\\", "\\\\\\\\"); - currentAtkListFile = name; - try{ - ParmGenWriteFile wfile = new ParmGenWriteFile(currentAtkListFile); - Object o; - int imax = PatternModel.getSize(); - for(int i = 0; i< imax-1; i++){ - o = PatternModel.getElementAt(i); - wfile.print((String)o); - } - wfile.close(); - }catch(Exception ex){ - EnvironmentVariables.plog.printException(ex); - JOptionPane.showMessageDialog(this,"パターンファイル書き込みエラー\n"+ ex.toString() , "パターンファイルエラー", JOptionPane.ERROR_MESSAGE); - } - - } - }//GEN-LAST:event_SaveActionPerformed - - private void StartAdvanceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_StartAdvanceActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_StartAdvanceActionPerformed - - - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JComboBox AttackList; - private javax.swing.JButton Cancel; - private javax.swing.JButton Delete; - private javax.swing.JButton Load; - private javax.swing.JButton OK; - private javax.swing.JTextField PatternEditor; - private javax.swing.JList PatternList; - private javax.swing.JButton Save; - private javax.swing.JTextField StartAdvance; - private javax.swing.JButton jButton1; - private javax.swing.JLabel jLabel1; - private javax.swing.JLabel jLabel2; - private javax.swing.JScrollPane jScrollPane1; - private javax.swing.JSeparator jSeparator1; - // End of variables declaration//GEN-END:variables -} diff --git a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenAutoTrack.java b/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenAutoTrack.java index c16144f..38c89db 100644 --- a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenAutoTrack.java +++ b/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenAutoTrack.java @@ -29,7 +29,7 @@ public class ParmGenAutoTrack extends javax.swing.JFrame implements InterfaceReg * Creates new form ParmGenAutoTrack */ public ParmGenAutoTrack(ParmGenNew _pwin) { - parentwin = _pwin;//親ウィンドウ + parentwin = _pwin;//parent window // initComponents(); customInitComponents(); @@ -164,7 +164,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { private void NextBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_NextBtnActionPerformed // TODO add your handling code here: - //選択したパラメータをセッションに格納。 + //store selected parameters to session buffer. AppValue ap = new AppValue(); int[] rowsSelected = TokenTable.getSelectedRows(); DefaultTableModel model = (DefaultTableModel)TokenTable.getModel(); @@ -235,7 +235,7 @@ private void customInitComponents() { }, new String [] { - "種類", "tokentype", "出現順序", "name", "value" + "type", "tokentype", "order", "name", "value" } ) { boolean[] canEdit = new boolean [] { @@ -379,7 +379,7 @@ public void update() { EnvironmentVariables.session.put(ParmGenSession.K_FROMPOS, Integer.toString(mpos)); String body = rs.response.getBodyStringWithoutHeader(); AppValue ap = new AppValue(); - //Locationパラメータ取得 + // get Location header value ParmGenArrayList tklist = new ParmGenArrayList(); InterfaceCollection ic = rs.response.getLocationTokens(tklist); if(ic!=null){ @@ -392,7 +392,7 @@ public void update() { AppValue.TokenTypeNames _tktype = tkey.getTokenType(); int npos = 0; if(valueexistonly==true&&(value==null||value.isEmpty())){ - //value値の無いパラメータは対象外 + //exclude the parameter which doesn't have value }else{ model.addRow(new Object[]{ap.getValPart(AppValue.V_HEADER),_tktype.name() ,Integer.toString(npos), name, value}); } @@ -400,7 +400,7 @@ public void update() { } } - //responseパラメータ取得 + // get response parameters ParmGenParser pgser = new ParmGenParser(body); HashMap namepos = new HashMap(); ArrayList lst = pgser.getNameValues(); @@ -420,13 +420,13 @@ public void update() { AppValue.TokenTypeNames _tktype = tkey.getTokenType(); int npos = tkey.getFcnt(); if(valueexistonly==true&&(value==null||value.isEmpty())){ - //value値の無いパラメータは対象外 + // exclude the parameter which doesn't have value. }else{ model.addRow(new Object[]{ap.getValPart(AppValue.V_AUTOTRACKBODY),_tktype.name() ,Integer.toString(npos), name, value}); } } } - //requestパラメータ取得 + // get request parameters namepos.clear(); Iterator pit = rs.request.pathparams.iterator(); int ppos = 1; diff --git a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenNew.java b/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenNew.java index c6ea4d3..2d5358a 100644 --- a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenNew.java +++ b/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenNew.java @@ -36,8 +36,7 @@ public class ParmGenNew extends javax.swing.JFrame implements InterfaceRegex, in public final static int P_NUMBERMODEL = 0; final static int P_CSVMODEL = 1; final static int P_TRACKMODEL = 2; - final static int P_TAMPERMODEL = 3; - final static int P_RANDOMMODEL = 4;//NOP + final static int P_RANDOMMODEL = 3;//NOP // below P_XXX variables are tabIndex number of ResReqTabs. @@ -89,7 +88,6 @@ public ParmGenNew(CustomTrackingParamterConfigMain _parentwin, AppParmsIni _rec) ParamTableModels[P_NUMBERMODEL] = (DefaultTableModel)nParamTable.getModel(); ParamTableModels[P_CSVMODEL] = (DefaultTableModel)csvParamTable.getModel(); ParamTableModels[P_TRACKMODEL] = (DefaultTableModel)trackTable.getModel(); - ParamTableModels[P_TAMPERMODEL] = (DefaultTableModel)tamperTable.getModel(); addJComboBoxToJTable(); @@ -130,9 +128,6 @@ public void run() { case AppParmsIni.T_RANDOM: current_model = P_RANDOMMODEL; break; - case AppParmsIni.T_TAMPER: - current_model = P_TAMPERMODEL; - break; } current_model_selected = true; @@ -160,13 +155,13 @@ public void run() { } // after deternimed current_model_selected must run these functions. ModelTabs.setSelectedIndex(current_model); - ModelTabs.setEnabledAt(3, false); } public void setPatternFileName(String _name){ - AttackPatternFile.setText(_name); + } + public int getCurrentModel(){ return current_model; } @@ -204,13 +199,6 @@ private void setAppParmsIni(){ ParamTableModels[P_TRACKMODEL].addRow(row); } break; - case P_TAMPERMODEL: - tamperTargetURL.setText(rec.getUrl()); - rec.rewindAppValues(); - while((row=rec.getNextAppValuesRow())!=null){ - ParamTableModels[P_TAMPERMODEL].addRow(row); - } - break; default: break; } @@ -225,18 +213,13 @@ private void clearTable(DefaultTableModel model){ } } private void addJComboBoxToJTable(){ - //ComboBoxを設定 - AppValue ap = new AppValue();//static 初期化。 + //setup comboBox JComboBox cb = new JComboBox<>(AppValue.makeTargetRequestParamTypes()); - JComboBox tb = new JComboBox<>(AppValue.makePayloadPositionNames()); DefaultCellEditor dce = new DefaultCellEditor(cb); - DefaultCellEditor tbe = new DefaultCellEditor(tb); nParamTable. getColumnModel().getColumn(0).setCellEditor(dce); trackTable.getColumnModel().getColumn(0).setCellEditor(dce); - tamperTable.getColumnModel().getColumn(0).setCellEditor(dce); - tamperTable.getColumnModel().getColumn(6).setCellEditor(tbe); - //modelの初期化とクリア + //initialize models for(int i = 0; i < ParamTableModels.length; i++){ DefaultTableModel model = ParamTableModels[i]; if ( model!=null){ @@ -247,9 +230,6 @@ private void addJComboBoxToJTable(){ NumberInit.setText(""); NumberLen.setText(""); NumberRewind.setSelected(false); - - - } public String getRegex(){ @@ -275,8 +255,10 @@ public void addParamToSelectedModel(String reqplace, String name, int ni, String current_model_selected = true; addParam(current_model, reqplace, name, ni, value, target_req_isformdata, islastparam); } - /* - * 指定されたメッセージで、カレントのボタンのmessageAreaを更新 + + /** + * update current button's messageArea with specified message. + * @param panelno */ public void updateMessageAreaInSelectedModel(int panelno){ PRequestResponse rs = ParmGenGSONSaveV2.selected_messages.get(0); @@ -313,7 +295,7 @@ public void updateMessageAreaInSelectedModel(int panelno){ private void addParam(int m, String reqplace, String name, int ni, String value, boolean target_req_isformdata, boolean islastparam){ DefaultTableModel model = ParamTableModels[m]; - //name=valueにデフォルトの正規表現を生成してセット + // set default regex for "name=value" String nval = (name!=null?("(?:[&=?]|^)" + name + "="):"") + value; String _reqplace = reqplace; if ( reqplace.toLowerCase().equals("formdata")){ @@ -327,13 +309,7 @@ private void addParam(int m, String reqplace, String name, int ni, String value, String regex = "\"" + name + "\"(?:[\\t \\r\\n]*):(?:[\\t\\[\\r\\n ]*)\"(.+?)\"(?:[\\t \\]\\r\\n]*)(?:,|})"; List jsonmatchlist = ParmGenUtil.getRegexMatchGroups(regex, request.getBodyStringWithoutHeader()); boolean jsonmatched = false; - String jsonvalue = value; - /*for(String v: jsonmatchlist){ - if(jsonvalue.equals(v)){ - jsonmatched = true; - break; - } - }*/ + if(jsonmatchlist!=null&&jsonmatchlist.size()>0){ jsonmatched = true; } @@ -341,12 +317,7 @@ private void addParam(int m, String reqplace, String name, int ni, String value, if(!jsonmatched){// "key": value regex ="\"" + name + "\"(?:[\\t \\r\\n]*):(?:[\\t\\[\\r\\n ]*)([^,:{}\\\"]+?)(?:[\\t \\]\\r\\n]*)(?:,|})"; jsonmatchlist = ParmGenUtil.getRegexMatchGroups(regex, request.getBodyStringWithoutHeader()); - /*for(String v: jsonmatchlist){ - if(jsonvalue.equals(v)){ - jsonmatched = true; - break; - } - }*/ + if(jsonmatchlist!=null&&jsonmatchlist.size()>0){ jsonmatched = true; } @@ -358,10 +329,6 @@ private void addParam(int m, String reqplace, String name, int ni, String value, boolean urlencode = false; AppValue ap = new AppValue(); - String payloadposition = EnvironmentVariables.session.get(ParmGenSession.K_PAYLOADPOSITION); - if(payloadposition==null){ - payloadposition = ap.getPayloadPositionName(AppValue.I_APPEND); - } String tkname = ""; String responseURLregex = EnvironmentVariables.session.get(ParmGenSession.K_RESPONSEURLREGEX); String frompos = TrackFrom.getText(); @@ -492,8 +459,6 @@ public String getTargetURL(){ return trackTargetURL.getText(); case P_RANDOMMODEL: break; - case P_TAMPERMODEL: - return tamperTargetURL.getText(); default: break; } @@ -513,9 +478,6 @@ private JTable getCurrentTable(){ current_table = trackTable; case P_RANDOMMODEL: break; - case P_TAMPERMODEL: - current_table = tamperTable; - break; default: break; } @@ -639,18 +601,9 @@ private void initComponents() { trackTable = new javax.swing.JTable(); jLabel9 = new javax.swing.JLabel(); trackTargetURL = new javax.swing.JTextField(); - SeqRandom = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); - tamperTargetURL = new javax.swing.JTextField(); - jScrollPane5 = new javax.swing.JScrollPane(); - tamperTable = new javax.swing.JTable(); - addTamper = new javax.swing.JButton(); - upTamper = new javax.swing.JButton(); - delTamper = new javax.swing.JButton(); - downTamper = new javax.swing.JButton(); - modTamper = new javax.swing.JButton(); jLabel4 = new javax.swing.JLabel(); - AttackPatternFile = new javax.swing.JTextField(); + //AttackPatternFile = new javax.swing.JTextField(); jSeparator1 = new javax.swing.JSeparator(); SaveParm = new javax.swing.JButton(); CancelParm = new javax.swing.JButton(); @@ -1293,127 +1246,8 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jLabel1.setText(bundle.getString("ParmGenNew.TargetPathTitleLabel1.text")); // NOI18N - tamperTargetURL.setText("jTextField1"); - - tamperTable.setModel(new javax.swing.table.DefaultTableModel( - new Object [][] { - {"post", null, null, "param1", "SQL injection", null, "add", null}, - {"", null, null, null, null, null, null, null}, - {null, null, null, null, null, null, null, null}, - {null, null, null, null, null, null, null, null} - }, - new String [] { - "置換位置", "置換しない", "Value", "Name", "Attack", "Advance", "Position", "URLencode" - } - ) { - Class[] types = new Class [] { - java.lang.Object.class, java.lang.Boolean.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Integer.class, java.lang.Object.class, java.lang.Boolean.class - }; - - public Class getColumnClass(int columnIndex) { - return types [columnIndex]; - } - }); - tamperTable.getTableHeader().setReorderingAllowed(false); - jScrollPane5.setViewportView(tamperTable); - - addTamper.setText(bundle.getString("ParmGenNew.ParamAddBtn.text")); // NOI18N - addTamper.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - addTamperActionPerformed(evt); - } - }); - - upTamper.setText(bundle.getString("ParmGenNew.UpTamperBtn.text")); // NOI18N - upTamper.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - upTamperActionPerformed(evt); - } - }); - - delTamper.setText(bundle.getString("ParmGenNew.DeleteBtn.text")); // NOI18N - delTamper.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - delTamperActionPerformed(evt); - } - }); - - downTamper.setText(bundle.getString("ParmGenNew.DownTamperBtn.text")); // NOI18N - downTamper.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - downTamperActionPerformed(evt); - } - }); - - modTamper.setText(bundle.getString("ParmGenNew.ModTamperEditBtn.text")); // NOI18N - modTamper.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - modTamperActionPerformed(evt); - } - }); - jLabel4.setText(bundle.getString("ParmGenNew.PatternTitleLabel4.text")); // NOI18N - AttackPatternFile.setText("jTextField1"); - - javax.swing.GroupLayout SeqRandomLayout = new javax.swing.GroupLayout(SeqRandom); - SeqRandom.setLayout(SeqRandomLayout); - SeqRandomLayout.setHorizontalGroup( - SeqRandomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(SeqRandomLayout.createSequentialGroup() - .addContainerGap() - .addGroup(SeqRandomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(SeqRandomLayout.createSequentialGroup() - .addGroup(SeqRandomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jScrollPane5) - .addGroup(SeqRandomLayout.createSequentialGroup() - .addComponent(jLabel1) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(tamperTargetURL))) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(SeqRandomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(SeqRandomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(addTamper, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(upTamper, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(delTamper, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(downTamper, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(modTamper, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(58, 58, 58)) - .addGroup(SeqRandomLayout.createSequentialGroup() - .addComponent(jLabel4) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(AttackPatternFile) - .addGap(164, 164, 164)))) - ); - SeqRandomLayout.setVerticalGroup( - SeqRandomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(SeqRandomLayout.createSequentialGroup() - .addContainerGap() - .addGroup(SeqRandomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jLabel1) - .addComponent(tamperTargetURL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(SeqRandomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jLabel4) - .addComponent(AttackPatternFile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(SeqRandomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(SeqRandomLayout.createSequentialGroup() - .addComponent(addTamper) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(modTamper) - .addGap(15, 15, 15) - .addComponent(delTamper) - .addGap(11, 11, 11) - .addComponent(upTamper) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(downTamper)) - .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(99, 99, 99)) - ); - - ModelTabs.addTab("Tamper", SeqRandom); - SaveParm.setText(bundle.getString("ParmGenNew.SaveParmBtn.text")); // NOI18N SaveParm.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -1765,33 +1599,18 @@ private void SaveParmActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS String _token = (String)model.getValueAt(i, 7); boolean _trackreq = Boolean.parseBoolean(model.getValueAt(i, 8).toString()); int fromStepNo = -1; - /*** - try{ - fromStepNo = (int)model.getValueAt(i, 9); - }catch(Exception e){ - // - fromStepNo = -1; - }****/ try{ fromStepNo = Integer.parseInt((String)model.getValueAt(i, 9)); }catch(NumberFormatException e){ fromStepNo = -1; } int toStepNo = EnvironmentVariables.TOSTEPANY; - /*** - try{ - toStepNo = (int)model.getValueAt(i, 10); - }catch(Exception e){ - // - toStepNo = 0; - }***/ try{ toStepNo = Integer.parseInt((String)model.getValueAt(i, 10)); }catch(NumberFormatException e){ toStepNo = EnvironmentVariables.TOSTEPANY; } if(toStepNo<0) toStepNo = EnvironmentVariables.TOSTEPANY; - int tktype; String tktypename = (String)model.getValueAt(i, 11); @@ -2112,30 +1931,6 @@ private void NumberLenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIR // TODO add your handling code here: }//GEN-LAST:event_NumberLenActionPerformed - private void addTamperActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addTamperActionPerformed - // TODO add your handling code here: - //Tamper追加 - //セッションクリア - EnvironmentVariables.session.clear(); - //new ParmGenAddParms(this, false).setVisible(true); - new ParmGenTamperOpt(this).setVisible(true); - }//GEN-LAST:event_addTamperActionPerformed - - private void upTamperActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_upTamperActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_upTamperActionPerformed - - private void delTamperActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_delTamperActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_delTamperActionPerformed - - private void downTamperActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_downTamperActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_downTamperActionPerformed - - private void modTamperActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_modTamperActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_modTamperActionPerformed private void NumberSelBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_NumberSelBtnActionPerformed // TODO add your handling code here: @@ -2223,7 +2018,6 @@ private void ParamRegexActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JTextField AddMsec; - private javax.swing.JTextField AttackPatternFile; private javax.swing.JTextField CSVSkipLine; private javax.swing.JCheckBox CSVrewind; private javax.swing.JButton CancelParm; @@ -2249,7 +2043,6 @@ private void ParamRegexActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI private javax.swing.JButton SaveParm; private javax.swing.JPanel SeqCSV; private javax.swing.JPanel SeqNumber; - private javax.swing.JPanel SeqRandom; private javax.swing.JPanel SeqResponse; private javax.swing.JTextField SetTo; private javax.swing.JLabel SetToLabel; @@ -2257,7 +2050,6 @@ private void ParamRegexActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI private javax.swing.JTextField SimpleDateFormatStr; private javax.swing.JTextField TrackFrom; private javax.swing.JLabel TrackFromLabel; - private javax.swing.JButton addTamper; private javax.swing.ButtonGroup buttonGroup1; private javax.swing.JTextField csvFilePath; private javax.swing.JButton csvParamAdd; @@ -2267,8 +2059,6 @@ private void ParamRegexActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI private javax.swing.JTable csvParamTable; private javax.swing.JButton csvParamUP; private javax.swing.JTextField csvTargetURL; - private javax.swing.JButton delTamper; - private javax.swing.JButton downTamper; private javax.swing.JButton jButton6; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; @@ -2283,10 +2073,8 @@ private void ParamRegexActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI private javax.swing.JScrollPane jScrollPane2; private javax.swing.JScrollPane jScrollPane3; private javax.swing.JScrollPane jScrollPane4; - private javax.swing.JScrollPane jScrollPane5; private javax.swing.JScrollPane jScrollPane6; private javax.swing.JSeparator jSeparator1; - private javax.swing.JButton modTamper; private javax.swing.JButton nParamAdd; private javax.swing.JButton nParamAdd4; private javax.swing.JButton nParamDOWN; @@ -2299,11 +2087,8 @@ private void ParamRegexActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI private javax.swing.JTextField numberTargetURL; private javax.swing.JTextField selected_requestURL; private javax.swing.JTextField selected_responseURL; - private javax.swing.JTable tamperTable; - private javax.swing.JTextField tamperTargetURL; private javax.swing.JTable trackTable; private javax.swing.JTextField trackTargetURL; - private javax.swing.JButton upTamper; // End of variables declaration//GEN-END:variables @Override diff --git a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenTamperOpt.form b/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenTamperOpt.form deleted file mode 100644 index 5372f66..0000000 --- a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenTamperOpt.form +++ /dev/null @@ -1,174 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenTamperOpt.java b/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenTamperOpt.java deleted file mode 100644 index 8259f48..0000000 --- a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/ParmGenTamperOpt.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package org.zaproxy.zap.extension.automacrobuilder.generated; - -import java.util.ResourceBundle; -import org.zaproxy.zap.extension.automacrobuilder.AppValue; -import org.zaproxy.zap.extension.automacrobuilder.ParmGenSession; -import org.zaproxy.zap.extension.automacrobuilder.EnvironmentVariables; -import org.zaproxy.zap.extension.automacrobuilder.interfaceParmGenWin; - - -/** - * - * @author gdgd009xcd - */ -@SuppressWarnings("serial") -public class ParmGenTamperOpt extends javax.swing.JDialog implements interfaceParmGenWin { - ParmGenNew parentwin; - private static final ResourceBundle bundle = ResourceBundle.getBundle("burp/Bundle"); - - /** - * Creates new form ParmGenTamperOpt - */ - public ParmGenTamperOpt(ParmGenNew _parentwin) { - super(_parentwin, true); - parentwin = _parentwin; - initComponents(); - } - - /** - * This method is called from within the constructor to initialize the form. - * WARNING: Do NOT modify this code. The content of this method is always - * regenerated by the Form Editor. - */ - @SuppressWarnings({"unchecked","rawtypes","serial"}) - // //GEN-BEGIN:initComponents - private void initComponents() { - - jLabel1 = new javax.swing.JLabel(); - PayloadPosition = new javax.swing.JComboBox<>(); - jLabel2 = new javax.swing.JLabel(); - TargetParam = new javax.swing.JComboBox<>(); - jSeparator1 = new javax.swing.JSeparator(); - OK = new javax.swing.JToggleButton(); - CANCEL = new javax.swing.JToggleButton(); - jLabel3 = new javax.swing.JLabel(); - - setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); - - jLabel1.setText(bundle.getString("ParmGenTamperOpt.jLabel1.text")); // NOI18N - - PayloadPosition.setModel(new javax.swing.DefaultComboBoxModel(AppValue.makePayloadPositionNames())); - PayloadPosition.setToolTipText(bundle.getString("ParmGenTamperOpt.PayloadPosition.toolTipText")); // NOI18N - PayloadPosition.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - PayloadPositionActionPerformed(evt); - } - }); - - jLabel2.setText(bundle.getString("ParmGenTamperOpt.jLabel2.text")); // NOI18N - - TargetParam.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "GET", "POST", "GET/POST", " " })); - - OK.setText(bundle.getString("ParmGenTamperOpt.OK.text")); // NOI18N - OK.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - OKActionPerformed(evt); - } - }); - - CANCEL.setText(bundle.getString("ParmGenTamperOpt.CANCEL.text")); // NOI18N - CANCEL.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - CANCELActionPerformed(evt); - } - }); - - jLabel3.setText(bundle.getString("ParmGenTamperOpt.jLabel3.text")); // NOI18N - jLabel3.setVerticalAlignment(javax.swing.SwingConstants.TOP); - jLabel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jSeparator1) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(PayloadPosition, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(layout.createSequentialGroup() - .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(TargetParam, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGap(0, 0, Short.MAX_VALUE)) - .addGroup(layout.createSequentialGroup() - .addGap(8, 8, 8) - .addComponent(OK, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(CANCEL) - .addGap(10, 10, 10)))) - .addGroup(layout.createSequentialGroup() - .addGap(20, 20, 20) - .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))) - .addContainerGap()) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 86, Short.MAX_VALUE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(TargetParam, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(PayloadPosition, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(18, 18, 18) - .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(OK) - .addComponent(CANCEL)) - .addGap(27, 27, 27)) - ); - - pack(); - }// //GEN-END:initComponents - - private void CANCELActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CANCELActionPerformed - // TODO add your handling code here: - dispose(); - }//GEN-LAST:event_CANCELActionPerformed - - private void OKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_OKActionPerformed - // TODO add your handling code here: - dispose(); - //TargetParam 診断対象パラメータ - EnvironmentVariables.session.put(ParmGenSession.K_TARGETPARAM, (String) TargetParam.getSelectedItem()); - //PayloadPosition パターン埋め込み位置 - EnvironmentVariables.session.put(ParmGenSession.K_PAYLOADPOSITION, (String) PayloadPosition.getSelectedItem()); - new ParmGenAddParms(parentwin, false).setVisible(true); - }//GEN-LAST:event_OKActionPerformed - - private void PayloadPositionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_PayloadPositionActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_PayloadPositionActionPerformed - - - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JToggleButton CANCEL; - private javax.swing.JToggleButton OK; - private javax.swing.JComboBox PayloadPosition; - private javax.swing.JComboBox TargetParam; - private javax.swing.JLabel jLabel1; - private javax.swing.JLabel jLabel2; - private javax.swing.JLabel jLabel3; - private javax.swing.JSeparator jSeparator1; - // End of variables declaration//GEN-END:variables - - @Override - public void updateMessageAreaInSelectedModel(int panel) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public void update() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } -} diff --git a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/SelectRequest.java b/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/SelectRequest.java index be64b6b..fcc6d33 100644 --- a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/SelectRequest.java +++ b/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/SelectRequest.java @@ -24,6 +24,7 @@ @SuppressWarnings("serial") public class SelectRequest extends javax.swing.JDialog { + private static org.apache.logging.log4j.Logger LOGGER4J = org.apache.logging.log4j.LogManager.getLogger(); private static final ResourceBundle bundle = ResourceBundle.getBundle("burp/Bundle"); DefaultTableModel model; diff --git a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/TamperProxy.form b/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/TamperProxy.form deleted file mode 100644 index e9e7e4e..0000000 --- a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/TamperProxy.form +++ /dev/null @@ -1,306 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - <Editor/> - <Renderer/> - </Column> - <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> - <Title/> - <Editor/> - <Renderer/> - </Column> - <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> - <Title/> - <Editor/> - <Renderer/> - </Column> - <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> - <Title/> - <Editor/> - <Renderer/> - </Column> - <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> - <Title/> - <Editor/> - <Renderer/> - </Column> - <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> - <Title/> - <Editor/> - <Renderer/> - </Column> - <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> - <Title/> - <Editor/> - <Renderer/> - </Column> - </TableColumnModel> - </Property> - <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> - <TableHeader reorderingAllowed="false" resizingAllowed="true"/> - </Property> - </Properties> - </Component> - </SubComponents> - </Container> - <Component class="javax.swing.JButton" name="jButton4"> - <Properties> - <Property name="text" type="java.lang.String" value="追加"/> - </Properties> - <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton4ActionPerformed"/> - </Events> - </Component> - <Component class="javax.swing.JButton" name="jButton5"> - <Properties> - <Property name="text" type="java.lang.String" value="削除"/> - </Properties> - <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton5ActionPerformed"/> - </Events> - </Component> - <Component class="javax.swing.JButton" name="jButton6"> - <Properties> - <Property name="text" type="java.lang.String" value="▼"/> - </Properties> - <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton6ActionPerformed"/> - </Events> - </Component> - <Component class="javax.swing.JButton" name="jButton7"> - <Properties> - <Property name="text" type="java.lang.String" value="▲"/> - </Properties> - <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton7ActionPerformed"/> - </Events> - </Component> - <Component class="javax.swing.JButton" name="Close"> - <Properties> - <Property name="text" type="java.lang.String" value="close"/> - </Properties> - <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="CloseActionPerformed"/> - </Events> - </Component> - </SubComponents> -</Form> diff --git a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/TamperProxy.java b/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/TamperProxy.java deleted file mode 100644 index c942bcd..0000000 --- a/addOns/automacrobuilder/src/main/java/org/zaproxy/zap/extension/automacrobuilder/generated/TamperProxy.java +++ /dev/null @@ -1,239 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package org.zaproxy.zap.extension.automacrobuilder.generated; - -/** - * - * @author gdgd009xcd - */ -@SuppressWarnings("serial") -public class TamperProxy extends javax.swing.JFrame { - - /** - * Creates new form TamperProxybug - */ - public TamperProxy() { - initComponents(); - } - - /** - * This method is called from within the constructor to initialize the form. - * WARNING: Do NOT modify this code. The content of this method is always - * regenerated by the Form Editor. - */ - @SuppressWarnings({"unchecked","rawtypes","serial"}) - // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents - private void initComponents() { - - jCheckBox1 = new javax.swing.JCheckBox(); - jLabel1 = new javax.swing.JLabel(); - jTabbedPane1 = new javax.swing.JTabbedPane(); - jScrollPane2 = new javax.swing.JScrollPane(); - jTextPane2 = new javax.swing.JTextPane(); - jScrollPane1 = new javax.swing.JScrollPane(); - jTextPane1 = new javax.swing.JTextPane(); - jSeparator1 = new javax.swing.JSeparator(); - jButton1 = new javax.swing.JButton(); - jButton2 = new javax.swing.JButton(); - jButton3 = new javax.swing.JButton(); - jScrollPane3 = new javax.swing.JScrollPane(); - jTable1 = new javax.swing.JTable(); - jButton4 = new javax.swing.JButton(); - jButton5 = new javax.swing.JButton(); - jButton6 = new javax.swing.JButton(); - jButton7 = new javax.swing.JButton(); - Close = new javax.swing.JButton(); - - setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - - jCheckBox1.setText("Intercept"); - - jLabel1.setText("Request"); - - jTextPane2.setText("POST /test.php HTTP/1.0\n.....\n\n\nparam1=01010001'||'&passwd=xxxxxxxxx"); - jScrollPane2.setViewportView(jTextPane2); - - jTabbedPane1.addTab("after", jScrollPane2); - - jTextPane1.setText("POST /test.php HTTP/1.0\n.....\n\n\nparam1=01010001§§&passwd=xxxxxxxxx"); - jScrollPane1.setViewportView(jTextPane1); - - jTabbedPane1.addTab("before", jScrollPane1); - - jButton1.setText("send"); - - jButton2.setText("save"); - - jButton3.setText("drop"); - - jTable1.setModel(new javax.swing.table.DefaultTableModel( - new Object [][] { - {null, "post", "param1", "SQL injection", "2/10", "add", null}, - {null, "", null, null, null, null, null}, - {null, null, null, null, null, null, null}, - {null, null, null, null, null, null, null} - }, - new String [] { - "URL", "Type", "Name", "Attack", "advance", "Position", "URLencode" - } - ) { - Class[] types = new Class [] { - java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Boolean.class - }; - - public Class getColumnClass(int columnIndex) { - return types [columnIndex]; - } - }); - jTable1.getTableHeader().setReorderingAllowed(false); - jScrollPane3.setViewportView(jTable1); - - jButton4.setText("追加"); - jButton4.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton4ActionPerformed(evt); - } - }); - - jButton5.setText("削除"); - jButton5.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton5ActionPerformed(evt); - } - }); - - jButton6.setText("▼"); - jButton6.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton6ActionPerformed(evt); - } - }); - - jButton7.setText("▲"); - jButton7.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton7ActionPerformed(evt); - } - }); - - Close.setText("close"); - Close.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - CloseActionPerformed(evt); - } - }); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jSeparator1) - .addComponent(jTabbedPane1) - .addGroup(layout.createSequentialGroup() - .addComponent(jScrollPane3) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jButton4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jButton5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jButton7, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jButton6, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGroup(layout.createSequentialGroup() - .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(396, 396, 396) - .addComponent(jCheckBox1) - .addGap(0, 42, Short.MAX_VALUE)) - .addGroup(layout.createSequentialGroup() - .addComponent(jButton1) - .addGap(76, 76, 76) - .addComponent(jButton3) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(jButton2) - .addGap(56, 56, 56) - .addComponent(Close))) - .addContainerGap()) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(11, 11, 11) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jCheckBox1) - .addComponent(jLabel1)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(jButton4) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(jButton5) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(jButton7) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(jButton6)) - .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 279, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(18, 18, 18) - .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jButton1) - .addComponent(jButton3) - .addComponent(jButton2) - .addComponent(Close)) - .addGap(25, 25, 25)) - ); - - pack(); - }// </editor-fold>//GEN-END:initComponents - - private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_jButton4ActionPerformed - - private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_jButton5ActionPerformed - - private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_jButton6ActionPerformed - - private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_jButton7ActionPerformed - - private void CloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CloseActionPerformed - // TODO add your handling code here: - dispose(); - }//GEN-LAST:event_CloseActionPerformed - - - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JButton Close; - private javax.swing.JButton jButton1; - private javax.swing.JButton jButton2; - private javax.swing.JButton jButton3; - private javax.swing.JButton jButton4; - private javax.swing.JButton jButton5; - private javax.swing.JButton jButton6; - private javax.swing.JButton jButton7; - private javax.swing.JCheckBox jCheckBox1; - private javax.swing.JLabel jLabel1; - private javax.swing.JScrollPane jScrollPane1; - private javax.swing.JScrollPane jScrollPane2; - private javax.swing.JScrollPane jScrollPane3; - private javax.swing.JSeparator jSeparator1; - private javax.swing.JTabbedPane jTabbedPane1; - private javax.swing.JTable jTable1; - private javax.swing.JTextPane jTextPane1; - private javax.swing.JTextPane jTextPane2; - // End of variables declaration//GEN-END:variables -} diff --git a/addOns/automacrobuilder/src/main/resources/burp/Bundle.properties b/addOns/automacrobuilder/src/main/resources/burp/Bundle.properties index 433ebe3..67e53a0 100644 --- a/addOns/automacrobuilder/src/main/resources/burp/Bundle.properties +++ b/addOns/automacrobuilder/src/main/resources/burp/Bundle.properties @@ -1,10 +1,3 @@ -ParmGenTamperOpt.PayloadPosition.toolTipText=<HTML>\n\u30D1\u30BF\u30FC\u30F3\u3092\u57CB\u3081\u8FBC\u3080\u4F4D\u7F6E\u3092\u6307\u5B9A<BR>\n\u8FFD\u52A0\uFF1A\u3000\u5024\u306E\u5F8C\u308D\u306B\u8A3A\u65AD\u30D1\u30BF\u30FC\u30F3'|'\u3092\u8FFD\u52A0\u3059\u308B\u3002\u4F8B\uFF1A\u3000name=value'|'<BR>\n\u7F6E\u63DB\uFF1A\u3000\u5024\u3092\u8A3A\u65AD\u30D1\u30BF\u30FC\u30F3'|'\u306B\u7F6E\u304D\u63DB\u3048\u308B\u3002\u3000\u3000\u3000\u4F8B\uFF1A name='|'<BR>\n\u633F\u5165\uFF1A \u5024\u306E\u524D\u306B\u8A3A\u65AD\u30D1\u30BF\u30FC\u30F3\u3092\u633F\u5165\u3059\u308B\u3002\u3000 \u4F8B\uFF1A\u3000name='|'value<BR>\n<HTML> -ParmGenTamperOpt.jLabel1.text=Position -ParmGenTamperOpt.jLabel3.text=<HTML>Select the items that you want to track.<BR>\n  GET(query)\u30D1\u30E9\u30E1\u30FC\u30BF\u3001POST\u30D1\u30E9\u30E1\u30FC\u30BF\u304A\u3088\u3073\u305D\u306E\u4E21\u65B9\u3092<BR>\n  \u8A3A\u65AD\u5BFE\u8C61\u3068\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u9078\u629E\u3057\u307E\u3059\u3002<BR>\n\u30D1\u30BF\u30FC\u30F3\u57CB\u3081\u8FBC\u307F\u4F4D\u7F6E<BR>\n  \u8A3A\u65AD\u5BFE\u8C61\u30D1\u30E9\u30E1\u30FC\u30BF\u306EValue\u5024\u3078<BR>\n  \u306E\u8A3A\u65AD\u30D1\u30BF\u30FC\u30F3\u306E\u57CB\u3081\u8FBC\u307F\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002 -ParmGenTamperOpt.CANCEL.text=CANCEL -ParmGenTamperOpt.OK.text=OK -ParmGenTamperOpt.jLabel2.text=Detect parameters - ParmGenAutoTrack.jLabel1.text=<HTML>Select the items that you want to track.<BR>\nCtrl+Right+Click:Multipre select items<BR>\nWhen you selected items that you wish to select, then click OK.<BR>\n<BR>\nWhen there is no items you wish to select, then click Regular Expression Button. ParmGenAutoTrack.valuefilter.text=Display params without theres is no value ParmGenAutoTrack.RegexBtn.text=Regular Expression diff --git a/addOns/automacrobuilder/src/main/resources/burp/Bundle_ja_JP.properties b/addOns/automacrobuilder/src/main/resources/burp/Bundle_ja_JP.properties index 84a505a..441ab62 100644 --- a/addOns/automacrobuilder/src/main/resources/burp/Bundle_ja_JP.properties +++ b/addOns/automacrobuilder/src/main/resources/burp/Bundle_ja_JP.properties @@ -1,10 +1,3 @@ -ParmGenTamperOpt.PayloadPosition.toolTipText=<HTML>\n\u30D1\u30BF\u30FC\u30F3\u3092\u57CB\u3081\u8FBC\u3080\u4F4D\u7F6E\u3092\u6307\u5B9A<BR>\n\u8FFD\u52A0\uFF1A\u3000\u5024\u306E\u5F8C\u308D\u306B\u8A3A\u65AD\u30D1\u30BF\u30FC\u30F3'|'\u3092\u8FFD\u52A0\u3059\u308B\u3002\u4F8B\uFF1A\u3000name=value'|'<BR>\n\u7F6E\u63DB\uFF1A\u3000\u5024\u3092\u8A3A\u65AD\u30D1\u30BF\u30FC\u30F3'|'\u306B\u7F6E\u304D\u63DB\u3048\u308B\u3002\u3000\u3000\u3000\u4F8B\uFF1A name='|'<BR>\n\u633F\u5165\uFF1A \u5024\u306E\u524D\u306B\u8A3A\u65AD\u30D1\u30BF\u30FC\u30F3\u3092\u633F\u5165\u3059\u308B\u3002\u3000 \u4F8B\uFF1A\u3000name='|'value<BR>\n<HTML> -ParmGenTamperOpt.jLabel1.text=\u30D1\u30BF\u30FC\u30F3\u57CB\u3081\u8FBC\u307F\u4F4D\u7F6E -ParmGenTamperOpt.jLabel3.text=<HTML> \u8A3A\u65AD\u5BFE\u8C61\u30D1\u30E9\u30E1\u30FC\u30BF<BR>\n  GET(query)\u30D1\u30E9\u30E1\u30FC\u30BF\u3001POST\u30D1\u30E9\u30E1\u30FC\u30BF\u304A\u3088\u3073\u305D\u306E\u4E21\u65B9\u3092<BR>\n  \u8A3A\u65AD\u5BFE\u8C61\u3068\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u9078\u629E\u3057\u307E\u3059\u3002<BR>\n\u30D1\u30BF\u30FC\u30F3\u57CB\u3081\u8FBC\u307F\u4F4D\u7F6E<BR>\n  \u8A3A\u65AD\u5BFE\u8C61\u30D1\u30E9\u30E1\u30FC\u30BF\u306EValue\u5024\u3078<BR>\n  \u306E\u8A3A\u65AD\u30D1\u30BF\u30FC\u30F3\u306E\u57CB\u3081\u8FBC\u307F\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002 -ParmGenTamperOpt.CANCEL.text=CANCEL -ParmGenTamperOpt.OK.text=OK -ParmGenTamperOpt.jLabel2.text=\u8A3A\u65AD\u5BFE\u8C61\u30D1\u30E9\u30E1\u30FC\u30BF - ParmGenAutoTrack.valuefilter.text=value\u5024\u6709\u306E\u307F ParmGenAutoTrack.RegexBtn.text=\u6B63\u898F\u8868\u73FE\u6307\u5B9A ParmGenAutoTrack.CancelBtn.text=\u30AD\u30E3\u30F3\u30BB\u30EB