Git Product home page Git Product logo

petschko / rpg-maker-mv-decrypter Goto Github PK

View Code? Open in Web Editor NEW
619.0 21.0 107.0 580 KB

You can decrypt RPG-Maker-MV Resource Files with this project ~ If you don't wanna download it, you can use the Script on my HP:

Home Page: https://petschko.org/tools/mv_decrypter/

License: MIT License

JavaScript 94.33% HTML 4.30% CSS 1.37%
decrypt-files encryption-key rpg-maker-mv decryption decrypting-files javascript html5 html personal-project rpg-maker rpgmvm-file rpgmvp-file rpgmvo-file js offline-js rpgmvm rpgmvp rpgmvo mv

rpg-maker-mv-decrypter's Introduction

IMPORTANT: Project MOVED to Gitlab.com

Please look there for updates/Bug-Reports - This Github Repo will be Read-Only by now

https://gitlab.com/Petschko/RPG-Maker-MV-Decrypter


Petschko's RPG-Maker-MV & MZ File-Decrypter

What's that?

This Project is used to Decrypt (and Re-Encrypt) RPG-Maker-MV-Resource-Files (MZ-Files as well) and that are encrypted with the Build-In-Encryption of the RPG-Maker.

This Project is mostly used for Single-File decryption (But it is able to handle multiple files). >.< Please try out the Java-Decrypter if you want decrypt huge amounts of Files (or more Projects)

Motivation behind this

As Art-Creator for the RPG-Maker by myself, it is sometimes hard to figure out, if somebody is using Resources from you (and may violate the licence like giving no credit or using a Non-Commercial-Resource in a Commercial Game for example).

I don't have time to play through all the games so i just quick look at the files but its only possible if the files are not encrypted...

Sad for me, more People use the build in Encryption from the RPG-Maker-MV so that's why I wrote this script - to get a quick look at the files without playing the whole game =) May some other artists will find this useful too.

Legal-Notification

You are not allowed to use the Decrypted Files (if its not allowed by the origin File-Licence). Please don't steal and reuse stuff that's not the idea of this Script! You can save them for Private-Use only. If the origin Licence allow use you can use them of course but please follow the licences!

If that's your Project and you simply lost your Origin-Files, you have the same rights, to do stuff with them, as before =)

Requirements

  • Web-Browser with HTML5 Support

Installation

This is very easy:

  • Download/Clone the Project OR direct use it on my site
  • Extract/Put it where ever you want
  • Done :)

How to use?

If you downloaded this Script on your Computer (Pre Step)

  • You have to open the "index.html" file with you Browser like:
    • Use right click and open with... (Then select your Favorite Browser)
    • Use double click to open the file. Many Browsers set them as default applications for html files

Use this Script now

Image "Decryption" without the Key

You can restore all image files without having the decryption Key. If you want to get the Audio, you need to do the decryption

  1. Go to the Tab Restore-Images (No-Key)
  2. Select any encrypted PNG-Image-File(s) (Extensions: .rpgmvp or .png_)
  3. Click the Button Restore Original Files
  4. Download or view the Files on the right side. You can open them and/or save them (or just view/listen)

Decryption

