[Script] A Python Script for Fixing a Maps Encryption

This forum is for files only, Utilities and Hacks go here, not skins.
TfAv1228




Miner Logistician Droplet

Posts: 276
Joined: Sun Sep 05, 2004 4:40 pm

[Script] A Python Script for Fixing a Maps Encryption

Post by TfAv1228 »

Here is a simple python script for fixing encryption it takes about 30 seconds to do but with abit of studying it can be converted to be used in XBMC if anyone wants to take up the challenge i will attempt o make this faster and better in the near future

FixHalo2Encryption(32ByteBuf).py

Code: Select all

import struct;
sumint=0;
x=2048;
BinRW=open(raw_input("What is the map's filename? "), "r+b");
BinRW.seek(8);
mapsize=struct.unpack("l", BinRW.read(4))[0];
BinRW.seek(2048);
while mapsize-x>32:
    x+=32;
    int1, int2, int3, int4, int5, int6, int7, int8 = struct.unpack("llllllll", BinRW.read(32));
    sumint^=int1^int2^int3^int4^int5^int6^int7^int8;
while x<mapsize: 
   x+=4; 
   sumint^=(struct.unpack("l", BinRW.read(4))[0]); 
BinRW.seek(720);
BinRW.write(struct.pack("l", sumint));
BinRW.close;
endit=raw_input("Done! The New Encryption Is " + hex(sumint)+"! Thanks TfAv1228 you are soo 1337!");
exit;
thats it do what you want

*Update the previous script reaquired trhe map to be a multiple of 8 this one only requires a multiple of 4

*update used a 32Byte(8 longs) Buffer per loop instead of doing 1 long at a time it now does 8 on my slow ass comp this took 17 seconds
Last edited by TfAv1228 on Thu Oct 13, 2005 10:59 am, edited 4 times in total.
Sig breaks rules, read the rules before reposting.
CronoTrig9500





Posts: 49
Joined: Wed Aug 25, 2004 6:18 pm
Location: waiting in line for the xbox360

Post by CronoTrig9500 »

yay python! finally a programming language i know! good job TfAv
.......
Not aimed at anyone, just an observation, but
im guessing making map signers is the new "in" thing to do huh?
about 8 of em on the forum recently
tjc2k4




Construct Socialist Golden Age Magic Era
Pi Coagulator Eureka Pyre
Literarian 100

Posts: 150
Joined: Wed Nov 12, 2003 3:21 am

Post by tjc2k4 »

Edit: I'm such an asshole..
Last edited by tjc2k4 on Thu Oct 13, 2005 7:48 pm, edited 1 time in total.
Blah blah blah
The Swamp Fox




Socialist Construct Revivalist Golden Age
Translator Playscaper Enthraller Bloodhound
Illusionist Eureka Wave Scorched Earth
Wordewatician 250

Posts: 410
Joined: Tue Feb 24, 2004 11:22 am
Location: Cantaloupe!

Post by The Swamp Fox »

Did you say it takes 30 seconds to run that script on a map?? Talk about a worthless language! 0_0
Everything in this signature is false.
User avatar
xbox7887




Socialist Coagulator Decryptor Advisor
Eureka Commentator Wave Scorched Earth

Posts: 2160
Joined: Mon Dec 27, 2004 6:19 pm
Location: New Lenox, Illinois
Contact:

Post by xbox7887 »

lol why did you assign author to a variable when you could of just put it at the end :shock:
zX_Storm





Posts: 22
Joined: Wed Apr 27, 2005 9:01 pm

Post by zX_Storm »

So anybody can change it and think they're cool, cause they 'know' programming, lol. 30 seconds? How'd you test running it, on your pc? That's ridiculous, even for Python O.O
TfAv1228




Miner Logistician Droplet

Posts: 276
Joined: Sun Sep 05, 2004 4:40 pm

Post by TfAv1228 »

like i said it can be converted to use on XBMC i thought maybe somepeople would like to attempt making this usable on the xbox im also just trying to get some people example code to get them started yeah and this language is pretty worthless except for the fact u can make it for xbox and u dont need to know anything about the xbox
xbox7887 wrote:lol why did you assign author to a variable when you could of just put it at the end :shock:
cause i felt like it
Sig breaks rules, read the rules before reposting.
User avatar
neodos
Readers Club




Artisan Miner

Posts: 1394
Joined: Thu Aug 12, 2004 11:57 am

Post by neodos »

