1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Spazzler -- WC3 Map Corruptor

Discussion in 'Warcraft Editing Tools' started by FatherSpace, Jan 27, 2010.

  1. FatherSpace

    FatherSpace

    Joined:
    Dec 8, 2009
    Messages:
    5
    Resources:
    0
    Resources:
    0
    Content copied from here

    ------------------------------

    This tool corrupts an MPQ to the point that only WC3 and WE can view it, as far as I've seen. Even MPQ Editor and RMPQex cannot read it.

    It is written in Python (this version is, at least. I lost the old version in C#). To use it, you need Python 2.6ish.

    Windows Instructions
    1) Put spazzler.pyc in your Python26 folder.
    2) Run python.exe
    3) Type "import spazzler"
    4) Type "spazzler.protect(inmap,outmap)"
    inmap: Input file name, without ".w3x"
    outmap: Output file name, without ".w3x"
    NOTE: If outmap begins with +, outmap will be inmap + the rest of outmap
    If it ends with + and did not begin with +, it will prepend all but the + to inmap.
    e.g. ("input","+_spazzler") will output "input_spazzler.w3x"

    Linux Instructions
    1) In Terminal, cd to the folder with spazzler.pyc in it.
    2) Type "python" in Terminal.
    3) Follow steps 3-4 from the Windows instructions.


    If you encounter any problems with it, aside from the fact that it's in Python, please let me know.
    If you used it and like it, please give thanks or something.
    If you want the source, PM me, though I won't be giving it to noobs who are just trying to steal my work.

    EDIT: Added a demo map.
     

    Attached Files:

    Last edited: Jan 30, 2010
  2. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,592
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Can I have a demonstration map?
     
  3. FatherSpace

    FatherSpace

    Joined:
    Dec 8, 2009
    Messages:
    5
    Resources:
    0
    Resources:
    0
    Alright, I uploaded it to the first post.
     
  4. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,592
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Seems quite effective (atleast in the map provided as I have not downloaded the tool).

    However any functionality of this at preventing map interaction is due to poorly programmed MPQ editors.

    Can we have some source code?

    Ok rough testing of the provided map shows this system works by changing values in the MPQ header to ones used by WoW. As a lot of MPQ editors can open both WoW and WC3 mpqs it tries to actually open a WC3 archive as a WoW one. However as WC3 only knows about WC3 archives it ignores the WoW header and so continues to open the archive properly as the rest of the data in the header is WC3. On top of that there are 1 or 2 other value descrepiencies which may help but im still looking into them.

    Further eximaniation yields that this is not the only damage done to the map. The fact that there is an imporbable number of blocks (3226625) in the demo map provided means that you must have damaged the block section in some way.
    The "SPAZZLER" ASCII text located 1540 bytes into the mpq archive proves that you have also damaged the data block table.
     
    Last edited: Jan 30, 2010
  5. FatherSpace

    FatherSpace

    Joined:
    Dec 8, 2009
    Messages:
    5
    Resources:
    0
    Resources:
    0
    Well, I just added everything I've found that prevents non-Storm libraries from reading maps, and I haven't seen any MPQ editors that don't use Storm (not even StormLib) that can read these maps.
     
  6. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,592
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    It is pretty impresive the source code, especially since you use only 3 functions.
    revbyte
    tablecount
    protect
     
  7. FatherSpace

    FatherSpace

    Joined:
    Dec 8, 2009
    Messages:
    5
    Resources:
    0
    Resources:
    0
    Well, all the program does is read the file as binary (otherwise it can't read some characters, and treats them as EOF or something) and implement the protections on that, then write it to a new file, again as binary. Including docstrings, it's only 40 lines of code, and even that could be shortened if I really cared to.
     
  8. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,592
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    I know the code, I do have the source. Still I have to admit you certainlly prove how crap most MPQ editors are LOL.

    People really need to make a proper more robust MPQ editor.
     
  9. FatherSpace

    FatherSpace

    Joined:
    Dec 8, 2009
    Messages:
    5
    Resources:
    0
    Resources:
    0
    The problem with MPQ editors is they're made for general use (i.e. any MPQs, not just WC3 maps) so they don't read MPQs just as Storm does.
     
  10. Akolyt0r

    Akolyt0r

    Joined:
    Dec 20, 2008
    Messages:
    53
    Resources:
    3
    Icons:
    3
    Resources:
    3
    Funny tool, but still very easy to break this protection
    wrote something myself, just for fun (~25 lines python)
     
    Last edited: May 28, 2010
  11. AnonymousPro

    AnonymousPro

    Joined:
    Nov 18, 2012
    Messages:
    311
    Resources:
    0
    Resources:
    0
    This impressive tool is now openable by MPQ editors
    Now people use BOBA or MPQ.MoonLight
    Boba(Somj) seems more troublesome to crack and.. it's all deprotectable hmm
     
    Last edited: Sep 11, 2016
  12. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,592
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Use MPQEdit and turn on legacy compatibility mode (read only).