-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'skidfuscatordev:master' into master
- Loading branch information
Showing
121 changed files
with
12,555 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[submodule "dev.xdark.ssvm"] | ||
url = [email protected]:terminalsin/SSVM.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule SSVM
added at
0d4fc5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
dev.skidfuscator.client.standalone/skidfuscator-config.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
exempt=[ | ||
"class{^(?!(dev\\/skidfuscator)).*$}", | ||
"class{^jghost\\/}", | ||
"class{Dump}", | ||
"class{FrameComputer}", | ||
"class{util}", | ||
"class{PredicateFactory}" | ||
] | ||
flowCondition { | ||
enabled=true | ||
} | ||
flowException { | ||
enabled=true | ||
strength=AGGRESSIVE | ||
} | ||
flowRange { | ||
enabled=true | ||
} | ||
native { | ||
enabled=false | ||
} | ||
numberEncryption { | ||
enabled=true | ||
} | ||
stringEncryption { | ||
enabled=true | ||
type=STANDARD | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
...lient.standalone/src/main/java/dev/skidfuscator/obfuscator/config/SkidfuscatorConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
package dev.skidfuscator.obfuscator.config; | ||
|
||
import com.typesafe.config.*; | ||
import java.util.*; | ||
import java.util.stream.Collectors; | ||
|
||
/** | ||
* Configuration generator for Skidfuscator transformers. | ||
* Handles HOCON configuration generation using Lightbend Config library. | ||
*/ | ||
public class SkidfuscatorConfig { | ||
private final Map<String, ConfigValue> configMap = new HashMap<>(); | ||
|
||
/** | ||
* Adds a transformer configuration block. | ||
* @param name Transformer name | ||
* @param enabled Enabled state | ||
* @param options Additional transformer options | ||
* @param exemptions List of exemption patterns | ||
*/ | ||
public void addTransformer(String name, boolean enabled, Map<String, Object> options, List<String> exemptions) { | ||
Map<String, Object> transformerConfig = new HashMap<>(); | ||
transformerConfig.put("enabled", enabled); | ||
|
||
if (options != null && !options.isEmpty()) { | ||
transformerConfig.putAll(options); | ||
} | ||
|
||
if (exemptions != null && !exemptions.isEmpty()) { | ||
transformerConfig.put("exempt", exemptions); | ||
} | ||
|
||
configMap.put(name, ConfigValueFactory.fromMap(transformerConfig)); | ||
} | ||
|
||
/** | ||
* Sets global exemptions for the obfuscator. | ||
* @param exemptions List of global exemption patterns | ||
*/ | ||
public void setGlobalExemptions(List<String> exemptions) { | ||
if (exemptions != null && !exemptions.isEmpty()) { | ||
configMap.put("exempt", ConfigValueFactory.fromIterable(exemptions)); | ||
} | ||
} | ||
|
||
/** | ||
* Sets library dependencies for the obfuscator. | ||
* @param libraries List of library paths | ||
*/ | ||
public void setLibraries(List<String> libraries) { | ||
if (libraries != null && !libraries.isEmpty()) { | ||
configMap.put("libraries", ConfigValueFactory.fromIterable(libraries)); | ||
} | ||
} | ||
|
||
/** | ||
* Generates the final Config object. | ||
* @return Config object containing all settings | ||
*/ | ||
public Config generateConfig() { | ||
return ConfigFactory.parseMap(configMap); | ||
} | ||
|
||
/** | ||
* Renders the configuration as a HOCON string. | ||
* @return Formatted HOCON configuration string | ||
*/ | ||
public String renderConfig() { | ||
return generateConfig().root().render( | ||
ConfigRenderOptions.defaults() | ||
.setOriginComments(false) | ||
.setComments(true) | ||
.setFormatted(true) | ||
.setJson(false) | ||
); | ||
} | ||
} |
Oops, something went wrong.