Government Security
Network Security Resources

Jump to content

Photo

Randomizer For Winxp

- - - - - perl
  • Please log in to reply
No replies to this topic

#1 belgther

belgther

    Sergeant First Class

  • Sergeant Major
  • 650 posts

Posted 07 March 2005 - 07:47 AM

#include <stdlib.h>
#include <time.h>

srand(time(NULL)*time(NULL)*time(NULL)*time(NULL)*time(NULL)*time(NULL));

int randomize()
{   
    int x;    
    x=rand();
    srand(x);    
return x;
}

well, it won't compile so, of course, but i hope it will give you an idea how to write a randomizer...

BTW, post your solutions if you have some... I wrote it for people who suffer under rand() command that doesn't do its job properly... i had the problem and solved with it...
"The wisest one is the one who knows himself/herself." Quote of the life
belgther... aka... belgther





Also tagged with one or more of these keywords: perl