Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Commit

Permalink
added guava library.
Browse files Browse the repository at this point in the history
added gson library.
added java-deobfusactor utils and analyzers classes.
added constant folder.
added goto rearranger.
added trap handler merger.
added peephole optimizer and show code (actually they're sets).
resorted deobfuscate tools.
  • Loading branch information
TerriblePanda committed Sep 10, 2019
1 parent d166340 commit 3290da6
Show file tree
Hide file tree
Showing 52 changed files with 4,805 additions and 75 deletions.
13 changes: 13 additions & 0 deletions .idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_2.xml

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

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__com_google_code_gson_gson_2_8_5.xml

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

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

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__com_google_guava_failureaccess_1_0_1.xml

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

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__com_google_guava_guava_28_1_jre.xml

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

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

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

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_checkerframework_checker_qual_2_8_1.xml

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

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

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

13 changes: 9 additions & 4 deletions JByteMod Reborn.iml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,14 @@
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib:1.3.50" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.50" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains:annotations:13.0" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-compiler:1.3.50" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-script-runtime:1.3.50" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-reflect:1.3.50" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains.intellij.deps:trove4j:1.0.20181211" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:28.1-jre" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" />
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
<orderEntry type="library" name="Maven: org.checkerframework:checker-qual:2.8.1" level="project" />
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.3.2" level="project" />
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.3" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.mojo:animal-sniffer-annotations:1.18" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.5" level="project" />
</component>
</module>
10 changes: 10 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -304,5 +304,15 @@
<artifactId>kotlin-stdlib</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>28.1-jre</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
* Copyright 2016 Sam Sun <me@samczsun.com>
*
* 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
*
* http://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.
*/

package com.javadeobfuscator.deobfuscator.analyzer;

import com.javadeobfuscator.deobfuscator.analyzer.frame.Frame;
import org.objectweb.asm.tree.AbstractInsnNode;

import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class AnalyzerResult {
public static final AnalyzerResult EMPTY_RESULT;

static {
EMPTY_RESULT = new AnalyzerResult();
EMPTY_RESULT.frames = Collections.emptyMap();
}

protected Map<AbstractInsnNode, List<Frame>> frames;
protected Map<Frame, AbstractInsnNode> mapping;
private Map<Frame, AbstractInsnNode> reverse;
protected int maxLocals;
protected int maxStack;

public Map<AbstractInsnNode, List<Frame>> getFrames() {
return frames;
}

public AbstractInsnNode getInsnNode(Frame frame) {
if (reverse == null) {
reverse = new HashMap<>();
frames.forEach((key, value) -> value.forEach(f -> reverse.put(f, key)));
}

return reverse.get(frame);
}

public Map<Frame, AbstractInsnNode> getMapping() {
if (mapping == null) {
Map<Frame, AbstractInsnNode> reverseMapping = new HashMap<>();
frames.entrySet().forEach(ent -> ent.getValue().forEach(frame -> reverseMapping.put(frame, ent.getKey())));
mapping = reverseMapping;
}
return mapping;
}

public int getMaxLocals() {
return maxLocals;
}
}
Loading

0 comments on commit 3290da6

Please sign in to comment.