summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.hgignore13
-rw-r--r--LICENSE (renamed from license.LGPL3.txt)0
-rw-r--r--README.md26
-rw-r--r--build.gradle21
-rw-r--r--gradle/wrapper/gradle-wrapper.jarbin53324 -> 55616 bytes
-rw-r--r--gradle/wrapper/gradle-wrapper.properties3
-rwxr-xr-xgradlew44
-rw-r--r--gradlew.bat24
-rw-r--r--license.APL2.txt55
-rw-r--r--readme.txt33
-rw-r--r--src/main/resources/about.html (renamed from conf/about.html)0
-rw-r--r--src/test/resources/proguard-build.conf (renamed from proguard-build.conf)0
-rw-r--r--src/test/resources/proguard-test.conf (renamed from proguard-test.conf)0
13 files changed, 81 insertions, 138 deletions
diff --git a/.hgignore b/.hgignore
deleted file mode 100644
index d691e2d7..00000000
--- a/.hgignore
+++ /dev/null
@@ -1,13 +0,0 @@
1
2syntax: glob
3bin
4lib
5out
6build
7*.iml
8.idea
9.gradle
10data
11input
12ivy
13*.pyc \ No newline at end of file
diff --git a/license.LGPL3.txt b/LICENSE
index 65c5ca88..65c5ca88 100644
--- a/license.LGPL3.txt
+++ b/LICENSE
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..a671c379
--- /dev/null
+++ b/README.md
@@ -0,0 +1,26 @@
1# Enigma
2
3A tool for deobfuscation of Java bytecode. Forked from <https://bitbucket.org/cuchaz/enigma>, copyright Jeff Martin.
4
5## License
6
7Enigma is distributed under the [LGPL-3.0](LICENSE).
8
9Enigma includes the following open-source libraries:
10 - A [modified version](https://github.com/FabricMC/procyon) of [Procyon](https://bitbucket.org/mstrobel/procyon) (Apache-2.0)
11 - [Guava](https://github.com/google/guava) (Apache-2.0)
12 - [SyntaxPane](https://github.com/Sciss/SyntaxPane) (Apache-2.0)
13 - [Darcula](https://github.com/bulenkov/Darcula) (Apache-2.0)
14 - [fuzzywuzzy](https://github.com/xdrop/fuzzywuzzy/) (GPL-3.0)
15 - [jopt-simple](https://github.com/jopt-simple/jopt-simple) (MIT)
16 - [ASM](https://asm.ow2.io/) (BSD-3-Clause)
17
18## Usage
19
20### Launching the GUI
21
22`java -jar enigma.jar`
23
24### On the command line
25
26`java -cp enigma.jar cuchaz.enigma.CommandMain`
diff --git a/build.gradle b/build.gradle
index febbf75d..5a743603 100644
--- a/build.gradle
+++ b/build.gradle
@@ -31,18 +31,6 @@ if (ENV.BUILD_NUMBER) {
31sourceCompatibility = 1.8 31sourceCompatibility = 1.8
32targetCompatibility = 1.8 32targetCompatibility = 1.8
33 33
34// Custom source layout
35sourceSets {
36 main {
37 java { srcDir 'src/main/java' }
38 resources { srcDir 'conf' }
39 }
40 test {
41 java { srcDir 'src/test/java' }
42 resources { srcDir 'test' }
43 }
44}
45
46task generateSources(type: Copy) { 34task generateSources(type: Copy) {
47 from sourceSets.main.java 35 from sourceSets.main.java
48 into generatedSourcesDir 36 into generatedSourcesDir
@@ -121,7 +109,7 @@ file('src/test/java/cuchaz/enigma/inputs').listFiles().each { theFile ->
121 main 'proguard.ProGuard' 109 main 'proguard.ProGuard'
122 classpath configurations.proGuard 110 classpath configurations.proGuard
123 111
124 args '@proguard-test.conf', '-injars', file('build/test-inputs/' + 112 args '@src/test/resources/proguard-test.conf', '-injars', file('build/test-inputs/' +
125 "${theFile.name}.jar"), '-outjars', file('build/test-obf/' + 113 "${theFile.name}.jar"), '-outjars', file('build/test-obf/' +
126 "${theFile.name}.jar") 114 "${theFile.name}.jar")
127 } 115 }
@@ -161,11 +149,8 @@ jar.manifest.attributes 'Main-Class': 'cuchaz.enigma.Main'
161// Make the "fat" application jar. This is useful to just throw in a classpath 149// Make the "fat" application jar. This is useful to just throw in a classpath
162// for tests, though it includes some slightly useless stuff. 150// for tests, though it includes some slightly useless stuff.
163shadowJar { 151shadowJar {
164 append 'license.LGPL3.txt' 152 append 'LICENSE'
165 append 'license.APL2.txt' 153 append 'README.md'
166 append 'readme.txt'
167
168 exclude 'META-INF/maven/**'
169} 154}
170 155
171// Create a library jar, containing only the deobfuscation code, for use at 156// Create a library jar, containing only the deobfuscation code, for use at
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 3baa851b..5c2d1cf0 100644
--- a/gradle/wrapper/gradle-wrapper.jar
+++ b/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index b375035c..f4d7b2bf 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
1#Fri May 10 01:49:02 PDT 2019
2distributionBase=GRADLE_USER_HOME 1distributionBase=GRADLE_USER_HOME
3distributionPath=wrapper/dists 2distributionPath=wrapper/dists
3distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
4zipStoreBase=GRADLE_USER_HOME 4zipStoreBase=GRADLE_USER_HOME
5zipStorePath=wrapper/dists 5zipStorePath=wrapper/dists
6distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
diff --git a/gradlew b/gradlew
index 27309d92..b0d6d0ab 100755
--- a/gradlew
+++ b/gradlew
@@ -1,4 +1,20 @@
1#!/usr/bin/env bash 1#!/usr/bin/env sh
2
3#
4# Copyright 2015 the original author or authors.
5#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17#
2 18
3############################################################################## 19##############################################################################
4## 20##
@@ -28,16 +44,16 @@ APP_NAME="Gradle"
28APP_BASE_NAME=`basename "$0"` 44APP_BASE_NAME=`basename "$0"`
29 45
30# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 46# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31DEFAULT_JVM_OPTS="" 47DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
32 48
33# Use the maximum available, or set MAX_FD != -1 to use that value. 49# Use the maximum available, or set MAX_FD != -1 to use that value.
34MAX_FD="maximum" 50MAX_FD="maximum"
35 51
36warn ( ) { 52warn () {
37 echo "$*" 53 echo "$*"
38} 54}
39 55
40die ( ) { 56die () {
41 echo 57 echo
42 echo "$*" 58 echo "$*"
43 echo 59 echo
@@ -154,11 +170,19 @@ if $cygwin ; then
154 esac 170 esac
155fi 171fi
156 172
157# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 173# Escape application args
158function splitJvmOpts() { 174save () {
159 JVM_OPTS=("$@") 175 for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176 echo " "
160} 177}
161eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 178APP_ARGS=$(save "$@")
162JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 179
164exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 180# Collect all arguments for the java command, following the shell quoting and substitution rules
181eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182
183# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
184if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
185 cd "$(dirname "$0")"
186fi
187
188exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
index 832fdb60..9991c503 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -1,3 +1,19 @@
1@rem
2@rem Copyright 2015 the original author or authors.
3@rem
4@rem Licensed under the Apache License, Version 2.0 (the "License");
5@rem you may not use this file except in compliance with the License.
6@rem You may obtain a copy of the License at
7@rem
8@rem http://www.apache.org/licenses/LICENSE-2.0
9@rem
10@rem Unless required by applicable law or agreed to in writing, software
11@rem distributed under the License is distributed on an "AS IS" BASIS,
12@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13@rem See the License for the specific language governing permissions and
14@rem limitations under the License.
15@rem
16
1@if "%DEBUG%" == "" @echo off 17@if "%DEBUG%" == "" @echo off
2@rem ########################################################################## 18@rem ##########################################################################
3@rem 19@rem
@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
14set APP_HOME=%DIRNAME% 30set APP_HOME=%DIRNAME%
15 31
16@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 32@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17set DEFAULT_JVM_OPTS= 33set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
18 34
19@rem Find java.exe 35@rem Find java.exe
20if defined JAVA_HOME goto findJavaFromJavaHome 36if defined JAVA_HOME goto findJavaFromJavaHome
@@ -49,7 +65,6 @@ goto fail
49@rem Get command-line arguments, handling Windows variants 65@rem Get command-line arguments, handling Windows variants
50 66
51if not "%OS%" == "Windows_NT" goto win9xME_args 67if not "%OS%" == "Windows_NT" goto win9xME_args
52if "%@eval[2+2]" == "4" goto 4NT_args
53 68
54:win9xME_args 69:win9xME_args
55@rem Slurp the command line arguments. 70@rem Slurp the command line arguments.
@@ -60,11 +75,6 @@ set _SKIP=2
60if "x%~1" == "x" goto execute 75if "x%~1" == "x" goto execute
61 76
62set CMD_LINE_ARGS=%* 77set CMD_LINE_ARGS=%*
63goto execute
64
65:4NT_args
66@rem Get arguments from the 4NT Shell from JP Software
67set CMD_LINE_ARGS=%$
68 78
69:execute 79:execute
70@rem Setup the command line 80@rem Setup the command line
diff --git a/license.APL2.txt b/license.APL2.txt
deleted file mode 100644
index a453e432..00000000
--- a/license.APL2.txt
+++ /dev/null
@@ -1,55 +0,0 @@
1Apache License
2Version 2.0, January 2004
3http://www.apache.org/licenses/
4
5TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
71. Definitions.
8
9"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
10
11"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
12
13"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
14
15"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
16
17"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
18
19"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
20
21"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
22
23"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
24
25"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
26
27"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
28
292. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
30
313. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
32
334. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
34
35You must give any other recipients of the Work or Derivative Works a copy of this License; and
36
37
38You must cause any modified files to carry prominent notices stating that You changed the files; and
39
40
41You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
42
43
44If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
45You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
46
475. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
48
496. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
50
517. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
52
538. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
54
559. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. \ No newline at end of file
diff --git a/readme.txt b/readme.txt
deleted file mode 100644
index 47277d91..00000000
--- a/readme.txt
+++ /dev/null
@@ -1,33 +0,0 @@
1
2Enigma v0.10.4 beta
3A tool for deobfuscation of Java bytecode
4
5Copyright Jeff Martin, 2015
6
7
8LICENSE
9
10Enigma is distributed under the GNU Lesser General Public license version 3
11
12Enigma includes a modified version of Procyon which is distributed under the Apache license version 2. Procyon is copyrighted by Mike Strobel, 2013
13
14Enigma includes unmodified versions of the following libraries which are also released under the Apache license version 2.
15 Guava
16 Javassist
17 JSyntaxPane
18
19Copies of the GNU Lesser General Public license verion 3 and the Apache license v2 have been included in this distribution.
20
21
22USING ENIGMA
23
24Launch the GUI:
25 java -jar enigma.jar
26
27Use Enigma on the command line:
28 java -cp enigma.jar cuchaz.enigma.CommandMain
29
30
31OPEN SOURCE
32
33https://bitbucket.org/cuchaz/enigma
diff --git a/conf/about.html b/src/main/resources/about.html
index b75c1bf0..b75c1bf0 100644
--- a/conf/about.html
+++ b/src/main/resources/about.html
diff --git a/proguard-build.conf b/src/test/resources/proguard-build.conf
index 117180e6..117180e6 100644
--- a/proguard-build.conf
+++ b/src/test/resources/proguard-build.conf
diff --git a/proguard-test.conf b/src/test/resources/proguard-test.conf
index 0d3d60e9..0d3d60e9 100644
--- a/proguard-test.conf
+++ b/src/test/resources/proguard-test.conf