Welcome, Guest. Please login or register.
Did you miss your activation email?
September 09, 2010, 11:02 am
Home | Help | Search | Calendar | Login | Register

Valhalla Legends Forum  |  Programming  |  Battle.net Bot Development (Moderators: Spht, Arta, Kp, MyndFyre, iago)  |  Topic: ULONGLONG in PHP?
« previous next »
Pages: [1] Print
Author Topic: ULONGLONG in PHP?  (Read 817 times)
Mystical
Marshall
***
Offline

Posts: 789


What is your malfunction?

View Profile WWW
« on: February 17, 2009, 04:42 am »

Code: [Select]
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.
Logged
Hdx
Hearthman
****
Offline

Posts: 1299


<3 0xFE :')

View Profile WWW
« Reply #1 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.
Logged
MyndFyre
Moderator
King
*****
Offline

Posts: 4748


The wait is over.

View Profile WWW
« Reply #2 on: February 17, 2009, 10:30 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.
Logged
Quote
Every 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?

MyndFyre.747 on Battle.net 2.0

You've just located global warming.
bulletproof tiger
Warrior
**
Offline

Posts: 111


View Profile
« Reply #3 on: February 17, 2009, 04:22 pm »

A FILETIME is defined as ...

Code: [Select]
typedef struct _FILETIME {
  DWORD dwLowDateTime;
  DWORD dwHighDateTime;
} FILETIME,
 *PFILETIME;

... per MSDN.
Logged
MyndFyre
Moderator
King
*****
Offline

Posts: 4748


The wait is over.

View Profile WWW
« Reply #4 on: February 17, 2009, 05:46 pm »

A FILETIME is defined as ...

Code: [Select]
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.
Logged
Quote
Every 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?

MyndFyre.747 on Battle.net 2.0

You've just located global warming.
bulletproof tiger
Warrior
**
Offline

Posts: 111


View Profile
« Reply #5 on: February 18, 2009, 12:05 am »

A FILETIME is defined as ...

Code: [Select]
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.
« Last Edit: February 18, 2009, 12:06 am by chyea » Logged
Hdx
Hearthman
****
Offline

Posts: 1299


<3 0xFE :')

View Profile WWW
« Reply #6 on: February 18, 2009, 12:08 am »

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?
Logged
Barabajagal
Guest
« Reply #7 on: February 18, 2009, 01:34 am »

Quote
The 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
Logged
Pages: [1] Print 
Valhalla Legends Forum  |  Programming  |  Battle.net Bot Development (Moderators: Spht, Arta, Kp, MyndFyre, iago)  |  Topic: ULONGLONG in PHP? « previous next »
 


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.166 seconds with 17 queries.