• Welcome to Valhalla Legends Archive.
 

ULONGLONG in PHP?

Started by Mystical, February 17, 2009, 04:42 AM

Previous topic - Next topic

Mystical

0x1A
BNLS_VERSIONCHECKEX2

(DWORD) Product ID.*
(DWORD) Flags.**
(DWORD) Cookie.
(ULONGLONG) Timestamp for version check archive.
(STRING) Version check archive filename.
(STRING) Checksum formula


anyone know how i can mimic the ULONGLONG in php? I'm a bit stumped.

Hdx

I don't think PHP supports 64-bit ints, if not, just treat it as a set of 2 32-bit ints.  Its jsut the filetime, not really used for anything.

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

MyndFyre

Quote from: Hdx on February 17, 2009, 09:27 AM
I don't think PHP supports 64-bit ints, if not, just treat it as a set of 2 32-bit ints.  Its jsut the filetime, not really used for anything.
You're correct; it does not.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

bulletproof tiger

A FILETIME is defined as ...


typedef struct _FILETIME {
  DWORD dwLowDateTime;
  DWORD dwHighDateTime;
} FILETIME,
*PFILETIME;


... per MSDN.

MyndFyre

Quote from: chyea on February 17, 2009, 04:22 PM
A FILETIME is defined as ...


typedef struct _FILETIME {
  DWORD dwLowDateTime;
  DWORD dwHighDateTime;
} FILETIME,
*PFILETIME;


... per MSDN.

That definition is written in that manner because, back in the day, there wasn't support in C compilers for __int64.  While it's technically accurate it really doesn't provide any meaningful value to someone who's trying to reverse-engineer the actual date, other than to say that you could possibly translate with some fancy bit math.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

bulletproof tiger

#5
Quote from: MyndFyre[vL] on February 17, 2009, 05:46 PM
Quote from: chyea on February 17, 2009, 04:22 PM
A FILETIME is defined as ...


typedef struct _FILETIME {
  DWORD dwLowDateTime;
  DWORD dwHighDateTime;
} FILETIME,
*PFILETIME;


... per MSDN.

That definition is written in that manner because, back in the day, there wasn't support in C compilers for __int64.  While it's technically accurate it really doesn't provide any meaningful value to someone who's trying to reverse-engineer the actual date, other than to say that you could possibly translate with some fancy bit math.

Well, thank god the reverse engineering here has already been done, eh? That definition can be recreated in PHP fairly easily, I think.

Hdx

Huah reverse engineering?
Its a 64-bit unsigned int. If your language can not handle that large of a number, split it up, this number in particular is really of no use {unless you're going to download the file from bnftp} so does it really matter?

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

Barabajagal

QuoteThe size of an integer is platform-dependent, although a maximum value of about two billion is the usual value (that's 32 bits signed). PHP does not support unsigned integers. Integer size can be determined using the constant PHP_INT_SIZE, and maximum value using the constant PHP_INT_MAX since PHP 4.4.0 and PHP 5.0.5.
Fully documented language FTW