Minecraft Obfuscated Source Code
The code our toolkit produces is nowhere close to the original code, so the community had access to something that could be used to make compatible mods, but not to the source code. The second reason is, releasing the source code will not help with the modding problems much. The main problem is avoiding conflicts between mods.
I'm interested in browsing the Minecraft source code and see its classes - especially the code controlling the creeper. Is there a way to do that? Maybe open the minecraft.jar file and peek inside?
Oak3 Answers
JAR files are simply ZIP files, so you should be able to open them with the archiving tool of your choice. Even Windows Explorer will open them if you change the file extension to .zip.
However, looking at the source isn't as easy as just unpacking the archive. It only contains the compiled .class files, and even if you do get your hands on a JVM byte code decompiler, it's obfuscated and spread out over hundreds of files.
You might want to have a look at MCP (Mod Coder Pack, formerly Minecraft Coder Pack), though. It's a community project that decompiles and (mostly) de-obfuscates the Minecraft sources to aid modders.
UnionhawkBring me the horizon pirates of the caribbean. There's a way to do this; in fact, this way as well allows you to edit the code and.. make your own mods! It's called MCP (Minecraft Coders' Pack), and is a bit of a complicated setup, but it is how nearly all Minecraft mods are made. Check out a video I made on YouTube on setting up and installing it:
Interestingly enough, mention of source code release comes straight from the minecraft website.
'Once sales start dying and a minimum time has passed, I will release the game source code as some kind of open source. I'm not very happy with the draconian nature of (L)GPL, nor do I believe the other licenses have much merit other than to boost the egos of the original authors, so I might just possibly release it all as public domain.'
protected by fredleyMay 28 '13 at 8:39
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Not the answer you're looking for? Browse other questions tagged minecraft or ask your own question.
In software development, obfuscation is the deliberate act of creating source or machine code that is difficult for humans to understand. Like obfuscation in natural language, it may use needlessly roundabout expressions to compose statements. Programmers may deliberately obfuscate code to conceal its purpose (security through obscurity) or its logic or implicit values embedded in it, primarily, in order to prevent tampering, deter reverse engineering, or even as a puzzle or recreational challenge for someone reading the source code. This can be done manually or by using an automated tool, the latter being the preferred technique in industry.[1]
- 2Recreational obfuscation
Overview[edit]
The architecture and characteristics of some languages may make them easier to obfuscate than others.[2][3]C,[4]C++,[5][6] and the Perlprogramming language[7] are some examples of languages easy to obfuscate.
Recreational obfuscation[edit]
Writing and reading obfuscated source code can be a brain teaser. A number of programming contests reward the most creatively obfuscated code, such as the International Obfuscated C Code Contest and the Obfuscated Perl Contest.
Types of obfuscations include simple keyword substitution, use or non-use of whitespace to create artistic effects, and self-generating or heavily compressed programs.
According to Nick Montfort, techniques may include:
- naming obfuscation, which includes naming variables in a meaningless or deceptive way;
- data/code/comment confusion, which includes making some actual code look like comments or confusing syntax with data;
- double coding, which can be displaying code in poetry form or interesting shapes. [8]
Short obfuscated Perl programs may be used in signatures of Perl programmers. These are JAPHs ('Just another Perl hacker').[9]
Examples[edit]
This is a winning entry from the International Obfuscated C Code Contest written by Ian Phillipps in 1988[10] and subsequently reverse engineered by Thomas Ball.[11]
It is a C program that when compiled and run will generate the 12 verses of The 12 Days of Christmas. It contains all the strings required for the poem in an encoded form within the code.
A non-winning entry from the same year, this next example illustrates creative use of whitespace; it generates mazes of arbitrary length:[12]
ANSI-compliant C compilers don't allow constant strings to be overwritten, which can be avoided by changing '*M' to 'M[3]' and omitting 'M='.[citation needed]
Minecraft Obfuscated Source Code List
The following example by Óscar Toledo Gutiérrez, Best of Show entry in the 19th IOCCC, implements an 8080 emulator complete with terminal and disk controller, capable of booting CP/M-80 and running CP/M applications:[13]
An example of a JAPH:
This slowly displays the text 'Just another Perl / Unix hacker', multiple characters at a time, with delays. An explanation can be found here.[14]
Some Python examples can be found in the official Python programming FAQ and elsewhere.[15][16][17]
Advantages of obfuscation[edit]
Minecraft Obfuscated Source Code Download
There are several advantages of automated code obfuscation that have made it popular and widely useful across many platforms. On some platforms (such as Java.,[18] Android,[19] and .NET) a decompiler can reverse-engineer source code from an executable or library. A main advantage of automated code obfuscation is that it helps protect the trade secrets (intellectual property) contained within software by making reverse-engineering a program difficult and economically unfeasible. Other advantages might include helping to protect licensing mechanisms and unauthorized access, and shrinking the size of the source code, and possibly shrinking the size of the executable[how?]. Decompilation is sometimes called a man-at-the-end attack, based on the traditional cryptographic attack known as 'man-in-the-middle'. For run-time interpreted languages (more commonly known as script), like older versions of BASIC, programs execute faster and take less RAM if they use single letter variable names, avoid comments and do not contain blank characters. (in brief, the shorter the faster)
Source Code Movie
Disadvantages of obfuscation[edit]
While obfuscation can make reading, writing, and reverse-engineering a program difficult and time-consuming, it will not necessarily make it impossible.[20] Some anti-virus software, such as AVG AntiVirus,[citation needed] will also alert their users when they land on a site with code that is manually obfuscated, as one of the purposes of obfuscation can be to hide malicious code. However, some developers may employ code obfuscation for the purpose of reducing file size or increasing security. The average user may not expect their antivirus software to provide alerts about an otherwise harmless piece of code, especially from trusted corporations, so such a feature may actually deter users from using legitimate software.
Obfuscating software[edit]
A variety of tools exist to perform or assist with code obfuscation.These include experimental research tools created by academics, hobbyist tools,commercial products written by professionals, and open-source software.There also exist deobfuscation tools that attempt to perform the reversetransformation.
Although the majority of commercial obfuscation solutions work by transformingeither program sourcecode,[21][22] or platform-independent bytecode as used byJava[23] and.NET,[24] there are also some that work directly on compiled binaries.
Obfuscation and copyleft licenses[edit]
There has been debate on whether it is illegal to skirt copyleft software licenses by releasing source code in obfuscated form, such as in cases in which the author is less willing to make the source code available. The issue is addressed in the GNU General Public License by requiring the 'preferred form for making modifications' to be made available.[25] The GNU website states 'Obfuscated 'source code' is not real source code and does not count as source code.' [26]
See also[edit]
Notes[edit]
- ^'What is obfuscation (obfu)? - Definition from WhatIs.com'. SearchSoftwareQuality. Retrieved February 1, 2019.
- ^Binstock, Andrew (March 6, 2003). 'Obfuscation: Cloaking your Code from Prying Eyes'. Web.archive.org. Archived from the original on April 20, 2008. Retrieved November 25, 2013.
- ^Atwood, Jeff (May 15, 2005). 'Jeff Atwood, May 15, 2005'. Codinghorror.com. Retrieved November 25, 2013.
- ^'Obfuscation'. Kenter.demon.nl. Retrieved November 25, 2013.
- ^'C++ Tutorials - Obfuscated Code - A Simple Introduction'. DreamInCode.net. Retrieved November 25, 2013.
- ^'C Tutorials - Obfuscated Code in C'. Sites.google.com. July 7, 2011. Retrieved November 25, 2013.
- ^As of 2013-11-25 18:22 GMT. 'Pe(a)rls in line noise'. Perlmonks.org. Retrieved November 25, 2013.
- ^Montfort, Nick. 'Obfuscated code'(PDF). Retrieved November 24, 2017.
- ^'JAPH - Just Another Perl Hacker'. pm.org. Perl Mongers. Archived from the original on May 16, 2013. Retrieved February 27, 2015.
- ^'International Obfuscated C Code Winners 1988 - Least likely to compile successfully'. Ioccc.org. Retrieved November 25, 2013.
- ^''Reverse Engineering the Twelve Days of Christmas' by Thomas Ball'. Research.microsoft.com. Archived from the original on December 13, 2007. Retrieved November 25, 2013.
- ^Don Libes, Obfuscated C and Other Mysteries, John Wiley & Sons, 1993, pp 425. ISBN0-471-57805-3
- ^Óscar Toledo Gutiérrez: Intel 8080 emulator. 19th IOCCC. Best of Show.
- ^'Obfuscated Perl Program'. Perl.plover.com. Retrieved November 25, 2013.
- ^'Obfuscating 'Hello world!' – Ben Kurtovic'. benkurtovic.com.
- ^http://wiki.c2.com/?ObfuscatedPython
- ^https://code.activestate.com/lists/python-list/16171/ 'The First Annual Obfuscated Python Content'
- ^''Decompiling Java' by Godfrey Nolan'. Apress;.
- ^''Decompiling Android' by Godfrey Nolan'. Apress;.
- ^''Can We Obfuscate Programs?' by Boaz Barak'. Math.ias.edu. Retrieved November 25, 2013.
- ^'Open Directory - Computers: Programming: Languages: JavaScript: Tools: Obfuscators'. Dmoz.org. August 3, 2013. Retrieved November 25, 2013.
- ^'Open Directory - Computers: Programming: Languages: PHP: Development Tools: Obfuscation and Encryption'. Dmoz.org. September 19, 2013. Retrieved November 25, 2013.
- ^'Open Directory - Computers: Programming: Languages: Java: Development Tools: Obfuscators'. Dmoz.org. April 9, 2013. Retrieved November 25, 2013.
- ^'Open Directory - Computers: Programming: Component Frameworks: .NET: Tools: Obfuscators'. Dmoz.org. January 2, 2007. Retrieved November 25, 2013.
- ^'Reasoning behind the 'preferred form of the work for making modifications to it' language in the GPL'. Lwn.net. Retrieved November 25, 2013.
- ^'What is free software?'. gnu.net. Retrieved December 18, 2014.
References[edit]
- Seyyedhamzeh, Javad, ABCME: A Novel Metamorphic Engine, 17th National Computer Conference, Sharif University of Technology, Tehran, Iran, 2012.
- B. Barak, O. Goldreich, R. Impagliazzo, S. Rudich, A. Sahai, S. Vadhan and K. Yang. 'On the (Im)possibility of Obfuscating Programs'. 21st Annual International Cryptology Conference, Santa Barbara, California, USA. Springer Verlag LNCS Volume 2139, 2001.
- Mateas, Michael; Nick Montfort. 'A Box, Darkly: Obfuscation, Weird Languages, and Code Aesthetics'(PDF). Proceedings of the 6th Digital Arts and Culture Conference, IT University of Copenhagen, 1–3 December 2005. pp. 144–153.
External links[edit]
- Protecting Java Code Via Code Obfuscation, ACM Crossroads, Spring 1998 issue
- Protect Your Java Code - Through Obfuscators And Beyond, April 2009
- Dotfuscator in — Visual Studio documentation for built-in .NET obfuscation
- Obfuscation tools for .NET, on MSDN — Obfuscation resources for .NET, on the Microsoft Developer Center.
- Java obfuscators at Curlie