Click here to Skip to main content
15,894,405 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to get output of console program? Pin
Ravi Bhavnani12-May-05 8:10
professionalRavi Bhavnani12-May-05 8:10 
AnswerRe: How to get output of console program? Pin
David Crow12-May-05 8:11
David Crow12-May-05 8:11 
GeneralNeed help with reversing an algorithm Pin
Anonymous12-May-05 7:29
Anonymous12-May-05 7:29 
GeneralRe: Need help with reversing an algorithm Pin
Chris Losinger12-May-05 7:50
professionalChris Losinger12-May-05 7:50 
GeneralRe: Need help with reversing an algorithm Pin
Anonymous12-May-05 8:05
Anonymous12-May-05 8:05 
GeneralRe: Need help with reversing an algorithm Pin
Chris Losinger12-May-05 8:38
professionalChris Losinger12-May-05 8:38 
GeneralRe: Need help with reversing an algorithm Pin
Tom Archer12-May-05 8:51
Tom Archer12-May-05 8:51 
GeneralRe: Need help with reversing an algorithm Pin
Tom Archer12-May-05 9:12
Tom Archer12-May-05 9:12 
I think I've got it now - proving that the get_human functoin can be reversed:
unsigned long get_human_check_id(unsigned long id) 
{
  unsigned long terminalId = (unsigned long)PullTerminalId(id) * 10000;
  unsigned long checkNbr = (unsigned)(id & 0xFFFF);
  return terminalId + checkNbr;
}


okay, lets break it down:

the terminal id part is in bits 20 and up, then scaled up by 10000

the checknumber is in the lower 16 bits.

So to reverse it you need to take :

terminalid / 10000, then shift it left 20 bits

plus

the checknumber.

My first attempt had roughly the right idea, except for that mask.


Cheers,
Tom Archer - Archer Consulting Group

"Eat your brussel sprouts, Junior. There are starving Chinese children American programmers that would kill for that food!"
GeneralRe: Need help with reversing an algorithm Pin
Chris Losinger12-May-05 10:48
professionalChris Losinger12-May-05 10:48 
GeneralRe: Need help with reversing an algorithm Pin
Tom Archer12-May-05 10:56
Tom Archer12-May-05 10:56 
GeneralRe: Need help with reversing an algorithm Pin
Chris Losinger12-May-05 11:11
professionalChris Losinger12-May-05 11:11 
GeneralRe: Need help with reversing an algorithm Pin
Tom Archer12-May-05 11:16
Tom Archer12-May-05 11:16 
GeneralRe: Need help with reversing an algorithm Pin
Chris Losinger12-May-05 13:18
professionalChris Losinger12-May-05 13:18 
GeneralRe: Need help with reversing an algorithm Pin
Anonymous12-May-05 12:25
Anonymous12-May-05 12:25 
GeneralRe: Need help with reversing an algorithm Pin
Priyank Bolia12-May-05 7:50
Priyank Bolia12-May-05 7:50 
GeneralRe: Need help with reversing an algorithm Pin
Kuniva12-May-05 7:54
Kuniva12-May-05 7:54 
GeneralRe: Need help with reversing an algorithm Pin
Anonymous12-May-05 7:55
Anonymous12-May-05 7:55 
GeneralRe: Need help with reversing an algorithm Pin
Alexander M.,13-May-05 1:51
Alexander M.,13-May-05 1:51 
GeneralProblems using the new Platform SDK Pin
Kharfax12-May-05 7:18
Kharfax12-May-05 7:18 
GeneralRe: Problems using the new Platform SDK Pin
Alexander M.,12-May-05 7:25
Alexander M.,12-May-05 7:25 
GeneralRe: Problems using the new Platform SDK Pin
Kharfax12-May-05 7:33
Kharfax12-May-05 7:33 
GeneralRe: Problems using the new Platform SDK Pin
Kharfax12-May-05 7:43
Kharfax12-May-05 7:43 
GeneralRe: Problems using the new Platform SDK Pin
David Crow12-May-05 9:07
David Crow12-May-05 9:07 
GeneralRe: Problems using the new Platform SDK Pin
David Crow12-May-05 8:17
David Crow12-May-05 8:17 
GeneralRe: Problems using the new Platform SDK Pin
Kharfax12-May-05 8:37
Kharfax12-May-05 8:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.