Go Back   BWHacks > Development > Reverse Engineering > Code Snippets and Tutorials

Code Snippets and Tutorials The place for open source releases, great information, and tutorials written by other members.

Reply
 
LinkBack Thread Tools

Old 05-26-2007, 07:04 PM   #61 (permalink)
arpsmack

Advocate
 
arpsmack's Avatar
 
Join Date: Feb 2005
Posts: 330
arpsmack is a jewel in the rough
Default

Quote:
Originally Posted by LCSBSSRHXXX View Post
Actually looking back on it, it's writing &H2 over &H8 so it goes from
TOKEN_QUERY to TOKEN_ADJUST_PRIVILEGES
And not what was posted before.
Interesting...

The test:

Code:
#include <windows.h>

int main() {
   int x = TOKEN_QUERY;
   printf("TOKEN_QUERY == %d == %#X\n", x, x);

   x = TOKEN_ADJUST_PRIVILEGES;
   printf("TOKEN_ADJUST_PRIVILEGES == %d == %#X\n", x, x);

   x = TOKEN_DUPLICATE;
   printf("TOKEN_DUPLICATE == %d == %#X\n", x, x);

   return 0;
}
The output:
Code:
TOKEN_QUERY == 8 == 0x8
TOKEN_ADJUST_PRIVILEGES == 32 == 0x20
TOKEN_DUPLICATE == 2 == 0x2
And it appears that a value of 2 is indeed TOKEN_DUPLICATE in this context, as I had originally stated. Does your compiler provide different definitions for these constants? I verified these with both the MinGW and the MS Visual C++ compiler headers.
arpsmack 15 0FF11|\|3   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Advertisement


Old 05-26-2007, 11:05 PM   #62 (permalink)
SC_Modder
Loading javascript...
Senior Member
Moderator

Inquisitor
 
SC_Modder's Avatar
 
Join Date: Nov 2004
Posts: 4,523
SC_Modder has a reputation beyond reputeSC_Modder has a reputation beyond reputeSC_Modder has a reputation beyond reputeSC_Modder has a reputation beyond reputeSC_Modder has a reputation beyond reputeSC_Modder has a reputation beyond reputeSC_Modder has a reputation beyond reputeSC_Modder has a reputation beyond reputeSC_Modder has a reputation beyond reputeSC_Modder has a reputation beyond reputeSC_Modder has a reputation beyond repute
Send a message via AIM to SC_Modder
Default

Keep in mind they are bit flags, so multiple bits could of simutaneously been set.
__________________
AaronOpfer.com - My music
SC_Modder 15 0FF11|\|3   Reply With Quote

Old 05-27-2007, 12:25 AM   #63 (permalink)
arpsmack

Advocate
 
arpsmack's Avatar
 
Join Date: Feb 2005
Posts: 330
arpsmack is a jewel in the rough
Default

Agreed, however simple knowledge of the powers of 2 tells me that isn't the case when changing a "push 8" to a "push 2".
arpsmack 15 0FF11|\|3   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Advertisement

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[C++] DLL Injection AliasXNeo Programming 25 09-23-2008 11:00 PM
[Starcraft] Host Hack v1.4 707 Old downloads 91 07-28-2008 06:34 PM
[Starcraft] Xtazy 1.7.3 Zephyrix Old downloads 93 05-18-2008 11:52 AM
[Starcraft] Simple .dll injection Tutorial Dev-C++ zonemikel Starcraft Hacking Related 5 11-22-2007 08:05 PM
Issues with drugs. Training-Name ICG 30 11-04-2005 10:24 PM


All times are GMT. The time now is 12:51 AM.


vBulletin style developed by Transverse Styles

Powered by vBulletin Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
Copyright © 2004-2008 BWHacksAd Management by RedTyger