You want to decrypt Audio or image Files? That is how it works:

  1. Check if the Files have one of the File-Extensions:
    • .rpgmvp, .png_ (PNG-Files)
    • .rpgmvm, .m4a_ (m4a-Files)
    • .rpgmvo, .ogg_ (ogg-Files)
  2. Get the Encryption-Key (This step isn't needed for Images - Look at Image "Decryption" without the Key)
    • Select with the first File-Picker the "System.json"-File OR any .rpgmvp/.png_ File from that Project
      • The File is located in %PROJECT_DIRECTORY%/www/data/System(.json) for RPG-Maker MV
      • The File is located in %PROJECT_DIRECTORY%/data/System(.json) for RPG-Maker MZ
      • You can also use an Encrypted Image-File from the Project (.rpgmvp / .png_) to detect the Key
    • Click on the Detect-Button - If it finds the Key, it will automatically insert it for you within the next Input-Field
    • You can also manually put the encryption-Key in the Text-Field if you know it.
  3. Select the Encrypted Audio/Image-Files to decrypt (You can select multiple here)
  4. Click on the Decrypt-Button
    • IF you get an invalid Header Warning, turn off the Header Check. Just select "No" under Verify Fake-Header? and try again!
  5. The Decrypted-File(s) are shown in a File-List. You can open them and/or save them (or just view/listen)
    • Some Browser-Plugins like UBlockOrigin may block previewing the File. Disable it or explicit say Open in new Tab

Encryption

You want turn back an Image into the Game (If you have translated text or fixed something on an Image)?

Here you go:

  1. You need to check if you have one of these File-Types to turn back into the Game:
    • PNG-File (.png) - Image-Format make sure that's PNG not JPG or something different
    • m4a-File (.m4a) - Sound Format
    • ogg-File (.ogg) - Sound and/or Video Format
  2. If you have the Files in these Format you can go on, else turn them into the correct Format. (You should know how or how to Google)
  3. Get the Encryption-Key (This step isn't needed for Images - Look at Image "Decryption" without the Key)
    • Select with the first File-Picker the "System.json"-File OR any .rpgmvp/.png_ File from that Project
      • The File is located in %PROJECT_DIRECTORY%/www/data/System(.json) for RPG-Maker MV
      • The File is located in %PROJECT_DIRECTORY%/data/System(.json) for RPG-Maker MZ
      • You can also use an Encrypted Image-File from the Project (.rpgmvp / .png_) to detect the Key
    • Click on the Detect-Button - If it finds the Key, it will automatically insert it for you within the next Input-Field
    • You can also manually put the encryption-Key in the Text-Field if you know it.
  4. Make sure that Verify Fake-Header? is enabled (on YES). If not select it.
    • This checks if the Game can read this File
  5. Select the File(s) you want Encrypt
  6. Click on the (Re)-Encrypt-Button (Of the RPG-Maker which is used)
    • IF you get an Error please check if you did all steps right before! Also check if the Header-Values are on default:
      • Click on Header-Values (Show)
      • Click on Reset Header-Values to default and click OK in the Confirmation box
      • Try again
  7. The (Re)-Encrypted-File(s) are shown in a File-List, next to or below (on tiny screens) the De/Encrypt-Button. You can't open them (because its encrypted) but you should save them
  8. Overwrite the File in your Game (Maybe make a backup of the game before doing that)
  9. Start the Game and check if the File has been displayed
    • If the File is not displayed: (This is very rare ~1/100 Games - Usually you get a Header-Error while you Decrypt Files from these Games them with the default Header-Values. That's a strong indicator that this Game has different Header-Values)
      • You have to set different Header-Values, for this you have to open this File: %PROJECT_DIRECTORY%/www/js/rpg_core.js
        • For RPG-Maker-MZ the File is here: %PROJECT_DIRECTORY%/js/rpg_core.js
      • There you find the Decrypter-Class, its an insane long File so use the Search function (Strg/Ctrl + F) and search for this String: function Decrypter()
      • There are Values sort below, like this:
      Decrypter.hasEncryptedImages = false;
      Decrypter.hasEncryptedAudio = false;
      Decrypter._requestImgFile = [];
      Decrypter._headerlength = 16; // <-- Header-Length (In Bytes)
      Decrypter._xhrOk = 400;
      Decrypter._encryptionKey = "";
      Decrypter._ignoreList = [
          "img/system/Window.png"
      ];
      Decrypter.SIGNATURE = "5250474d56000000"; // <-- Header-Signature
      Decrypter.VER = "000301"; // <-- Header-Version
      Decrypter.REMAIN = "0000000000"; // <-- Header-Remain
      Make sure that you copy the values (which have similar names to the fields in the Header-Info Form - I showed you them in my example above)
      • Try to encrypt the File(s) again

Credits

Contact

  • E-Mail me if you have questions (no bug reporting please): [email protected]
  • Please report Bugs here on github.com use the "Issue"-Section on this Project

rpg-maker-mv-decrypter's People

Contributors

blackyuzia avatar petschko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rpg-maker-mv-decrypter's Issues

Is Encryption Option disabled?

Screenshot.png

As you can see by the screenshot, the option to encrypt files is greyed out so is it disabled for some reason?

Because, on the website, there's no issue encrypting files.

It cannot use to decrypt a game file

I cannot decrypt stranger of power 2 resources , help with the file if you can or help me to decrypt it if you can. I no sure if i done something wrong or wha. Do help to check it thank.
screenshot_20180529081356

Suggestion: webp support

I ran across a game with webp files. In this case they were not encrypted, so there's no actual issue with that one, but it is possible or perhaps even likely that in the future there will be more games using webp instead of png. The image decrypter seems to not want to work with webp files (in fact, it doesn't even list them in the open dialog) so this could be a potential problem in the future. This is more a heads-up than anything else, but it does make sense that it should support webp anyway.

Can not find out the Key from rpg_core.js

As you explained here(#19) how the get the key from rpg_core.js file. I opened rpg_core.js file in the workpad, use the search option (Ctrl+F) and search for "Decrypter.readEncryptionkey" in the file however, I get the result as this:

Decrypter.readEncryptionkey = function(){
this._encryptionKey = $dataSystem.encryptionKey.split(/(.{2})/).filter(Boolean);

So I could not get the key. And as you can understand I am not good with coding etc.

Note that I tried the system.json detection tool first.

Thank you in advance

Chrome tab crashes ZIPing 2k files

Vodka, Putin, Balalayka. Hallo.

I tryed v1.0 on 900-1000 (of 1900+) files (1.1+ GB). Chrome tab crashed (64.0.3269.3 dev).
But 800-850 files works fine.
FF works fine making archive of all 1900 files

Can smb test this case? Dev? (:

unable to decrypt files when there are none in the directory

oh hi, i thought of decrypting a game, however the only game files that are visible are the .exe and the save file in www/save/persistent.rpgsave
is it still possible to extract game files from something like this?

I'm pretty sure it is an RPG Maker MV game, because the exe has this icon
File0001

Doesnt extract projectfile?

Im not sure if its supposed to or not, but unlike the other versions of the rpgmaker decryptor programs, this one doesnt extract the .rpgmaker project file with which you need to open it in rpgmakerMV program?

Suggestion for recovering the encryption code

So, as far as I understand it, the files are formatted like this:
Bytes 0-15: RPG Maker MV header.
Bytes 16-31: The first 16 bytes of a file XOR-ed with a 16-byte key shared across all files in the game.
Bytes 32-...: The rest of the file.

Currently, this project supports recovering PNGs without the key, as well-formed PNGs are guaranteed to have the exact same first 16 bytes (89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52).
However, this can easily be leveraged to recover the original XOR key, since plaintext XOR key == ciphertext, but also ciphertext XOR plaintext == key, and we have both the ciphertext (the "encrypted" bytes 16-31 of an encrypted PNG) and the plaintext (those constant first 16 bytes of a PNG).
And since the key is shared, users could be directed to decrypt a single .rpgmvp from the game to get the key, which they can use for any of the rest of the files.

not a issue with the program it self, just can't find decrypter code.

i was trying to decrypt omori since I wanted to have the bgm/sound effects for my own use, however I couldn't find a decryption key... i don't really know anything about coding myself though, so maybe i just don't know where to look but all i've found so far was this:

Decrypter.readEncryptionkey = function(){
this._encryptionKey = $dataSystem.encryptionKey.split(/(.{2})/).filter(Boolean);
};

since the game is paid i don't really feel comfortable reuploading the files or anything so others can scour through them, but any help figureing out the key would be appreciated

.RPGMVO Won't show up

When I try to convert the rpgmvo file, (Audio file) to .ogg, then it won't even let me, because when I open the file system, it says 'No items match your search.' I tried it with both of the 'choose your file' Buttons, and no, I didn't delete them. I checked afterwards. Help would be appreciated.

Translations System

I think of adding a translation system, were you can switch the language. Some people dont understand english very well and may like it in their language

Still can't find decrypter code after following the instruction

Sorry to bother you, but I ran into some issues that you've already solved. This may be related to my inexperience in the program, but I would like to ask you to help me solve it.

Decrypter.readEncryptionkey = function(){
this._encryptionKey = $dataSystem.encryptionKey.split(/(.{2})/).filter(Boolean);

I can't find the Decryption-Code in System.json, probably because the author hid the code. so I added your code at the bottom of rpg_core.js according to the method shown on your website.

But nothing changed. I opened the game, and after closing the game, I didn’t find the Decryption Code anywhere, and there was no change in rpg_core.js.

not working for unknown reason :(

i've used the site before, it worked great
but this time it's just simply not working, and i'm doing everything the same as i did before

i used it to extract sprites from the coffin of andy and leyley in the past, and it worked but it's not now :( it seems someone else also had troubles extracting from this game recently

i'm on a macbook pro, and i tried using both chrome and firefox if that matters

Custom Format

I'm trying to pull the music files from OMORI, and the encryption key is in .KEL file format. How should I turn the .Kel file into JSON format?

Add LZString decompression to the JSON-Detection

I noticed that several Games starting to use the LZString compression to make it a bit harder to get on their Data... But its simple just an other useless method which can be uncompressed really easily!^^

I wrote a quick uncompressions Tool for that: http://petschko.org/tools/unCompressLZString/

But I want to add it to the function, which checks the System-JSON for the key. So that user don't have to mess with that

Game has changed their .json to custom file extension instead? Can I still find encryption key?

I was planning to re-encrypt some files because I was making a custom sprite mod for a game called OMORI, but the .JSON file (which is in www/data) has been set to a custom file extension (named after one of the characters) .KEL. I've had a search around and I don't think I've found any mention of a way to do this on RPG maker forums so this might be an individual thing, but I thought if anybody knew about encryption of RPG maker files it'd be the guy who made this. I tried just putting it in, but it just comes out with an "it's not a JSON" message.
Do you know any way to get this in a working .JSON format? I tried literally just changing the file extension but it comes out unreadable (unsurprisingly). Is this impossible to get working? Or am I being a moron and there's actually a super obvious fix to this?

Is the Decrypter useable with Safari

If someone has a Safari Browser, please tell me if it works. It would be super kind of you

(If not, please be detailed what doesn't work etc)

Is the Decrypter useable with Opera

If someone has the Opera Browser, please tell me if it works. It would be super kind of you

(If not, please be detailed what doesn't work etc)

Can't find Decryption code.

Hello there. There is problem with this game. https://nemlei.itch.io/the-coffin-of-andy-and-leyley
I tried using your site, to decrypt PNG, but they are not open properly.
I tried to find Decryption code manually in system.json (find d41d8cd98f00b204e9800998ecf8427e but seems code is "fake") and in rpg_core.js (find Decrypter.readEncryptionkey = function(){ this._encryptionKey = $dataSystem.encryptionKey.split(/(.{2})/).filter(Boolean);)
Gonna send also system.json and rpg_core.js

files.zip

I hope you can help me)

File-Header is messed up

I've got an E-Mail of somebody who get only cryptic stuff as decrypt-result. It seems that the file is decrypted but the header is messed up.

I asked for files to reproduce the problem but for me it was decrypted like normal. Maybe some other have the same issue please tell me here!

The bad result look like this:
`‰PNG

���
IHDR�� °�� Ð ���€ ‰¯��� pHYs�� Ä�� Ä •+ ��9ìiTXtXML:com.adobe.xmp�����
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c132 79.159284, 2016/04/19-13:13:40 ">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:xmp="http://ns.adobe.com/xap/1.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/"
xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#"
xmlns:tiff="http://ns.adobe.com/tiff/1.0/"
xmlns:exif="http://ns.adobe.com/exif/1.0/">
xmp:CreatorToolAdobe Photoshop CC 2015.5 (Windows)</xmp:CreatorTool>
xmp:CreateDate2016-07-13T00:34:07+02:00</xmp:CreateDate>
xmp:ModifyDate2016-07-13T00:37+02:00</xmp:ModifyDate>
xmp:MetadataDate2016-07-13T00:37+02:00</xmp:MetadataDate>
dc:formatimage/png</dc:format>
photoshop:ColorMode3</photoshop:ColorMode>
xmpMM:InstanceIDxmp.iid:5e95182a-00f0-6547-87c8-7448816dbccc</xmpMM:InstanceID>
xmpMM:DocumentIDadobe:docid:photoshop:1be91543-4881-11e6-a4c6-f9df7db8ff39</xmpMM:DocumentID>
xmpMM:OriginalDocumentIDxmp.did:f215f640-69ff-bc4f-9f59-da40c09785c5</xmpMM:OriginalDocumentID>
xmpMM:History
rdf:Seq
<rdf:li rdf:parseType="Resource">
stEvt:actioncreated</stEvt:action>
stEvt:instanceIDxmp.iid:f215f640-69ff-bc4f-9f59-da40c09785c5</stEvt:instanceID>
stEvt:when2016-07-13T00:34:07+02:00</stEvt:when>
stEvt:softwareAgentAdobe Photoshop CC 2015.5 (Windows)</stEvt:softwareAgent>
</rdf:li>
<rdf:li rdf:parseType="Resource">
stEvt:actionsaved</stEvt:action>
stEvt:instanceIDxmp.iid:5e95182a-00f0-6547-87c8-7448816dbccc</stEvt:instanceID>
stEvt:when2016-07-13T00:37+02:00</stEvt:when>
stEvt:softwareAgentAdobe Photoshop CC 2015.5 (Windows)</stEvt:softwareAgent>
stEvt:changed/</stEvt:changed>
</rdf:li>
</rdf:Seq>
</xmpMM:History>
tiff:Orientation1</tiff:Orientation>
tiff:XResolution960000/10000</tiff:XResolution>
tiff:YResolution960000/10000</tiff:YResolution>
tiff:ResolutionUnit2</tiff:ResolutionUnit>
exif:ColorSpace65535</exif:ColorSpace>
exif:PixelXDimension1200</exif:PixelXDimension>
exif:PixelYDimension720</exif:PixelYDimension>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>`

Opening an image in browser

I'm unsure it's a bug or not but whenever I restore an image file and click view it will always open another tab full of moon runes. Downloading the img works fine but I don't want to download the imgs sometimes

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.