The Deobfuscator has gotten yet another update been rewritten using C# and WPF (sorry non-Windows users). The interface has been changed (hopefully for the better) and new features have been added. There are also two version Lite and Designer. Lite is a smaller file while designer looks nicer and is a littler bigger. I have done rigorous testing, bet let me know if something is wrong. Hopefully, we can add some features that didn't work very well in the old version. The links to the old versions will remain for now as well.
Description:
This program will go through a decompiled mod (zip or jar file) and replace all obfuscated names with the deobfuscated one while copying over everything else. For example, the obfuscated fields like 'field_151034_e' or 'func_130014_f_' will be replaced with the MC name APPLE and getEntityWorld, respectively (as defined by MCPBot). This can be helpful with retrieving any lost code.
Purpose:
The purpose of this program is to aid in the retrieval of lost source code. There are up to +33,000 obfuscated fields, params and methods and having to cross check each one by hand is impractical and time-consuming. This will do the work for you.
How to Use:
To use this program, you first need to get a decompiled version of the mod. This program does not decompile mods itself (but may do so in future versions) and will let you know if the mod you supply is not decompiled. To learn how to decompile a mod, read the How to Decompile a Mod section.
After you have your decompiled mod, press the open button and navigate to the decompiled zip or jar file and select it.
Then select the mapping by clciking the button under 'Mapping'. This will open up a Mapping picker. Then when you select the mapping you want, close the picker by either clicking the button again or anywhere else. After the mappings download, then click Start. This will prompt you to select where to save it to. After, it will run and be done.
How to Decompile a Mod:
You can use a decompiler such as ByteCodeViewer or JD-Gui, but I recommend FernFlower. More specifically, the version that Forge's modified. To build FernFlower, download and unpack the zip. Shift+Rightclick and select Open PowerShell window here and type ".\gradlew build". Once it's built, it will be in the build >> libs folder. Then follow there read me to learn about commands.
Designer:
Disclaimer:
This program comes as is: with no expressed or implied warranties.
License and Distributing:
This program has all rights reserved. You may use the program for either personal or commercial use. Any linking to this forum is encouraged, however, no permission is granted to anyone to provide/host any alternative downloads, nor shrink the download link or links to this page. All links should be direct links only.
Downloads:
Tips:
Deobfuscate with the latest version for your target version. Then deobfuscate with each version that is below the latest until you get to the original environment. This will update the references to the most current/most recent naming conventions, which can make updating easier.
Most of the time the code won't be a perfect match to the source. This is due to decompiling of the mod. Try using serval decompiled sources to get the most accurate code.
You can deobfuscate a non-decompiled mod first, then decompile it.
Just tested my deobfuscator on minecraft itself using the decompressed but obfuscated version in minecraft forge extracted from the jatr and put in to a zip, my program handled deobfuscating it in 2 seconds!
Rollback Post to RevisionRollBack
My Mods:
Working on updating Little Maid Mod to 1.12 with my own twist. I am a Japanese anime fan :3 Teasers here
Blood Baubles - An addon for BloodMagic that adds related Baubles to the game. (Currently on hold)
Blood Magic Wiki - A Blood Mages Choice Encylopedia (Currently on hold)
LazyModder- A libary that makes modding easier. Currently being developed for 1.12)
Deobfuscator - A program used to deobfuscate obfuscated mods.
My biggest mod wouldn't exist without decompiling. Lost my source at some point and had to decompile my latest binary. It was a single class back then, and I was able to just shove it in the minecraft.jar and have MCP's deobfuscation process handle it too.m I'd be up a creek today haha
Anyway my point is sometimes there are pretty good reasons to want to decompile/deobfuscate. BON has always felt like a PITA to use; if this is smoother it'd be very welcome
This slightly worries me. It can take ANY mod and turn it into source code, allowing for the less-honest community to steal source code.
My code does not produce source code/decompile mods. What it does is take decompiled mods/source code and deobfuscate them. What that means that it changes the unreadable func_149174_e to the function getStack. This information is publicly available at the MCPBot website. This program simple automates the process of looking up these names and replacing them inside the file without having to search through 32k+ entries really fast. I would also like to note that it can now automatically download these entries that the user selects amongst a drop down list and can support one the user already downloaded.
Edit:
Just realized I never mentioned these features in my original post. I'll update this now.
Edit 2:
I'm an idiot. I forgot to upload that version 2.1 which did that. Let me once over the code again to make sure its ready,
Edit 3:
After who knows how long, I ended up rewriting the program in another language and added the function for automated downloading.
So it seems I forgot that I planned 2 updates. (1) was the automatic download of references and (2) was the automatic updating of references between versions. There are a few visual bugs and problems with live/daily snapshots so I'll upload the 2.1 as a beta for now until i get around to fully implementing these features
Rollback Post to RevisionRollBack
My Mods:
Working on updating Little Maid Mod to 1.12 with my own twist. I am a Japanese anime fan :3 Teasers here
Blood Baubles - An addon for BloodMagic that adds related Baubles to the game. (Currently on hold)
Blood Magic Wiki - A Blood Mages Choice Encylopedia (Currently on hold)
LazyModder- A libary that makes modding easier. Currently being developed for 1.12)
Deobfuscator - A program used to deobfuscate obfuscated mods.
Now that I realize just what this does, it's pretty cool.
Thanks. I'm actually working on documentation for how this works. I think I'll post it here when I finish with this. Unfortunately, finishing the upgrades I wanted to make will take some time as I may need to restructure my code and due to school and some other reasons that will be postponed as the program still works as intended and the beta is fairly functional, except for live versions.
My favorite thing about this program is how it handles data and the efficiency it does it with.
I used fernflower to decompille it, I tried to decompille a 3d minimap mod (mc 1.7.2) and wanted to update it, but I realized that it used a other (WorldRenderer) to render it, and that class doesn't exist anymore and so I don't know how to update it :/
Rollback Post to RevisionRollBack
I am sorry, FreezeCam is dead. why you ask, the player is not been renderd anymore (there are exceptions, but can use those methodes, yet)
How about a deobfuscator that automatically generates deobfuscated names, and therefore eliminates the need to download a separate mapping file. Each time it runs into a collision between a class name and a package name or function name or field name, or any combination of these that can cause a collision, it resolves the issues by generating a unique name such as class_1234 or something like that. It then scans all the other files for references to that class, package, function, or field, and fixes the references as required. It then increments the number portion of the name, each time it discovers a new class, package, function or field that needs renaming. The output of this deobfuscator is a jar file containing all of the renamed code, and also a separate mapping file that can be used to re-obfuscate later.
To make a mod, simply decompile the deobfuscated jar with whatever decompiler you prefer (such as JD GUI). Then after editing the source code, use whatever Java IDE you prefer (such as Netbeans) to recompile (or if you only need to recompile a few class files to make your mod, you can use javac.exe directly from the command line). The last step is to use the deobfuscator with the command line switch -reobfuscate, in conjunction with the map file auto-generated in the first step, to reobfuscate the class files in the output jar. This jar file would contain the modified and reobfuscated class files, which could then be directly copied into the original game jar file to replace the corresponding class files to install the mod.
Because no original mapping file would be needed, this would work on very old versions, for which the makers of MCP have not created mapping files, such as Classic and Indev versions of Minecraft. While such deobfuscated class names, method names, package names, and field names would not convey their purpose like level.class or something, any names involved in a collision would be changed to be absolutely unique with classes that got renamed so they would always start with "class_" and methods (functions) that got renamed would always start with "method_" etc. This GUARANTIES that they could be recompiled, as there would be no collisions between the names. And this means that simple edits to the source code could be performed, by simply looking at the source code and guessing the functionality of a given variable or function, based on the context in which it was being used (such as a String variable getting set to the name of a level file, indicates that the variable in question is being used in the level saving or loading process).
Because the deobfuscation process generates a mapping file, if that mapping file were in plain text (such as CSV), then when one did find the functionality of a class or function, they could manually rename it in the mapping file, and then use the edited mapping file to again deobfuscate the game's jar file but this time including the filename of the mapping file (instead of no file name). Now instead of generating a mapping file, it would load the existing (and edited) mapping file, and generate class file names, method names, field names, and package names, which much more accurately describe their functionality.
News:
The Deobfuscator has gotten yet another update been rewritten using C# and WPF (sorry non-Windows users). The interface has been changed (hopefully for the better) and new features have been added. There are also two version Lite and Designer. Lite is a smaller file while designer looks nicer and is a littler bigger. I have done rigorous testing, bet let me know if something is wrong. Hopefully, we can add some features that didn't work very well in the old version. The links to the old versions will remain for now as well.
Description:
This program will go through a decompiled mod (zip or jar file) and replace all obfuscated names with the deobfuscated one while copying over everything else. For example, the obfuscated fields like 'field_151034_e' or 'func_130014_f_' will be replaced with the MC name APPLE and getEntityWorld, respectively (as defined by MCPBot). This can be helpful with retrieving any lost code.
Purpose:
The purpose of this program is to aid in the retrieval of lost source code. There are up to +33,000 obfuscated fields, params and methods and having to cross check each one by hand is impractical and time-consuming. This will do the work for you.
How to Use:
To use this program, you first need to get a decompiled version of the mod. This program does not decompile mods itself (but may do so in future versions) and will let you know if the mod you supply is not decompiled. To learn how to decompile a mod, read the How to Decompile a Mod section.
After you have your decompiled mod, press the open button and navigate to the decompiled zip or jar file and select it.
Then select the mapping by clciking the button under 'Mapping'. This will open up a Mapping picker. Then when you select the mapping you want, close the picker by either clicking the button again or anywhere else. After the mappings download, then click Start. This will prompt you to select where to save it to. After, it will run and be done.
How to Decompile a Mod:
You can use a decompiler such as ByteCodeViewer or JD-Gui, but I recommend FernFlower. More specifically, the version that Forge's modified. To build FernFlower, download and unpack the zip. Shift+Rightclick and select Open PowerShell window here and type ".\gradlew build". Once it's built, it will be in the build >> libs folder. Then follow there read me to learn about commands.
Designer:
License and Distributing:
This program has all rights reserved. You may use the program for either personal or commercial use. Any linking to this forum is encouraged, however, no permission is granted to anyone to provide/host any alternative downloads, nor shrink the download link or links to this page. All links should be direct links only.
Downloads:
Tips:
My Mods:
- Happy Coding -
Now updated and 5 times faster
My Mods:
- Happy Coding -
A new update. Check the read me and change log.
My Mods:
- Happy Coding -
New update, faster than ever! I'm so excited
My Mods:
- Happy Coding -
Just tested my deobfuscator on minecraft itself using the decompressed but obfuscated version in minecraft forge extracted from the jatr and put in to a zip, my program handled deobfuscating it in 2 seconds!
My Mods:
- Happy Coding -
nice. Gonna give this a shot
My biggest mod wouldn't exist without decompiling. Lost my source at some point and had to decompile my latest binary. It was a single class back then, and I was able to just shove it in the minecraft.jar and have MCP's deobfuscation process handle it too.m I'd be up a creek today haha
Anyway my point is sometimes there are pretty good reasons to want to decompile/deobfuscate. BON has always felt like a PITA to use; if this is smoother it'd be very welcome
Interesting. Too often old src from 1.6.4 is obf'd.
Thanks.
Check out GT++ for GT5/5u/CE on Curse!
This slightly worries me. It can take ANY mod and turn it into source code, allowing for the less-honest community to steal source code.
I am an amateur mod developer who is currently working on a little mod called Redstone Stew!
Unfortunately, that mod's long since dead. Maybe if I figure out how 1.12.2 forge works...
I might make a mod about green technology, but until I learn how 1.12.2 forge works, nothing is final.
My code does not produce source code/decompile mods. What it does is take decompiled mods/source code and deobfuscate them. What that means that it changes the unreadable func_149174_e to the function getStack. This information is publicly available at the MCPBot website. This program simple automates the process of looking up these names and replacing them inside the file without having to search through 32k+ entries really fast.
I would also like to note that it can now automatically download these entries that the user selects amongst a drop down list and can support one the user already downloaded.Edit:Just realized I never mentioned these features in my original post. I'll update this now.Edit 2:I'm an idiot. I forgot to upload that version 2.1 which did that. Let me once over the code again to make sureitsready,Edit 3:
After who knows how long, I ended up rewriting the program in another language and added the function for automated downloading.
My Mods:
- Happy Coding -
So it seems I forgot that I planned 2 updates. (1) was the automatic download of references and (2) was the automatic updating of references between versions. There are a few visual bugs and problems with live/daily snapshots so I'll upload the 2.1 as a beta for now until i get around to fully implementing these features
My Mods:
- Happy Coding -
Heh, sorry 'bout that. I don't bother reading entire posts before coming to conclusions.
I am an amateur mod developer who is currently working on a little mod called Redstone Stew!
Unfortunately, that mod's long since dead. Maybe if I figure out how 1.12.2 forge works...
I might make a mod about green technology, but until I learn how 1.12.2 forge works, nothing is final.
Now that I realize just what this does, it's pretty cool.
I am an amateur mod developer who is currently working on a little mod called Redstone Stew!
Unfortunately, that mod's long since dead. Maybe if I figure out how 1.12.2 forge works...
I might make a mod about green technology, but until I learn how 1.12.2 forge works, nothing is final.
Thanks. I'm actually working on documentation for how this works. I think I'll post it here when I finish with this. Unfortunately, finishing the upgrades I wanted to make will take some time as I may need to restructure my code and due to school and some other reasons that will be postponed as the program still works as intended and the beta is fairly functional, except for live versions.
My favorite thing about this program is how it handles data and the efficiency it does it with.
My Mods:
- Happy Coding -
Added my first version of documentation
My Mods:
- Happy Coding -
I have tried this, but it looks like it does nothing ?
or I do something wrong or the explaining is invalid
I have tried both version and both saids it replaced things but I dont see the changes.
I am sorry, FreezeCam is dead. why you ask, the player is not been renderd anymore (there are exceptions, but can use those methodes, yet)
How broken can a forum be.
What mod and Minecraft version did you try? Was it decompiled? This program doesn't decompile, you need to decompile using some other program first.
My Mods:
- Happy Coding -
lol, I'm glad you found some use for it. It makes me feel bad for not making the interface better. Maybe when I finish working on my other project.
Which mod was it?
My Mods:
- Happy Coding -
I used fernflower to decompille it, I tried to decompille a 3d minimap mod (mc 1.7.2) and wanted to update it, but I realized that it used a other (WorldRenderer) to render it, and that class doesn't exist anymore and so I don't know how to update it :/
I am sorry, FreezeCam is dead. why you ask, the player is not been renderd anymore (there are exceptions, but can use those methodes, yet)
How broken can a forum be.
Yeah, sometimes updating older mods can be difficult
My Mods:
- Happy Coding -
I've got a better idea for a deobfuscator.
How about a deobfuscator that automatically generates deobfuscated names, and therefore eliminates the need to download a separate mapping file. Each time it runs into a collision between a class name and a package name or function name or field name, or any combination of these that can cause a collision, it resolves the issues by generating a unique name such as class_1234 or something like that. It then scans all the other files for references to that class, package, function, or field, and fixes the references as required. It then increments the number portion of the name, each time it discovers a new class, package, function or field that needs renaming. The output of this deobfuscator is a jar file containing all of the renamed code, and also a separate mapping file that can be used to re-obfuscate later.
To make a mod, simply decompile the deobfuscated jar with whatever decompiler you prefer (such as JD GUI). Then after editing the source code, use whatever Java IDE you prefer (such as Netbeans) to recompile (or if you only need to recompile a few class files to make your mod, you can use javac.exe directly from the command line). The last step is to use the deobfuscator with the command line switch -reobfuscate, in conjunction with the map file auto-generated in the first step, to reobfuscate the class files in the output jar. This jar file would contain the modified and reobfuscated class files, which could then be directly copied into the original game jar file to replace the corresponding class files to install the mod.
Because no original mapping file would be needed, this would work on very old versions, for which the makers of MCP have not created mapping files, such as Classic and Indev versions of Minecraft. While such deobfuscated class names, method names, package names, and field names would not convey their purpose like level.class or something, any names involved in a collision would be changed to be absolutely unique with classes that got renamed so they would always start with "class_" and methods (functions) that got renamed would always start with "method_" etc. This GUARANTIES that they could be recompiled, as there would be no collisions between the names. And this means that simple edits to the source code could be performed, by simply looking at the source code and guessing the functionality of a given variable or function, based on the context in which it was being used (such as a String variable getting set to the name of a level file, indicates that the variable in question is being used in the level saving or loading process).
Because the deobfuscation process generates a mapping file, if that mapping file were in plain text (such as CSV), then when one did find the functionality of a class or function, they could manually rename it in the mapping file, and then use the edited mapping file to again deobfuscate the game's jar file but this time including the filename of the mapping file (instead of no file name). Now instead of generating a mapping file, it would load the existing (and edited) mapping file, and generate class file names, method names, field names, and package names, which much more accurately describe their functionality.