private static void usage(Options options) { HelpFormatter formatter = new HelpFormatter(); int consoleWidth = ConsoleUtil.getConsoleWidth(); if (consoleWidth <= 0) { consoleWidth = 80; } formatter.setWidth(consoleWidth); formatter.printHelp("java -jar simplify.jar <input> [options]", "deobfuscates a dalvik executable", options, ""); }
/** * Writes an annotated hex dump of the given dex file to output. * * @param dexFile The dex file to dump * @param output An OutputStream to write the annotated hex dump to. The caller is responsible for closing this * when needed. * * @throws IOException */ public static void dump(@Nonnull DexBackedDexFile dexFile, @Nonnull OutputStream output) throws IOException { Writer writer = new BufferedWriter(new OutputStreamWriter(output)); try { int consoleWidth = ConsoleUtil.getConsoleWidth(); if (consoleWidth <= 0) { consoleWidth = 120; } RawDexFile rawDexFile = new RawDexFile(dexFile.getOpcodes(), dexFile); DexAnnotator annotator = new DexAnnotator(rawDexFile, consoleWidth); annotator.writeAnnotations(writer); } finally { writer.close(); } } }
/** * Prints the usage message. */ private static void usage() { int consoleWidth = ConsoleUtil.getConsoleWidth(); if (consoleWidth <= 0) { consoleWidth = 80; } System.out.println("java -cp baksmali.jar org.jf.dexlib2.analysis.DumpFields -d path/to/framework/jar/files <dex-file>"); }
/** * Prints the usage message. */ private static void usage() { int consoleWidth = ConsoleUtil.getConsoleWidth(); if (consoleWidth <= 0) { consoleWidth = 80; } System.out.println("java -cp baksmali.jar org.jf.dexlib2.analysis.DumpVtables -d path/to/framework/jar/files <dex-file>"); }
/** * Writes an annotated hex dump of the given dex file to output. * * @param dexFile The dex file to dump * @param output An OutputStream to write the annotated hex dump to. The caller is responsible for closing this * when needed. * * @throws IOException */ public static void dump(@Nonnull DexBackedDexFile dexFile, @Nonnull OutputStream output) throws IOException { Writer writer = new BufferedWriter(new OutputStreamWriter(output)); try { int consoleWidth = ConsoleUtil.getConsoleWidth(); if (consoleWidth <= 0) { consoleWidth = 120; } RawDexFile rawDexFile = new RawDexFile(dexFile.getOpcodes(), dexFile); DexAnnotator annotator = new DexAnnotator(rawDexFile, consoleWidth); annotator.writeAnnotations(writer); } finally { writer.close(); } } }
public void usage() { System.out.println(new HelpFormatter() .width(ConsoleUtil.getConsoleWidth()) .format(getCommandHierarchy())); }
writer = new BufferedWriter(new FileWriter(dumpFileName)); int consoleWidth = ConsoleUtil.getConsoleWidth(); if (consoleWidth <= 0) { consoleWidth = 120;
/** * Prints the usage message. */ private static void usage(boolean printDebugOptions) { SmaliHelpFormatter formatter = new SmaliHelpFormatter(); int consoleWidth = ConsoleUtil.getConsoleWidth(); if (consoleWidth <= 0) { consoleWidth = 80; } formatter.setWidth(consoleWidth); formatter.printHelp("java -jar baksmali.jar [options] <dex-file>", "disassembles and/or dumps a dex file", basicOptions, printDebugOptions?debugOptions:null); }
"Warning: You are disassembling an odex/oat file without deodexing it. You won't be able to " + "re-assemble the results unless you deodex it. See \"baksmali help deodex\"", ConsoleUtil.getConsoleWidth());
/** * Prints the usage message. */ private static void usage(boolean printDebugOptions) { SmaliHelpFormatter formatter = new SmaliHelpFormatter(); int consoleWidth = ConsoleUtil.getConsoleWidth(); if (consoleWidth <= 0) { consoleWidth = 80; } formatter.setWidth(consoleWidth); formatter.printHelp("java -jar smali.jar [options] [--] [<smali-file>|folder]*", "assembles a set of smali files into a dex file", basicOptions, printDebugOptions?debugOptions:null); }
"Warning: You are disassembling an odex/oat file without deodexing it. You won't be able to " + "re-assemble the results unless you deodex it. See \"baksmali help deodex\"", ConsoleUtil.getConsoleWidth());
public void run() { JCommander parentJc = commandAncestors.get(commandAncestors.size() - 1); if (commands == null || commands.isEmpty()) { System.out.println(new HelpFormatter() .width(ConsoleUtil.getConsoleWidth()) .format(commandAncestors)); } else { boolean printedHelp = false; for (String cmd : commands) { JCommander command = ExtendedCommands.getSubcommand(parentJc, cmd); if (command == null) { System.err.println("No such command: " + cmd); } else { printedHelp = true; System.out.println(new HelpFormatter() .width(ConsoleUtil.getConsoleWidth()) .format(((Command)command.getObjects().get(0)).getCommandHierarchy())); } } if (!printedHelp) { System.out.println(new HelpFormatter() .width(ConsoleUtil.getConsoleWidth()) .format(commandAncestors)); } } }
public void run() { JCommander parentJc = commandAncestors.get(commandAncestors.size() - 1); if (commands == null || commands.isEmpty()) { System.out.println(new HelpFormatter() .width(ConsoleUtil.getConsoleWidth()) .format(commandAncestors)); } else { boolean printedHelp = false; for (String cmd : commands) { JCommander command = ExtendedCommands.getSubcommand(parentJc, cmd); if (command == null) { System.err.println("No such command: " + cmd); } else { printedHelp = true; System.out.println(new HelpFormatter() .width(ConsoleUtil.getConsoleWidth()) .format(((Command)command.getObjects().get(0)).getCommandHierarchy())); } } if (!printedHelp) { System.out.println(new HelpFormatter() .width(ConsoleUtil.getConsoleWidth()) .format(commandAncestors)); } } }
public void run() { if (commands == null || commands.isEmpty()) { System.out.println(new HelpFormatter() .width(ConsoleUtil.getConsoleWidth()) .format(commandAncestors)); } else { boolean printedHelp = false; JCommander parentJc = Iterables.getLast(commandAncestors); for (String cmd : commands) { JCommander command = ExtendedCommands.getSubcommand(parentJc, cmd); if (command == null) { System.err.println("No such command: " + cmd); } else { printedHelp = true; System.out.println(new HelpFormatter() .width(ConsoleUtil.getConsoleWidth()) .format(((Command)command.getObjects().get(0)).getCommandHierarchy())); } } if (!printedHelp) { System.out.println(new HelpFormatter() .width(ConsoleUtil.getConsoleWidth()) .format(commandAncestors)); } } }
public void run() { if (commands == null || commands.isEmpty()) { System.out.println(new HelpFormatter() .width(ConsoleUtil.getConsoleWidth()) .format(commandAncestors)); } else { boolean printedHelp = false; JCommander parentJc = Iterables.getLast(commandAncestors); for (String cmd : commands) { JCommander command = ExtendedCommands.getSubcommand(parentJc, cmd); if (command == null) { System.err.println("No such command: " + cmd); } else { printedHelp = true; System.out.println(new HelpFormatter() .width(ConsoleUtil.getConsoleWidth()) .format(((Command) command.getObjects().get(0)).getCommandHierarchy())); } } if (!printedHelp) { System.out.println(new HelpFormatter() .width(ConsoleUtil.getConsoleWidth()) .format(commandAncestors)); } } }
public void run() { if (commands == null || commands.isEmpty()) { System.out.println(new HelpFormatter() .width(ConsoleUtil.getConsoleWidth()) .format(commandAncestors)); } else { boolean printedHelp = false; JCommander parentJc = Iterables.getLast(commandAncestors); for (String cmd : commands) { JCommander command = ExtendedCommands.getSubcommand(parentJc, cmd); if (command == null) { System.err.println("No such command: " + cmd); } else { printedHelp = true; System.out.println(new HelpFormatter() .width(ConsoleUtil.getConsoleWidth()) .format(((Command)command.getObjects().get(0)).getCommandHierarchy())); } } if (!printedHelp) { System.out.println(new HelpFormatter() .width(ConsoleUtil.getConsoleWidth()) .format(commandAncestors)); } } }
.width(ConsoleUtil.getConsoleWidth()) .format(commandAncestors)); } else { ConsoleUtil.getConsoleWidth()); for (String line : lines) { System.out.println(line); ConsoleUtil.getConsoleWidth()); for (String line : lines) { System.out.println(line); ConsoleUtil.getConsoleWidth()); for (String line : lines) { System.out.println(line); printedHelp = true; System.out.println(new HelpFormatter() .width(ConsoleUtil.getConsoleWidth()) .format(((Command)command.getObjects().get(0)).getCommandHierarchy())); .width(ConsoleUtil.getConsoleWidth()) .format(commandAncestors));
.width(ConsoleUtil.getConsoleWidth()) .format(commandAncestors)); } else { ConsoleUtil.getConsoleWidth()); for (String line : lines) { System.out.println(line); ConsoleUtil.getConsoleWidth()); for (String line : lines) { System.out.println(line); ConsoleUtil.getConsoleWidth()); for (String line : lines) { System.out.println(line); printedHelp = true; System.out.println(new HelpFormatter() .width(ConsoleUtil.getConsoleWidth()) .format(((Command)command.getObjects().get(0)).getCommandHierarchy())); .width(ConsoleUtil.getConsoleWidth()) .format(commandAncestors));