:shock: :shock:

Thank you i livoe this script realy usefull because when i cant use the pc and i forgot to resign the maps i cant try my mod lol

Why not Ch2r for XBMc? :lol:
User avatar
shade45




Translator Artisan Enthraller Logistician
Stylist Wave Firestorm New Age

Posts: 2270
Joined: Fri Apr 01, 2005 1:04 pm

Post by shade45 »

yeah if this can be converted to xbox it would be a timesaver when u forget to sign a map
Jefff




Socialist Miner Logistician Snitch!
Critic Droplet

Posts: 244
Joined: Sun Oct 24, 2004 5:59 pm

Post by Jefff »

shade45 wrote:yeah if this can be converted to xbox it would be a timesaver when u forget to sign a map
Really? Would it be? For me, uploading a modified map takes approximatly 7 seconds, 10 at the most. Opening up a signing app and reuploading seems like it would be quicker then loading up XBMC, selecting resign map, and waiting for that to finish. If it takes 30 seconds on the computer, how quick will it be on a xbox?
How to Post Correctly
SWYgeW91IGNhbiByZWFkIHRoaXMgeW91IGhhdmUgd2F5IHRvIG11Y2ggdGltZSBvbiB5b3VyIGhhbmRz
TfAv1228




Miner Logistician Droplet

Posts: 276
Joined: Sun Sep 05, 2004 4:40 pm

Post by TfAv1228 »

im not saying for everyday use maybe u have a mapapck that u loaded upo wnet to a lan party and forgot to sign one u have no computer to download resign upload with
Sig breaks rules, read the rules before reposting.
User avatar
shade45




Translator Artisan Enthraller Logistician
Stylist Wave Firestorm New Age

Posts: 2270
Joined: Fri Apr 01, 2005 1:04 pm

Post by shade45 »

Jefff wrote:
shade45 wrote:yeah if this can be converted to xbox it would be a timesaver when u forget to sign a map
For me, uploading a modified map takes approximatly 7 seconds, 10 at the most.
lucky, it takes me like on average 2 minutes to ftp a map
Shalted




Eureka Translator

Posts: 565
Joined: Wed Nov 17, 2004 8:41 am
Location: Vancouver, BC This is where people put their modding team because they feel important.
Contact:

Re: [Script] A Python Script for Fixing a Maps Encryption

Post by Shalted »

TfAv1228 wrote:Here is a simple python script for fixing encryption it takes about 30 seconds to do but with abit of studying it can be converted to be used in XBMC if anyone wants to take up the challenge i will attempt o make this faster and better in the near future

FixHalo2Encryption.py

Code: Select all

import struct;
sumint=0;
x=2048;
BinRW = open((raw_input("What is the map's filename? ")), "r+b");
BinRW.seek(8);
mapsize = (struct.unpack("l", BinRW.read(4))[0]);
BinRW.seek(2048);
while x<mapsize:
	x+=4;
	sumint^=(struct.unpack("l", BinRW.read(4))[0]);
sumstring=struct.pack("l", sumint);
BinRW.seek(720);
BinRW.write(sumstring);
BinRW.close;
endit=raw_input("Done! The New Ecnryption Is " + hex(sumint)+"! Thanks TfAv1228 you are soo 1337!");
exit;
thats it do what you want

*Update the previous script reaquired trhe map to be a multiple of 8 this one only requires a multiple of 4
Hmmm... I was thinking of using python as a plugin for my app.
Last edited by Shalted on Thu Oct 13, 2005 10:51 am, edited 1 time in total.
User avatar
xbox7887




Socialist Coagulator Decryptor Advisor
Eureka Commentator Wave Scorched Earth

Posts: 2160
Joined: Mon Dec 27, 2004 6:19 pm
Location: New Lenox, Illinois
Contact:

Post by xbox7887 »

TfAv1228 wrote:im not saying for everyday use maybe u have a mapapck that u loaded upo wnet to a lan party and forgot to sign one u have no computer to download resign upload with
true :)
halvorsen




Recreator Coagulator

Posts: 315
Joined: Thu Aug 05, 2004 10:49 pm

Post by halvorsen »

so this culd be yoused on a xbox?
TfAv1228




Miner Logistician Droplet

Posts: 276
Joined: Sun Sep 05, 2004 4:40 pm

Post by TfAv1228 »

i am currently trying to convert it to xbmc compatable
Sig breaks rules, read the rules before reposting.
high6




