Skip to content

Commit

Permalink
feat: add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
terminalsin committed Dec 7, 2024
1 parent 780604a commit ffa11fa
Show file tree
Hide file tree
Showing 6 changed files with 176 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.idea/*
*.iml

*.json

# Maven output
*/target/*
Expand Down
51 changes: 51 additions & 0 deletions examples/default-exemption/config.hocon
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
exempt: [
"class{^codes\\/som\\/oof4j\\/fizzbuzz\\/enterprise}"
]

libs: []

interprocedural: {
enabled: true
exempt: []
}

stringEncryption {
type: STANDARD
enabled: true
exempt: []
}

numberEncryption {
enabled: true
exempt: []
}

flowCondition {
enabled: true
exempt: []
}

flowException {
enabled: true
strength: AGGRESSIVE
exempt: []
}

flowRange {
enabled: true
exempt: []
}

flowSwitch {
enabled: true
exempt: []
}

ahegao {
enabled: true
exempt: []
}

driver: {
enabled: false
}
25 changes: 25 additions & 0 deletions examples/default-exemption/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

# Check if curl is installed
if ! command -v curl &> /dev/null
then
echo "curl could not be found. Please install curl to proceed."
exit 1
fi

# Get the latest release tag from GitHub
LATEST_TAG=$(curl -s https://api.github.com/repos/skidfuscatordev/skidfuscator-java-obfuscator/releases/latest | grep 'tag_name' | cut -d\" -f4)

# Download the latest Skidfuscator jar file
echo "Downloading the latest Skidfuscator jar..."
curl -L -o Skidfuscator.Community.$LATEST_TAG.jar https://github.com/skidfuscatordev/skidfuscator-java-obfuscator/releases/download/$LATEST_TAG/Skidfuscator.Community.$LATEST_TAG.jar

# Download the obfuscation tester jar
echo "Downloading the obfuscation tester jar..."
curl -L -o obf-test-1.0-SNAPSHOT.jar https://github.com/sim0n/jvm-obfuscation-tester/releases/download/1.0.0/obf-test-1.0-SNAPSHOT.jar

# Run the main skidfuscator command
echo "Running the main skidfuscator command..."
java -jar Skidfuscator.Community.$LATEST_TAG.jar obfuscate obf-test-1.0-SNAPSHOT.jar --config config.hocon

echo "Process completed."
25 changes: 25 additions & 0 deletions examples/default-no-config/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

# Check if curl is installed
if ! command -v curl &> /dev/null
then
echo "curl could not be found. Please install curl to proceed."
exit 1
fi

# Get the latest release tag from GitHub
LATEST_TAG=$(curl -s https://api.github.com/repos/skidfuscatordev/skidfuscator-java-obfuscator/releases/latest | grep 'tag_name' | cut -d\" -f4)

# Download the latest Skidfuscator jar file
echo "Downloading the latest Skidfuscator jar..."
curl -L -o Skidfuscator.Community.$LATEST_TAG.jar https://github.com/skidfuscatordev/skidfuscator-java-obfuscator/releases/download/$LATEST_TAG/Skidfuscator.Community.$LATEST_TAG.jar

# Download the obfuscation tester jar
echo "Downloading the obfuscation tester jar..."
curl -L -o obf-test-1.0-SNAPSHOT.jar https://github.com/sim0n/jvm-obfuscation-tester/releases/download/1.0.0/obf-test-1.0-SNAPSHOT.jar

# Run the main skidfuscator command
echo "Running the main skidfuscator command..."
java -jar Skidfuscator.Community.$LATEST_TAG.jar obfuscate obf-test-1.0-SNAPSHOT.jar

echo "Process completed."
49 changes: 49 additions & 0 deletions examples/default-with-config/config.hocon
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
exempt: []

libs: []

interprocedural: {
enabled: true
exempt: []
}

stringEncryption {
type: STANDARD
enabled: true
exempt: []
}

numberEncryption {
enabled: true
exempt: []
}

flowCondition {
enabled: true
exempt: []
}

flowException {
enabled: true
strength: AGGRESSIVE
exempt: []
}

flowRange {
enabled: true
exempt: []
}

flowSwitch {
enabled: true
exempt: []
}

ahegao {
enabled: true
exempt: []
}

driver: {
enabled: false
}
25 changes: 25 additions & 0 deletions examples/default-with-config/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

# Check if curl is installed
if ! command -v curl &> /dev/null
then
echo "curl could not be found. Please install curl to proceed."
exit 1
fi

# Get the latest release tag from GitHub
LATEST_TAG=$(curl -s https://api.github.com/repos/skidfuscatordev/skidfuscator-java-obfuscator/releases/latest | grep 'tag_name' | cut -d\" -f4)

# Download the latest Skidfuscator jar file
echo "Downloading the latest Skidfuscator jar..."
curl -L -o Skidfuscator.Community.$LATEST_TAG.jar https://github.com/skidfuscatordev/skidfuscator-java-obfuscator/releases/download/$LATEST_TAG/Skidfuscator.Community.$LATEST_TAG.jar

# Download the obfuscation tester jar
echo "Downloading the obfuscation tester jar..."
curl -L -o obf-test-1.0-SNAPSHOT.jar https://github.com/sim0n/jvm-obfuscation-tester/releases/download/1.0.0/obf-test-1.0-SNAPSHOT.jar

# Run the main skidfuscator command
echo "Running the main skidfuscator command..."
java -jar Skidfuscator.Community.$LATEST_TAG.jar obfuscate obf-test-1.0-SNAPSHOT.jar --config config.hocon

echo "Process completed."

0 comments on commit ffa11fa

Please sign in to comment.