Guest User

Untitled

a guest
Jun 17th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <sys/time.h>
  3. time_t
  4. getunixutime()
  5. {
  6. struct timeval tp;
  7. gettimeofday(&tp, NULL);
  8. return tp.tv_usec;
  9. }
  10.  
  11. int
  12. main(int argc, char **argv)
  13. {
  14. FILE *fd;
  15. unsigned char c;
  16.  
  17. fd = fopen("/dev/urandom", "r");
  18. while (1) {
  19. if (getunixutime() % 2)
  20. printf(" ");
  21. printf("%02x", getc(fd));
  22. }
  23.  
  24. fclose(fd);
  25. }
Add Comment
Please, Sign In to add comment