Skip to content

Commit

Permalink
代码重构
Browse files Browse the repository at this point in the history
  • Loading branch information
ch1ng committed Dec 3, 2020
1 parent a8c588f commit 96423d4
Show file tree
Hide file tree
Showing 33 changed files with 394 additions and 697 deletions.
Binary file added .DS_Store
Binary file not shown.
Binary file removed 20180313143338-76b76fb0-2688-1.png
Binary file not shown.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# WebLogicPasswordDecryptorUi
weblogic解密JAVA UI版,欢迎提交BUG。如果遇到密文倒数第二位有斜杠的话,请先删除斜杠再尝试解密。否则可能解密失败
![](20180313143338-76b76fb0-2688-1.png)
WebLogicPasswordDecryptor 代码重构。变得好看了 :)
![](WechatIMG298.png)

PS: 如果遇到密文倒数第二位有斜杠的话,请先删除斜杠再尝试解密。否则可能解密失败




Expand Down
Binary file added WebLogicPasswordDecryptor/.DS_Store
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions WebLogicPasswordDecryptor/.idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions WebLogicPasswordDecryptor/.idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions WebLogicPasswordDecryptor/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

125 changes: 125 additions & 0 deletions WebLogicPasswordDecryptor/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions WebLogicPasswordDecryptor/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.ch1ng</groupId>
<artifactId>WebLogicPasswordDecryptor</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>ui.Main</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<!-- https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk16 -->
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk16</artifactId>
<version>1.46</version>
</dependency>


</dependencies>



</project>
4 changes: 4 additions & 0 deletions WebLogicPasswordDecryptor/src/main/java/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Manifest-Version: 1.0
Main-Class: ui.Main
Class-Path: bcprov-jdk16-1.46.jar

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package demo;
package core;

import org.bouncycastle.jce.provider.BouncyCastleProvider;
import sun.misc.BASE64Decoder;
Expand All @@ -10,15 +10,11 @@
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.Security;
import java.security.*;
import java.security.spec.InvalidKeySpecException;


@SuppressWarnings("unused")
public class WebLogicPasswordDecryptor {
public class Decryptor {

// public static void main(String args[]) throws IOException, NoSuchPaddingException, NoSuchAlgorithmException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException, InvalidKeySpecException, InvalidAlgorithmParameterException {
//
Expand All @@ -38,7 +34,7 @@ public class WebLogicPasswordDecryptor {
// System.out.println(cleartext);
// }

public static String decryptAES(String SerializedSystemIni, String ciphertext) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidAlgorithmParameterException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException, IOException {
public static String decryptAES(String SerializedSystemIni, String ciphertext) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidAlgorithmParameterException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException, IOException, InvalidKeySpecException, NoSuchProviderException {

byte[] encryptedPassword1 = new BASE64Decoder().decodeBuffer(ciphertext);
byte[] salt = null;
Expand Down Expand Up @@ -92,8 +88,7 @@ public static String decryptAES(String SerializedSystemIni, String ciphertext) t

}

public static String decrypt3DES(String SerializedSystemIni, String ciphertext) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidAlgorithmParameterException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException, IOException {

public static String decrypt3DES(String SerializedSystemIni, String ciphertext) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidAlgorithmParameterException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException, IOException, InvalidKeySpecException, NoSuchProviderException {
byte[] encryptedPassword1 = new BASE64Decoder().decodeBuffer(ciphertext);
byte[] salt = null;
byte[] encryptionKey = null;
Expand Down Expand Up @@ -160,4 +155,4 @@ public static byte[] readBytes(InputStream stream) throws IOException {
}
return bytes;
}
}
}
Loading

0 comments on commit 96423d4

Please sign in to comment.