|
发表于 2015-1-8 12:05:19
|
显示全部楼层
本帖最后由 RoyalFlare 于 2015-1-8 12:08 编辑
转载TheHelper网站的MPQ加密方法教程
注意下面这行 常用的地图加密工具修改w3x文件的文件头信息采用下列方法
Part 2 - Other Map Protection Techniques.
1) Damaging the MPQ headersize information.
A Warcraft 3 map is like a zip file. You have first a 512 bytes big map header with some information. Then you have a MPQ archive attached. The MPQ archive contains all the numerous files needed for a map. The first 4 bytes of the MPQ file are the identifier. It can be read as 'MPQ'. The next four bytes are the header size, which is always hex 0x20 00 00 00. Clever map protectors now change the size from 0x20 00 00 00 to a random number which can look like this (mine) for example: hex 0xG6 RE A2 16. Most MPQ applications now cannot open the MPQ archive anymore because of that wrong size entry. Warcraft 3 seems to ignore false header size entries, so those maps still run in warcraft 3.
2) Deleting the war3map.w3c, war3map.w3s, war3map.w3r, .war3mapunits.doo files.
war3map.w3c stores the camera settings for the world editor. war3map.w3s stores the sounds used by a map world editor. war3map.w3r defines the regions used in a map for the world editor.
All those files are also only used by the world editor (WE only files) and can be easily regenerated by the war3map.j file. Damaging the war3map.j file can reduce chances of restoration.
3) Hiding the war3map.j file (Alternative to damaging the war3map.j file, IF it's not an .xxx file)
Some clever map protectors figured out a way to hide the war3map.j file, so you cannot extract it easily with some programs (Good). Regular map files contain the war3map.j file directly in the root directory. The good map protectors figured out that a map still works if the file is moved into a directory called "Scripts\".
4) Scrambling the war3map.j file (Another alternative)
Some map protectors rename all the variables and function names with random numbers. This renders the war3map.j file very hard to read by normal people.
原帖地址 http://www.thehelper.net/threads ... p-protection.49287/
@actboy168 @yxxiaobin |
|