diff --git a/release/YaguraExtension-v3.1.jar b/release/YaguraExtension-v3.1.jar index 5ad4198..5234b19 100644 Binary files a/release/YaguraExtension-v3.1.jar and b/release/YaguraExtension-v3.1.jar differ diff --git a/src/main/java/yagura/model/Logging.java b/src/main/java/yagura/model/Logging.java index 43789eb..e33a7ea 100644 --- a/src/main/java/yagura/model/Logging.java +++ b/src/main/java/yagura/model/Logging.java @@ -167,7 +167,6 @@ protected File mkLogZip(String logBaseDir, String logdirFormat) throws IOExcepti break; } } while (true); - BurpExtension.helpers().outPrintln("TargetZip:" + targetZip.getAbsolutePath()); return targetZip; } @@ -202,7 +201,6 @@ protected File mkLogDir(String logBaseDir, String logdirFormat) throws IOExcepti break; } } while (true); - BurpExtension.helpers().outPrintln("TargetDir:" + targetDir.getAbsolutePath()); return targetDir; } diff --git a/src/main/java/yagura/view/JTransCoderTab.form b/src/main/java/yagura/view/JTransCoderTab.form index 9407a84..33a92bc 100644 --- a/src/main/java/yagura/view/JTransCoderTab.form +++ b/src/main/java/yagura/view/JTransCoderTab.form @@ -2793,36 +2793,39 @@ - + + + - + - + - + + - - + + - + @@ -3011,6 +3014,14 @@ + + + + + + + + diff --git a/src/main/java/yagura/view/JTransCoderTab.java b/src/main/java/yagura/view/JTransCoderTab.java index b772e36..6c3f184 100644 --- a/src/main/java/yagura/view/JTransCoderTab.java +++ b/src/main/java/yagura/view/JTransCoderTab.java @@ -652,6 +652,7 @@ private void initComponents() { txtIntIP = new javax.swing.JTextField(); btnIntIP = new javax.swing.JButton(); lblIPValid = new javax.swing.JLabel(); + btnDecIPPaste = new javax.swing.JButton(); setLayout(new java.awt.BorderLayout()); @@ -2442,6 +2443,13 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { lblIPValid.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); lblIPValid.setToolTipText(""); + btnDecIPPaste.setText("Paste"); + btnDecIPPaste.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + btnDecIPPasteActionPerformed(evt); + } + }); + javax.swing.GroupLayout tabIPFormatConverterLayout = new javax.swing.GroupLayout(tabIPFormatConverter); tabIPFormatConverter.setLayout(tabIPFormatConverterLayout); tabIPFormatConverterLayout.setHorizontalGroup( @@ -2464,29 +2472,32 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(tabIPFormatConverterLayout.createSequentialGroup() .addComponent(pnlDotDecIP, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(lblIPValid, javax.swing.GroupLayout.DEFAULT_SIZE, 673, Short.MAX_VALUE)) + .addComponent(btnDecIPPaste, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(84, 84, 84) + .addComponent(lblIPValid, javax.swing.GroupLayout.DEFAULT_SIZE, 517, Short.MAX_VALUE)) .addComponent(txtDotOctIP)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(tabIPFormatConverterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(tabIPFormatConverterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(btnOctIP, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(btnDecIPConvert, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnHexIP, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnDotOctIP, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnDotHexIP, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(btnIntIP, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(btnIntIP, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(btnDecIPConvert, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); tabIPFormatConverterLayout.setVerticalGroup( tabIPFormatConverterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(tabIPFormatConverterLayout.createSequentialGroup() + .addContainerGap() .addGroup(tabIPFormatConverterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(tabIPFormatConverterLayout.createSequentialGroup() - .addContainerGap() + .addGroup(tabIPFormatConverterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(tabIPFormatConverterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(lblDotDeclIP, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lblIPValid, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(pnlDotDecIP, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) - .addComponent(btnDecIPConvert)) + .addComponent(pnlDotDecIP, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(btnDecIPConvert)) + .addComponent(btnDecIPPaste)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(tabIPFormatConverterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(btnDotOctIP) @@ -3636,6 +3647,18 @@ private void btnSHAKE256ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-F } }//GEN-LAST:event_btnSHAKE256ActionPerformed + private void btnDecIPPasteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDecIPPasteActionPerformed + try { + byte ipv4 [] = IpUtil.parseIPv4AddressByte(SwingUtil.systemClipboardPaste()); + this.txtDec1.setText(String.valueOf(Byte.toUnsignedInt(ipv4[0]))); + this.txtDec2.setText(String.valueOf(Byte.toUnsignedInt(ipv4[1]))); + this.txtDec3.setText(String.valueOf(Byte.toUnsignedInt(ipv4[2]))); + this.txtDec4.setText(String.valueOf(Byte.toUnsignedInt(ipv4[4]))); + } catch (ParseException ex) { + logger.log(Level.SEVERE, ex.getMessage(), ex); + } + }//GEN-LAST:event_btnDecIPPasteActionPerformed + private final java.awt.event.ActionListener historyActionPerformed = new java.awt.event.ActionListener() { @Override public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -3658,6 +3681,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { private javax.swing.ButtonGroup btnConvertCase; private javax.swing.JButton btnDecCopy; private javax.swing.JButton btnDecIPConvert; + private javax.swing.JButton btnDecIPPaste; private javax.swing.JButton btnDecode; private javax.swing.JButton btnDotHexIP; private javax.swing.JButton btnDotOctIP; diff --git a/src/main/java/yagura/view/ipv4.java b/src/main/java/yagura/view/ipv4.java new file mode 100644 index 0000000..2dfd01c --- /dev/null +++ b/src/main/java/yagura/view/ipv4.java @@ -0,0 +1,32 @@ +/* + * The MIT License + * + * Copyright 2024 isayan. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package yagura.view; + +/** + * + * @author isayan + */ +class ipv4 { + +}