Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Patch time is almost upon us!
#31
Devil's Sunrise Wrote:Just as a notification about prepatchers Fiel make and such:

The way of making the prepatcher in Python is completely harmless if you download the .patch file from Nexon's FTP. Though, I liked the cleaner version better than the other version, because you can easily see that this isn't dangerous:

[spoiler=Wasn't it something like this?]
Code:
import struct
import cStringIO

def Main(pname):
    manpatch = open(pname + '.exe', 'wb')
    base = open('ManualPatch.base', 'rb')
    bdata = base.read()
    base.close()
    manpatch.write(bdata)
    patch = open(pname + '.patch', 'rb')
    pdata = patch.read()
    plen = len(pdata)
    patch.close()
    manpatch.write(pdata)
    manpatch.write(struct.pack('L', plen))
    manpatch.write(struct.pack('L', 0))
    manpatch.write(struct.pack('BBBB', 0xF3, 0xFB, 0xF7, 0xF2))
    manpatch.close()
Main('00057to00058') #input the patch file name without the .patch here
[/spoiler]

How does that work, exactly? You're not writing any TXT file to the patcher. I think you accidentally erased the cStringIO statement since you have that as an import but never call the module in the script. So yeah, otherwise it's close to what you have.

My script I have posted in the pre-patcher thread also does the following things:
1. Creates a verbose patchlog to help detect where errors occur
2. Patch error checking to make sure that the zlib block isn't corrupt
3. Manualpatch.base checking to ensure that the user is using the correct version.
4. Automatic finding of patch files in the current working directory

EDIT: Oops, noticed that you had the length of the notice file as 0. I suppose that would work, but I've never tried it.
Reply


Messages In This Thread
Patch time is almost upon us! - by Fiel - 2008-10-06, 07:13 PM
Patch time is almost upon us! - by Alloy - 2008-10-06, 07:22 PM
Patch time is almost upon us! - by Devil - 2008-10-06, 07:29 PM
Patch time is almost upon us! - by Erich - 2008-10-06, 07:32 PM
Patch time is almost upon us! - by Tamekii - 2008-10-06, 07:33 PM
Patch time is almost upon us! - by Corn - 2008-10-06, 07:43 PM
Patch time is almost upon us! - by Spaz - 2008-10-06, 07:55 PM
Patch time is almost upon us! - by Combattente - 2008-10-06, 08:01 PM
Patch time is almost upon us! - by Erich - 2008-10-06, 08:03 PM
Patch time is almost upon us! - by Fiel - 2008-10-06, 08:05 PM
Patch time is almost upon us! - by IsaacGS - 2008-10-06, 08:19 PM
Patch time is almost upon us! - by jrvillarreal - 2008-10-06, 08:25 PM
Patch time is almost upon us! - by SuGaRnSp1C3 - 2008-10-06, 09:07 PM
Patch time is almost upon us! - by DrRusty - 2008-10-06, 09:11 PM
Patch time is almost upon us! - by Mike - 2008-10-06, 09:35 PM
Patch time is almost upon us! - by Russt - 2008-10-06, 09:41 PM
Patch time is almost upon us! - by Cyadd - 2008-10-06, 10:22 PM
Patch time is almost upon us! - by NoJobNoRules - 2008-10-06, 10:40 PM
Patch time is almost upon us! - by randompeep - 2008-10-06, 10:56 PM
Patch time is almost upon us! - by Chameleonic - 2008-10-07, 02:09 AM
Patch time is almost upon us! - by NoWaizMatt - 2008-10-07, 07:01 AM
Patch time is almost upon us! - by Combattente - 2008-10-07, 07:22 AM
Patch time is almost upon us! - by Fiel - 2008-10-07, 07:38 AM
Patch time is almost upon us! - by Afrobean - 2008-10-07, 08:39 AM
Patch time is almost upon us! - by iamflip - 2008-10-07, 08:39 AM
Patch time is almost upon us! - by Alloy - 2008-10-07, 10:30 AM
Patch time is almost upon us! - by IsaacGS - 2008-10-07, 10:31 AM
Patch time is almost upon us! - by Afrobean - 2008-10-07, 11:25 AM
Patch time is almost upon us! - by Alloy - 2008-10-07, 03:25 PM
Patch time is almost upon us! - by Nikkey - 2008-10-07, 04:46 PM
Patch time is almost upon us! - by Fiel - 2008-10-07, 07:53 PM
Patch time is almost upon us! - by Nikkey - 2008-10-07, 09:02 PM
Patch time is almost upon us! - by Evilince - 2008-10-07, 09:34 PM
Patch time is almost upon us! - by Corn - 2008-10-07, 10:25 PM
Patch time is almost upon us! - by jrvillarreal - 2008-10-07, 11:28 PM
Patch time is almost upon us! - by iamflip - 2008-10-08, 09:36 AM
Patch time is almost upon us! - by GMSInfighter - 2008-10-08, 09:38 AM
Patch time is almost upon us! - by Nikkey - 2008-10-10, 12:21 PM
Patch time is almost upon us! - by randompeep - 2008-10-10, 09:54 PM
Patch time is almost upon us! - by Combattente - 2008-10-13, 06:37 PM
Patch time is almost upon us! - by rako - 2008-10-14, 07:45 PM
Patch time is almost upon us! - by Fiel - 2008-10-14, 07:47 PM
Patch time is almost upon us! - by ahoboandahal - 2008-10-14, 07:57 PM
Patch time is almost upon us! - by Koriz - 2008-10-14, 08:37 PM
Patch time is almost upon us! - by Corn - 2008-10-14, 08:37 PM
Patch time is almost upon us! - by CapnMush - 2008-10-14, 08:56 PM
Patch time is almost upon us! - by JakeAndBake - 2008-12-24, 12:31 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)