rand() & random() correspondance

Hello, we are having a tournament challenge in a class I am taking. We are encouraged to find exploits and vulnerabilities in the source code.

One thing that would help me is if I could grab the values of the random() function that the code is running. However I only have access to the rand() function from within the code. It is a simulator for assembly.

Both functions are seeded with time(NULL) at the same time.

I can grab the output of the rand() function at anytime from within my assembly program, however my question is: Since both rand() and random() are seeded with the same value, is there a correspondence between the output of both functions? I want to be able to predict the output of random() from the output of rand().

Is this possible?
Since you know the program uses random() and you can know the seed, why not just get the source code for random()? Then you'll know exactly what values it returns. Otherwise, if rand() and random() don't use the same generator function, you probably won't be able to predict random() given rand().
Topic archived. No new replies allowed.