Class IntermediaryGenerator

java.lang.Object
de.geolykt.starloader.deobf.IntermediaryGenerator

public class IntermediaryGenerator extends Object
  • Constructor Details

    • IntermediaryGenerator

      public IntermediaryGenerator(@Nullable @Nullable Path map, Path output, @Nullable @Nullable Collection<org.objectweb.asm.tree.ClassNode> nodes)
    • IntermediaryGenerator

      public IntermediaryGenerator(File input, Path map, Path output)
  • Method Details

    • addResources

      public void addResources(@NotNull @NotNull File input) throws IOException
      Adds resources from a jar file at a given location. This is used for the deobfuscate() operation if and only if an output folder was chosen.
      Parameters:
      input - The file to scan for resources
      Throws:
      IOException - if an IO issue occurred
    • computeFullHierarchy

      protected Map<String,List<String>> computeFullHierarchy(Map<String,List<String>> nearbyHierarchy)
    • deobfuscate

      public void deobfuscate()
    • doProposeEnumFieldsV2

      public void doProposeEnumFieldsV2()
      Proposes new field names within enum class that can be easily guessed by the computer.
    • getAsClassNodes

      public List<org.objectweb.asm.tree.ClassNode> getAsClassNodes()
    • remapClassesV2

      public void remapClassesV2()
    • remapClassesV2

      public void remapClassesV2(boolean findLocalClasses)
    • remapGetters

      public void remapGetters()
    • useAlternateClassNaming

      public void useAlternateClassNaming(boolean toggle)
      Sets whether alternate class naming should be employed. This is very useful if obftools has to be updated or when the application to link to has changed. Making use of this feature eliminates large portions of issues where the classes have changed their name, but using the old name is still fully valid. This can cause subtle bugs that are very hard to trace. If the alternate naming scheme is on, classes are enumerated with the characters [0-9], where as they are enumerated with the characters [a-z] when the alternate naming scheme is off.
      Parameters:
      toggle - Whether to use the alternate class naming scheme.