Compare commits
1 Commits
developmen
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8af6e8e7d6 |
@@ -3,7 +3,7 @@ plugins {
|
||||
}
|
||||
|
||||
group 'me.trouper'
|
||||
version '0.0.6'
|
||||
version '0.0.5'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
||||
Binary file not shown.
@@ -6,7 +6,6 @@ import com.google.gson.JsonIOException;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
import me.trouper.Countroll;
|
||||
import me.trouper.Functions.Complexers;
|
||||
import me.trouper.Functions.Obf;
|
||||
import me.trouper.Utils.Verbose;
|
||||
|
||||
import java.io.*;
|
||||
@@ -39,9 +38,7 @@ public class ConfigManager {
|
||||
defaultConfig.put("usePower", true);
|
||||
defaultConfig.put("useRoot", true);
|
||||
defaultConfig.put("useModDividend", true);
|
||||
defaultConfig.put("useSquareFinder", true);
|
||||
defaultConfig.put("doCopy", false);
|
||||
defaultConfig.put("doSafeSubtract", true);
|
||||
defaultConfig.put("deep", false);
|
||||
defaultConfig.put("color", true);
|
||||
defaultConfig.put("printHelp", false);
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
package me.trouper.Functions;
|
||||
|
||||
public class Decreasers {
|
||||
public static String divide() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ public class Eval {
|
||||
return exp.evaluate();
|
||||
}
|
||||
public static boolean isPerfectSquare(int num) {
|
||||
if (num == 0 || num == 1) return false;
|
||||
if (num == 0) return false;
|
||||
final double sq = Math.sqrt(num);
|
||||
return sq == Math.floor(sq);
|
||||
}
|
||||
|
||||
@@ -38,65 +38,158 @@ public class Obf {
|
||||
}
|
||||
|
||||
String comp = Complexers.complex(ri,Countroll.deep);
|
||||
String incr = Increasers.increase(current,target,ri,Countroll.deep);
|
||||
String rounder = rand.nextBoolean() ? "floor(" : "ceil(";
|
||||
boolean front = rand.nextBoolean();
|
||||
// Case for if its below
|
||||
|
||||
if (isPerfectSquare(current)) {
|
||||
expression.insert(0,"<&eh><&b>sqrt(<&r>");
|
||||
expression.append("<&eh><&b>)<&r>");
|
||||
continue;
|
||||
}
|
||||
if (current < target) {
|
||||
Countroll.addCount++;
|
||||
//expression.insert(0,"<&b>+<&r><&e>").insert(0,comp);
|
||||
String toAdd = comp;
|
||||
expression.append("<&b>+<&r><&e>").append(comp).append("<&r>");
|
||||
if (target - current > 128) {
|
||||
toAdd = incr;
|
||||
expression.append("<&b>*<&r><&e>").append(Increasers.increase(current,target,ri,Countroll.deep)).append("<&r>");
|
||||
}
|
||||
|
||||
if (front) {
|
||||
if (toAdd.equals(comp)) {
|
||||
toAdd = toAdd + "<&b>+<&r><&e>";
|
||||
expression.insert(0,toAdd);
|
||||
continue;
|
||||
}
|
||||
toAdd = toAdd + "<&b>*<&r><&e>";
|
||||
expression.insert(0,toAdd);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (toAdd.equals(comp)) {
|
||||
toAdd = "<&b>+<&r><&e>" + toAdd;
|
||||
expression.append(toAdd);
|
||||
continue;
|
||||
}
|
||||
toAdd = "<&b>*<&r><&e>" + toAdd;
|
||||
expression.append(toAdd);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Case for if its above
|
||||
if (current > target) {
|
||||
Countroll.subCount++;
|
||||
String toAdd = comp;
|
||||
expression.append("<&b>-<&r><&e>").append(comp).append("<&r>");
|
||||
if (current - target > 128) {
|
||||
toAdd = incr;
|
||||
expression.append("<&b>-<&r><&e>").append(Increasers.increase(target,current,ri,Countroll.deep)).append("<&r>");
|
||||
}
|
||||
|
||||
if (toAdd.equals(comp)) {
|
||||
toAdd = "<&b>-<&r><&e>" + toAdd;
|
||||
expression.append(toAdd);
|
||||
continue;
|
||||
}
|
||||
toAdd = "<&b>/<&r><&e>" + toAdd;
|
||||
expression.insert(0,rounder);
|
||||
expression.append(toAdd).append(")");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Verbose.send("PROC", "Broke out of loop.");
|
||||
return expression.toString();
|
||||
}
|
||||
/**
|
||||
* ObfIntN will work for Numselli's counting bot
|
||||
* @param target Integer to reach
|
||||
* @param deep When True, doubles the use of Complexers and Increasers
|
||||
* @return A colored string
|
||||
*/
|
||||
public static String obfIntN(int target, boolean deep) {
|
||||
if (deep) System.out.println("Deep Obfuscation is coming soon!");
|
||||
StringBuilder expression = new StringBuilder();
|
||||
|
||||
Random random = new Random();
|
||||
|
||||
int initializer = random.nextInt(9)+1;
|
||||
Verbose.send("PROC","Initializing Expression: " + initializer);
|
||||
expression.append("<&dh><&f>").append(initializer).append("<&r>");
|
||||
|
||||
|
||||
while (eval(expression.toString()) != target) {
|
||||
Countroll.total++;
|
||||
int eval = (int) eval(expression.toString());
|
||||
int ri = random.nextInt(9)+1;
|
||||
int op = random.nextInt(2);
|
||||
boolean mult = false;
|
||||
|
||||
if (!isInt(eval(expression.toString()))) {
|
||||
System.out.println("Something went horribly wrong, Here is the relevant info." +
|
||||
"\nEvaluation: " + eval(expression.toString()) +
|
||||
"\nRandom Pick: " + ri +
|
||||
"\nOperation: " + op +
|
||||
"\nCaught at: \n" + removeColors(expression.toString()));
|
||||
break;
|
||||
}
|
||||
|
||||
Verbose.send("LOOP","Random: " + ri);
|
||||
Verbose.send("LOOP","Current: " + eval(expression.toString()));
|
||||
|
||||
if (isPerfectSquare(eval) && eval != 1) {
|
||||
Countroll.perfectCount++;
|
||||
Verbose.send("LOOP","PERFECT SQUARE TIME! (" + Countroll.perfectCount+ ")");
|
||||
expression.insert(0,"<&eh><&b>sqrt(<&r>").append("<&eh><&b>)<&r>");
|
||||
eval = (int) eval(expression.toString());
|
||||
}
|
||||
|
||||
final String toAdd = Complexers.complex(ri,deep);
|
||||
|
||||
if (eval < target) {
|
||||
if (target - eval > 4069) {
|
||||
Countroll.expCount++;
|
||||
Verbose.send("LOOP","Large than (" + Countroll.expCount + ")");
|
||||
expression.append("<&b>*<&r><&a>").append(Increasers.power(ri,3,deep)).append("<&r>");
|
||||
} else if (target - eval > 1048) {
|
||||
Countroll.expCount++;
|
||||
Verbose.send("LOOP","Large than (" + Countroll.expCount + ")");
|
||||
expression.append("<&b>*<&r><&a>").append(Increasers.power(ri,2,deep)).append("<&r>");
|
||||
} else if (target - eval > 128) {
|
||||
Countroll.factorCount++;
|
||||
Verbose.send("LOOP","Big than (" + Countroll.factorCount + ")");
|
||||
expression.append("<&b>*<&r><&a>").append(Increasers.multiply(ri,9,deep)).append("<&r>");
|
||||
}
|
||||
Countroll.addCount++;
|
||||
expression.append("<&b>+<&r><&e>").append(toAdd).append("<&r>");
|
||||
Verbose.send("LOOP","Less than (" + Countroll.addCount + ")");
|
||||
}
|
||||
|
||||
if (eval > target) {
|
||||
Countroll.subCount++;
|
||||
expression.insert(0,"<&c>(<&r>").append("<&c>)<&r>");
|
||||
expression.append("<&b>-<&r><&e>").append(toAdd).append("<&r>");
|
||||
Verbose.send("LOOP","Greater than (" + Countroll.subCount + ")");
|
||||
}
|
||||
}
|
||||
|
||||
Verbose.send("PROC","Broke out of loop. Value: " + eval(expression.toString()));
|
||||
Verbose.send("EVAL","Expression: " + expression);
|
||||
Verbose.send("EVAL","Expression (Cleaned): " + removeColors(expression.toString()));
|
||||
return expression.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* ObfIntD will work with DuckGroups's Counting bot
|
||||
* @param target Integer to reach
|
||||
* @param deep When True, doubles the use of Complexers and Increasers
|
||||
* @return A colored string
|
||||
*/
|
||||
public static String obfIntD(int target, boolean deep) {
|
||||
if (deep) System.out.println("Deep Obfuscation is coming soon!");
|
||||
StringBuilder expression = new StringBuilder();
|
||||
|
||||
Random random = new Random();
|
||||
|
||||
int initializer = random.nextInt(9)+1;
|
||||
expression.append("<&dh><&f>").append(initializer).append("<&r>");
|
||||
|
||||
while (eval(expression.toString()) != target) {
|
||||
Countroll.total++;
|
||||
int eval = (int) eval(expression.toString());
|
||||
int ri = random.nextInt(9)+1;
|
||||
|
||||
|
||||
final String toAdd = Complexers.complex(ri,deep);
|
||||
|
||||
if (eval < target) {
|
||||
if (target - eval > 4096) {
|
||||
Countroll.expCount++;
|
||||
expression.append("<&b>*<&r>").append(Increasers.power(ri,4,deep));
|
||||
} else if (target - eval > 1048) {
|
||||
Countroll.expCount++;
|
||||
expression.append("<&b>*<&r>").append(Increasers.power(ri,2,deep));
|
||||
} else if (target - eval > 128) {
|
||||
Countroll.factorCount++;
|
||||
expression.append("<&b>*<&r>").append(Increasers.multiply(ri,2,deep));
|
||||
}
|
||||
Countroll.addCount++;
|
||||
expression.append("<&b>+<&r>").append(toAdd);
|
||||
}
|
||||
if (eval > target) {
|
||||
if (eval - target > 4096) {
|
||||
Countroll.expCount++;
|
||||
expression.append("<&b>-<&r>").append(Increasers.power(ri,5,deep));
|
||||
} else if (eval - target> 1048) {
|
||||
Countroll.expCount++;
|
||||
expression.append("<&b>-<&r>").append(Increasers.power(ri,3,deep));
|
||||
} else if (eval - target > 128) {
|
||||
Countroll.factorCount++;
|
||||
expression.append("<&b>-<&r>").append(Increasers.multiply(ri,2,deep));
|
||||
}
|
||||
Countroll.subCount++;
|
||||
expression.insert(0,"<&c>(<&r>").append("<&c>)<&r>");
|
||||
expression.append("<&b>-<&r>").append(toAdd);
|
||||
}
|
||||
}
|
||||
return expression.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,8 +60,8 @@ public class Utils {
|
||||
--deep, -d Enable deep obfuscation (under development)
|
||||
--color, -rgb Enable colored output
|
||||
--help, --h, -h Show this help message
|
||||
--mode, -m Toggle the mode Values (Long): [duckgroup, numselli, universal, testing] Values (Brief): [d, n, u, t]
|
||||
--toggle, -t Toggle off Complexer Values: [divide, power, root, mrDividend, mrDivisor, perfect]
|
||||
--mode, -m Toggle the mode Values (Long): [duckgroup, numselli] Values (Brief): [d, n]
|
||||
--toggle, -t Toggle off Complexer Values: [divide, power, root, mrDividend, mrDivisor]
|
||||
Note: When using multiple options, separate them with spaces.""");
|
||||
System.exit(0);
|
||||
}
|
||||
@@ -71,9 +71,7 @@ public class Utils {
|
||||
"\n<&b><&eh>Blue/Yellow:<&r> Perfect Square" +
|
||||
"\n<&a>Green:<&r> Increaser" +
|
||||
"\n<&9>Blue:<&r> Operation" +
|
||||
"\n<&e>Yellow:<&r> Complexer" +
|
||||
"\n<&b><&d&h>Blue/Purple:<&r> Safe Subtract" +
|
||||
"\n<&3>Cyan:<&r> Deep Complexer";
|
||||
"\n<&e>Yellow:<&r> Complexer";
|
||||
System.out.println(activateColors(colorKey));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user