public Context(string FilePath) { this.FilePath = FilePath; this.Engine = new Engine(this); this.StringGenerator = new StringGenerator(); this.Image = JavaClassImage.FromFile(this.FilePath); this.Logger = new ConsoleLogger(); this.Class = this.Image.RootClass; this.OutputPath = GetOutputPath; }
public static void Main(string[] args) { if (args.Length != 1) { Console.WriteLine("Usage: JavaResolver.SimpleRenamer inputfile.class"); return; } // Open file. string filePath = args[0].Replace("\"", ""); var classImage = JavaClassImage.FromFile(filePath); // Rename symbols. RenameInClass(classImage.RootClass); // Reassemble. var newClassFile = classImage.CreateClassFile(); // Save. newClassFile.Write(Path.ChangeExtension(filePath, "obfuscated.class")); }