CFR-java-decompiler
Jump to navigation
Jump to search
Description
CFR will decompile modern Java features - Java 8 lambdas (pre and post Java beta 103 changes), Java 7 String switches etc, but is written entirely in Java 6.
Installation
- Download link: http://www.benf.org/other/cfr/cfr_0_116.jar
Usage
Syntax
$ java --jar cfr_0_116.jar class_or_jar_file [method] [options]
Options
--showops (int >= 0) default: 0 --decodeenumswitch (boolean) default: true if class file from version 49.0 (Java 5) or greater --sugarenums (boolean) default: true if class file from version 49.0 (Java 5) or greater --decodestringswitch (boolean) default: true if class file from version 51.0 (Java 7) or greater --arrayiter (boolean) default: true if class file from version 49.0 (Java 5) or greater --collectioniter (boolean) default: true if class file from version 49.0 (Java 5) or greater --innerclasses (boolean) default: true --removeboilerplate (boolean) default: true --removeinnerclasssynthetics (boolean) default: true --decodelambdas (boolean) default: true if class file from version 52.0 (Java 8) or greater --hidebridgemethods (boolean) default: true --liftconstructorinit (boolean) default: true --removedeadmethods (boolean) default: true --removebadgenerics (boolean) default: true --sugarasserts (boolean) default: true --sugarboxing (boolean) default: true --showversion (boolean) default: true --decodefinally (boolean) default: true --tidymonitors (boolean) default: true --lenient (boolean) default: false --dumpclasspath (boolean) default: false --comments (boolean) default: true --forcetopsort (boolean) --forcetopsortaggress (boolean) --forceexceptionprune (boolean) --outputdir (string) --outputpath (string) --clobber (boolean) --jarfilter (string) --stringbuffer (boolean) default: false if class file from version 49.0 (Java 5) or greater --stringbuilder (boolean) default: true if class file from version 49.0 (Java 5) or greater --silent (boolean) default: false --recover (boolean) default: true --eclipse (boolean) default: true --override (boolean) default: true if class file from version 50.0 (Java 6) or greater --showinferrable (boolean) default: false if class file from version 51.0 (Java 7) or greater --aexagg (boolean) --forcecondpropagate (boolean) --hideutf (boolean) default: true --hidelongstrings (boolean) default: false --commentmonitors (boolean) default: false --allowcorrecting (boolean) default: true --labelledblocks (boolean) default: true --j14classobj (boolean) default: false if class file from version 49.0 (Java 5) or greater --hidelangimports (boolean) default: true --recovertypeclash (boolean) --recovertypehints (boolean) --forcereturningifs (boolean) --analyseas (string) --forloopaggcapture (boolean) --renamedupmembers --renameenumidents --renamesmallmembers (int >= 0) default: 0 --renameillegalidents --rename (boolean) default: false --aggressivesizethreshold (int >= 0) default: 15000 --extraclasspath (string) --pullcodecase (boolean) default: false --help (string)
Example
$ java -jar cfr_0_116.jar cookie.jar [SNIP] if (this.passwordField1.getPassword().length == 0) { JFrame newFrame = new JFrame("Error"); JLabel label = new JLabel("Please enter a password."); label.setHorizontalAlignment(0); newFrame.add(label); newFrame.setPreferredSize(new Dimension(300, 120)); newFrame.getContentPane(); newFrame.pack(); Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); newFrame.setLocation(dim.width / 2 - newFrame.getSize().width / 2, dim.height / 2 - newFrame.getSize().height / 2); newFrame.setVisible(true); } else { try { MessageDigest digest = MessageDigest.getInstance("MD5"); byte[] arr = digest.digest(new String(this.passwordField1.getPassword()).getBytes("UTF-8")); String md5 = new BigInteger(1, arr).toString(16); System.out.println(md5); String answer = "fdf87a05e2169b88a8db5a1ebc15fa50"; if (md5.equals(answer)) { System.out.println("success! it's working!"); } URLConnection connection = new URL(this.url + new String(this.passwordField1.getPassword())).openConnection(); connection.setRequestProperty("Accept-Charset", this.charset); InputStream response = connection.getInputStream(); String flag = Cookie.getStringFromInputStream(response); JFrame newFrame = new JFrame("Server Response"); JLabel label = new JLabel(flag); label.setHorizontalAlignment(0); JPanel content = new JPanel(); content.setLayout(new BoxLayout(content, 1)); label.setAlignmentX(0.5f); label.setAlignmentY(0.5f); [SNIP]