From f9d4064063eeb3dffb8f1ef4bb3229eb83bce7f1 Mon Sep 17 00:00:00 2001 From: d3vilbug Date: Wed, 14 Apr 2021 21:32:25 +0500 Subject: [PATCH] SRePlay v1.0 --- .gitignore | 4 + README.md | 0 build.gradle | 20 +++ gradlew | 185 +++++++++++++++++++++ gradlew.bat | 89 +++++++++++ settings.gradle | 2 + src/main/java/burp/BurpExtender.java | 167 +++++++++++++++++++ src/main/java/burp/SRePlay.form | 213 ++++++++++++++++++++++++ src/main/java/burp/SRePlay.java | 231 +++++++++++++++++++++++++++ 9 files changed, 911 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 build.gradle create mode 100755 gradlew create mode 100644 gradlew.bat create mode 100644 settings.gradle create mode 100644 src/main/java/burp/BurpExtender.java create mode 100644 src/main/java/burp/SRePlay.form create mode 100644 src/main/java/burp/SRePlay.java diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eed5590 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.gradle/ +.idea/ +build/ +gradle/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..5f4f159 --- /dev/null +++ b/build.gradle @@ -0,0 +1,20 @@ +plugins { + id 'java' +} + +group 'com.bugzy.burp.SReplay' +version '1.0' + +repositories { + mavenCentral() +} + +dependencies { + implementation 'net.portswigger.burp.extender:burp-extender-api:2.1' +} + +jar { + from { + configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } + } +} \ No newline at end of file diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..4f906e0 --- /dev/null +++ b/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..ac1b06f --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..11044d4 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,2 @@ +rootProject.name = 'SRePlay' + diff --git a/src/main/java/burp/BurpExtender.java b/src/main/java/burp/BurpExtender.java new file mode 100644 index 0000000..17d8bed --- /dev/null +++ b/src/main/java/burp/BurpExtender.java @@ -0,0 +1,167 @@ +package burp; + +import java.awt.Component; +import java.io.PrintWriter; +import java.net.URL; +import java.util.List; + + +/** + * @author bugzy + */ +public class BurpExtender implements IBurpExtender, IHttpListener, ITab{ + + public String ExtensionName = "Strict Replay (SRePlay)"; + public String TabName = "SRePlay"; + public String myHeader = "SRePlay: Bypass"; + + + public IBurpExtenderCallbacks callbacks; + public IExtensionHelpers helpers; + public PrintWriter stdout; + public PrintWriter stderr; + + + public Boolean isDebug = false; + public Boolean _repeater = false; + public Boolean _intruder = false; + public Boolean _scanner = false; + + + public SRePlay _SRePlay; + public String _host; + public String _parameter; + public String _value; + + + @Override + public void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks) { + this.callbacks = callbacks; + this.helpers = callbacks.getHelpers(); + this.stdout = new PrintWriter(callbacks.getStdout(), true); + this.stderr = new PrintWriter(callbacks.getStderr(), true); + this.callbacks.setExtensionName(this.ExtensionName); + this._SRePlay = new SRePlay(this); + + this.callbacks.addSuiteTab(this); + this.stdout.println("SRePlay - Installed !!!"); + } + + private void print_output(String _src, String str){ + if(! isDebug){ return; } + this.stdout.println(_src + " :: " + str); + } + + private void print_error(String _src, String str){ + if(! isDebug){ return; } + this.stderr.println(_src + " :: " + str); + } + + + public void start_SRePlay(){ + this.callbacks.registerHttpListener(this); + } + + + public void stop_SRePlay(){ + this.callbacks.removeHttpListener(this); + } + + + public String get_host(String _url){ + try{ + URL abc = new URL(_url); + return abc.getHost().toString(); + }catch (Exception ex){ + print_error("get_host", _url); + return _url; + } + } + + + @Override + public String getTabCaption() { + return this.TabName; + } + + + @Override + public Component getUiComponent() { + return this._SRePlay; + } + + + private String update_req_json(byte[] _req, String _param, String _value){ + byte[] _tmp_req = _req; + + IRequestInfo reqInfo = helpers.analyzeRequest(_tmp_req); + String tmpreq = new String(_tmp_req); + String messageBody = new String(tmpreq.substring(reqInfo.getBodyOffset())).trim(); + + int _fi = messageBody.indexOf(_param); + if(_fi < 0) { return messageBody; } + + _fi = _fi + _param.length() + 3; + int _si = messageBody.indexOf("\",", _fi); + + + messageBody = messageBody.substring(0, _fi) + _value + messageBody.substring(_si, messageBody.length()); + return messageBody; + } + + + @Override + public void processHttpMessage(int toolFlag, boolean messageIsRequest, IHttpRequestResponse messageInfo) { + if(messageIsRequest){ + IRequestInfo reqInfo = helpers.analyzeRequest(messageInfo); + String URL = new String(reqInfo.getUrl().toString()); + List headers = reqInfo.getHeaders(); + + if(IBurpExtenderCallbacks.TOOL_REPEATER != toolFlag && IBurpExtenderCallbacks.TOOL_INTRUDER != toolFlag && IBurpExtenderCallbacks.TOOL_SCANNER != toolFlag){ return; } + + if(this._host.contains(get_host(URL))){ + byte[] _request = messageInfo.getRequest(); + + if(reqInfo.getContentType() == 4){ + String messageBody = update_req_json(_request, _parameter, _value); + headers.add(this.myHeader); + _request = this.helpers.buildHttpMessage(headers, messageBody.getBytes()); + } + else { + IParameter _p = this.helpers.getRequestParameter(_request, _parameter); + if (_p == null || _p.getName().toString().length() == 0){ return; } + IParameter _newP = this.helpers.buildParameter(_parameter, _value, _p.getType()); + _request = this.helpers.removeParameter(_request, _p); + _request = this.helpers.addParameter(_request, _newP); + headers.add(this.myHeader); + + IRequestInfo reqInfo2 = helpers.analyzeRequest(_request); + String tmpreq = new String(_request); + String messageBody = new String(tmpreq.substring(reqInfo2.getBodyOffset())).trim(); + _request = this.helpers.buildHttpMessage(headers, messageBody.getBytes()); + } + + messageInfo.setRequest(_request); + } + + } + else{ + IRequestInfo reqInfo = helpers.analyzeRequest(messageInfo); + String URL = new String(reqInfo.getUrl().toString()); + List headers = reqInfo.getHeaders(); + + if(IBurpExtenderCallbacks.TOOL_REPEATER != toolFlag && IBurpExtenderCallbacks.TOOL_INTRUDER != toolFlag && IBurpExtenderCallbacks.TOOL_SCANNER != toolFlag){ return; } + + if(!headers.contains(this.myHeader)){ + return; + } + + if(this._host.contains(get_host(URL))){ + byte[] _response = messageInfo.getResponse(); + IParameter _p = this.helpers.getRequestParameter(_response, _parameter); + if (_p == null || _p.getName().toString().length() == 0){ return; } + this._value = _p.getValue().toString(); + } + } + } +} \ No newline at end of file diff --git a/src/main/java/burp/SRePlay.form b/src/main/java/burp/SRePlay.form new file mode 100644 index 0000000..052ce40 --- /dev/null +++ b/src/main/java/burp/SRePlay.form @@ -0,0 +1,213 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/burp/SRePlay.java b/src/main/java/burp/SRePlay.java new file mode 100644 index 0000000..c2de5d0 --- /dev/null +++ b/src/main/java/burp/SRePlay.java @@ -0,0 +1,231 @@ +/* + * 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 burp; + +import javax.swing.JOptionPane; + +/** + * + * @author n00b + */ +public class SRePlay extends javax.swing.JPanel { + + /** + * Creates new form SRePlay + */ + + BurpExtender _burp; + + public SRePlay(BurpExtender _b) { + initComponents(); + this._burp = _b; + + this.jButton2.setEnabled(false); + this.jCheckBox1.setSelected(true); + this.jCheckBox2.setSelected(true); + this.jCheckBox3.setSelected(true); + + this.jCheckBox1.setEnabled(false); + this.jCheckBox2.setEnabled(false); + this.jCheckBox3.setEnabled(false); + } + + /** + * 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") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jPanel1 = new javax.swing.JPanel(); + jTabbedPane1 = new javax.swing.JTabbedPane(); + jPanel2 = new javax.swing.JPanel(); + jTextField2 = new javax.swing.JTextField(); + jLabel1 = new javax.swing.JLabel(); + jLabel2 = new javax.swing.JLabel(); + jTextField1 = new javax.swing.JTextField(); + jButton1 = new javax.swing.JButton(); + jButton2 = new javax.swing.JButton(); + jLabel3 = new javax.swing.JLabel(); + jTextField3 = new javax.swing.JTextField(); + jPanel3 = new javax.swing.JPanel(); + jCheckBox1 = new javax.swing.JCheckBox(); + jCheckBox2 = new javax.swing.JCheckBox(); + jCheckBox3 = new javax.swing.JCheckBox(); + + setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.LINE_AXIS)); + + jPanel1.setLayout(new javax.swing.BoxLayout(jPanel1, javax.swing.BoxLayout.LINE_AXIS)); + + jLabel1.setText("Target Hosts URL"); + + jLabel2.setText("Parameter to capture and replace"); + + jTextField1.setToolTipText(""); + + jButton1.setText("Start SRePlay"); + jButton1.setActionCommand("Start SRePlay"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + + jButton2.setText("Stop SRePlay"); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + + jLabel3.setText("Parameter Initial Value"); + + jPanel3.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED)); + + jCheckBox1.setText("Repeater"); + + jCheckBox2.setText("Intruder"); + + jCheckBox3.setText("Scanner"); + + javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); + jPanel3.setLayout(jPanel3Layout); + jPanel3Layout.setHorizontalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addComponent(jCheckBox1) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 46, Short.MAX_VALUE) + .addComponent(jCheckBox2) + .addGap(31, 31, 31)) + .addGroup(jPanel3Layout.createSequentialGroup() + .addComponent(jCheckBox3) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) + ); + jPanel3Layout.setVerticalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jCheckBox1) + .addComponent(jCheckBox2)) + .addGap(18, 18, 18) + .addComponent(jCheckBox3) + .addContainerGap(28, Short.MAX_VALUE)) + ); + + javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); + jPanel2.setLayout(jPanel2Layout); + jPanel2Layout.setHorizontalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGap(31, 31, 31) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jLabel2) + .addComponent(jLabel1) + .addComponent(jTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 307, Short.MAX_VALUE) + .addComponent(jTextField1)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 276, Short.MAX_VALUE) + .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(39, 39, 39)) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel3) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(jButton1) + .addGap(18, 18, 18) + .addComponent(jButton2)) + .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 520, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) + ); + jPanel2Layout.setVerticalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGap(22, 22, 22) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(jLabel1) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addComponent(jLabel2) + .addGap(16, 16, 16) + .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGap(18, 18, 18) + .addComponent(jLabel3) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(37, 37, 37) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton1) + .addComponent(jButton2)) + .addContainerGap(7, Short.MAX_VALUE)) + ); + + jTabbedPane1.addTab("SRePlay", jPanel2); + + jPanel1.add(jTabbedPane1); + jTabbedPane1.getAccessibleContext().setAccessibleName("Main"); + + add(jPanel1); + }// //GEN-END:initComponents + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + + String _host = this.jTextField2.getText().trim(); + if(_host.length() == 0){ JOptionPane.showMessageDialog(this, "Provide Host URL !!!"); return; } + + String _parameter = this.jTextField1.getText().trim(); + if(_parameter.length() == 0){ JOptionPane.showMessageDialog(this, "Provide Parameter to capture and replace !!!"); return; } + + String _value = this.jTextField3.getText().trim(); + if(_value.length() == 0){ JOptionPane.showMessageDialog(this, "Provide Parameter Initial Value !!!"); return; } + + + this._burp._host = _burp.get_host(_host); + this._burp._parameter = _parameter; + this._burp._value = _value; + this._burp.start_SRePlay(); + this.jButton1.setEnabled(false); + this.jButton2.setEnabled(true); + JOptionPane.showMessageDialog(this, "SRePlay started !!!"); + }//GEN-LAST:event_jButton1ActionPerformed + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + // TODO add your handling code here: + + this._burp.stop_SRePlay(); + this.jButton1.setEnabled(true); + this.jButton2.setEnabled(false); + JOptionPane.showMessageDialog(this, "SRePlay stopped !!!"); + }//GEN-LAST:event_jButton2ActionPerformed + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JCheckBox jCheckBox1; + private javax.swing.JCheckBox jCheckBox2; + private javax.swing.JCheckBox jCheckBox3; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JPanel jPanel1; + private javax.swing.JPanel jPanel2; + private javax.swing.JPanel jPanel3; + private javax.swing.JTabbedPane jTabbedPane1; + private javax.swing.JTextField jTextField1; + private javax.swing.JTextField jTextField2; + private javax.swing.JTextField jTextField3; + // End of variables declaration//GEN-END:variables +}