Snitch!

Posts: 451
Joined: Sun Feb 13, 2005 6:09 am

Post by high6 »

tjc2k4 wrote:You have to understand that the Halo 2 modding 'community' seems to be very fad-ish. Once one person does something new, it becomes the latest fad, and is duplicated by everyone who also wants their 15 minutes of fame.
Now, map encryption is by no means new, but people learning to 'program', and I use the term loosely, seems to be. A little while ago the fad seemed to be Control Centers/App Launchers, i.e. a simple program with a huge menu of other programs to launch, or maybe buttons, or some variation thereof.
Obviously a map signer is slightly more complex than a program which simply shells to other people's, but none the less it's a pretty much a beginner's app. :wink:

The only thing I'm afraid of is what happens after they learn to make slightly more complex programs.. will we have 50 versions of Ch2r type/based editors, each with the interface or look being the only difference? Except that maybe some won't actually work, so they'll be less useful than the original Ch2r, but they'll be created and released, just like if you search, you'll find Map Resigners which don't even work, but happened to get released anyway so the author might get a few minutes of fame. :x

The saddest thing about this 'generation' of modders is that they're not learning or trying to do anything new as a community, it's just each trying to repeat things already figured out for them so that they can have their little bit of recognition. I kind of think it's a good reason to release applications as closed source, so there aren't 20 crappier, cloned, wanna-be programs immediately released the following days/weeks by people who want to be the next MonoxideC. 8)

Anyway, it's late, I'm tired. If you're one of those people releasing 10-minute hack-job programs, please think this: "How will releasing this help farther the community?" or "Will this make possible for the community to do/create something they couldn't before?" and if the answer is "It won't.", then keep it to yourself. And "It was just a learning experience for me" isn't a valid arguement; just because you create something doesn't mean you have to release it. Especially when there's already existing things which do what yours does, but better. Maybe your time would be better spent working on mapping tags out by changing values and actually providing new information to the community instead of something it already has. Why does it seem to be a rule that only useless fads catch on? Why couldn't mapping tags and making plugins (any format) with new values be a fad? :(

(I realize there are exceptions to all of this, it was just a general statement)
hey my massmap resigner the one that works isnt crappy i put some time into it and i havent seen it done before
User avatar
neodos
Readers Club




Artisan Miner

Posts: 1394
Joined: Thu Aug 12, 2004 11:57 am

Post by neodos »

Jefff wrote:
shade45 wrote:yeah if this can be converted to xbox it would be a timesaver when u forget to sign a map
Really? Would it be? For me, uploading a modified map takes approximatly 7 seconds, 10 at the most. Opening up a signing app and reuploading seems like it would be quicker then loading up XBMC, selecting resign map, and waiting for that to finish. If it takes 30 seconds on the computer, how quick will it be on a xbox?
My pc dont work so i use the pc of my mother and evrytime there's someone at the pc so when i upload the maps to the xbox and i forgot to resign i can play the :evil:

You understand what i think it can be usefull for XBMC?
tjc2k4




Construct Socialist Golden Age Magic Era
Pi Coagulator Eureka Pyre
Literarian 100

Posts: 150
Joined: Wed Nov 12, 2003 3:21 am

Post by tjc2k4 »

What was I thinking? Assholes don't help people so forget what I said here...
Last edited by tjc2k4 on Thu Oct 13, 2005 7:49 pm, edited 1 time in total.
Blah blah blah
TfAv1228




Miner Logistician Droplet

Posts: 276
Joined: Sun Sep 05, 2004 4:40 pm

Post by TfAv1228 »

tjc2k4 wrote:Arg. I suppose if this thing worked in XBMC it'd be a little different from all the map resigners released recently, but here's an idea if you want it to work on the xbox: OpenXDK?
Since you already bummed the C++ code for resigning a map off SwampFox (and it's not that difficult to port to C, hell, it's not that difficult to create from scratch in C..), you might as well make a .xbe application that allows you to resign maps on the xbox. An OpenXDK version (in C), would be way faster than a python script run through XBMC, plus, you might actually learn something. I personally think this whole thing is a bad idea (since the actual excuse given is rather farfetched; if you forget to sign a map on a PC, then you probably shouldn't be playing with mods in my opinion), but if you're going to try and create an xbox-based map resigner, you might as well do it correctly so that it can evolve to be something more useful...
i might just try that
Sig breaks rules, read the rules before reposting.
Post Reply