{"id":3344,"date":"2014-03-23T02:29:18","date_gmt":"2014-03-23T02:29:18","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/23\/decompilingrelated-issues-collection-of-common-programming-errors\/"},"modified":"2014-03-23T02:29:18","modified_gmt":"2014-03-23T02:29:18","slug":"decompilingrelated-issues-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/23\/decompilingrelated-issues-collection-of-common-programming-errors\/","title":{"rendered":"decompilingRelated issues-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/874fdd1c84a931df19ec7a48b1f44467?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nDeepak Azad<br \/>\njava switch-statement java-7 decompiling<br \/>\nI have decompiled a very simple class that uses the new Java 7 String Switch feature.The class:public class StringSwitch {public static void main(String[] args) {final String color = &#8220;red&#8221;;switch (color) {case &#8220;red&#8221;:System.out.println(&#8220;IS RED!&#8221;);break;case &#8220;black&#8221;:System.out.println(&#8220;IS BLACK&#8221;);break;case &#8220;blue&#8221;:System.out.println(&#8220;IS BLUE&#8221;);break;case &#8220;green&#8221;:System.out.println(&#8220;IS GREEN&#8221;);break;}}}Running the Java 7 &#8220;javap&#8221; against this class, generates an interesting set of instructions (the<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/9c40e9d2e586286153d9f04e1aa0ae23?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nateiob<br \/>\njava android encryption reverse-engineering decompiling<br \/>\nAndroid and Java provide a crypto API that is relatively easy to use for crypto non-experts.But since we know that no code can really be protected from reverse engineering, especially string constants used as seeds or shared secrets, I am wondering: What is the point of going through the ordeal of encrypting and decrypting in Android applications?Am I missing something?Trying to make my question clearer and more concrete: Suppose I have an application in which certain strings used by the code a<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/7ead26d6d4d0eeaece9e66ce021871a1?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nnnythm<br \/>\nscala closures decompiling<br \/>\nHow are the variables outside of the scope of the function pulled into the function when it&#8217;s created? I tried decompiling, but I had trouble understanding it. It looked like it uses putfield. Does putfield make a pointer to an object reference?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/78a0a4bb106d07b6c6f33a51988155e3?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nPeter Mortensen<br \/>\njava jvm decompiling<br \/>\nHow do I lock compiled Java classes to prevent decompilation?I know this must be very well discussed topic on the Internet, but I could not come to any conclusion after referring them.Many people do suggest obfuscator, but they just do renaming of classes, methods, and fields with tough-to-remember character sequences but what about sensitive constant values?For example, you have developed the encryption and decryption component based on a password based encryption technique. Now in this case, a<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/411e02af9f3e9835dab6539e29ddbb65?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMikhail<br \/>\njava class reflection decompiling<br \/>\nI need to change existing compiled .class file. Actually I have even sources of it, but I cannot just change and recompile it because of many dependencies that I don&#8217;t have. So I need to change 2 methods. Both them have void return type. The first contains just 2 lines that are calls of another methods of the same class, i.e. public void a() {System.out.println(&#8220;a&#8221;); }public void b() {System.out.println(&#8220;b&#8221;); }public void ca() {a();b();}And I need to change method ca sp that it calls only a() me<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/36143210d20a4ea5c60202fac519f0dc?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ntehtros<br \/>\njava decompiling gcj<br \/>\nNow, I know that&#8230;Anything can be reverse engineered, given enough time and resources.However, would compiling your Java code to native code with a tool like GCJ make it more difficult to decompile? I mean, given a few minutes, I can decompile a .jar using JD-GUI, and it is relatively accurate. Most of the &#8220;Java to EXE&#8221; converters are just .exe launchers for the JVM, and while there are many benefits to the JVM, I have been led to believe that security of the source code is not one of them.Bott<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a3dd7329a3e36fd5557d1d1515c9a40e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRexE<br \/>\n.net decompiling disassembling<br \/>\nI came across this post on the MSMobiles.com blog that says the following, among other things:.Net is great in so many ways but forcommercial apps? No way! Anybody canjust look at your source code. A highend obfuscator will help a lot but anydetermined hacker will fix your codein less than a day. I know this fromsad experience despite spending $1000son anti-piracy and obfuscation tools.It then says the following about developing commercial Windows Mobile apps in .NET:be prepared for 1-day delay<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/42c3ade3553840ed8fe266d21ea72714?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ntycoon177<br \/>\njava bytecode decompiling disassembling disassembly<br \/>\nThis question already has an answer here:Is there a java classfile \/ bytecode editor to edit instructions?4 answersI want to be able to edit bytecode and recompile into executable class files. I have no idea how to do this. I have tried decompiling with javap -c and -v, edit something, and change it back to my Class file, but I get an error &#8220;Error: Could not find or load main class Test.class&#8221;. I would also like to generate java source from the bytecode. Any help? I want to do this myself withou<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/28d7fc76db803c6757e7cfd2cde20354?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nBart van Heukelom<br \/>\njava code-generation decompiling .class-file<br \/>\nI want to write a tool which generates some code using a compiled .class file as input. Specifically, I want to read from this class file:Methods, with annotations Method parameters, with annotationsThe input class file will likely refer to several types that are not in the tool&#8217;s classpath. This is ok, I don&#8217;t need to do anything with them, just need to read fully qualified type names as strings. I do need to get some information from the annotations, but they will be in the tool&#8217;s classpath.Is<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/fc972074d1fce5a5aafe44ceb4a9be1e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser959631<br \/>\nvb.net encryption executable decompiling<br \/>\nI don&#8217;t know if this is the correct place to post this question, so sorry if it is in the incorrect place.Question:How easy is it for a third-party person to decompile my vb.net application? I mean is it even possible?For example, I have an .exe, would someone just put that .exe into a decompiler and&#8230; BAAM!!, they can see all the code? Speaking of code, when compiling, does the code get encrypted? If not, is there a way to encrypt the code?I have used SWF decompiler to decompile a .SWF to .FLA<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Deepak Azad java switch-statement java-7 decompiling I have decompiled a very simple class that uses the new Java 7 String Switch feature.The class:public class StringSwitch {public static void main(String[] args) {final String color = &#8220;red&#8221;;switch (color) {case &#8220;red&#8221;:System.out.println(&#8220;IS RED!&#8221;);break;case &#8220;black&#8221;:System.out.println(&#8220;IS BLACK&#8221;);break;case &#8220;blue&#8221;:System.out.println(&#8220;IS BLUE&#8221;);break;case &#8220;green&#8221;:System.out.println(&#8220;IS GREEN&#8221;);break;}}}Running the Java 7 &#8220;javap&#8221; against this class, generates an interesting [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3344","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3344","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3344"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3344\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3344"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}