14_obsolete_time.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. diff -Nur dsniff-2.4-old/sshow.c dsniff-2.4/sshow.c
  2. --- dsniff-2.4-old/sshow.c 2009-09-15 00:11:20.578452154 +0300
  3. +++ dsniff-2.4/sshow.c 2009-09-15 00:11:20.762451576 +0300
  4. @@ -224,7 +224,7 @@
  5. if (debug)
  6. printf("- %s -> %s: DATA (%s bytes, %.2f seconds)\n",
  7. s_saddr(ts), s_daddr(ts), s_range(plain_range),
  8. - (float)delay / CLK_TCK);
  9. + (float)delay / CLOCKS_PER_SEC);
  10. if (debug > 1)
  11. print_data(&ts->server, cipher_size);
  12. @@ -273,7 +273,7 @@
  13. if (debug)
  14. printf("- %s <- %s: DATA (%s bytes, %.2f seconds)\n",
  15. s_saddr(ts), s_daddr(ts), s_range(plain_range),
  16. - (float)delay / CLK_TCK);
  17. + (float)delay / CLOCKS_PER_SEC);
  18. if (debug > 1)
  19. print_data(&ts->client, cipher_size);
  20. @@ -302,7 +302,7 @@
  21. if (session->state == 1 &&
  22. #ifdef USE_TIMING
  23. - now - get_history(session, 2)->timestamp >= CLK_TCK &&
  24. + now - get_history(session, 2)->timestamp >= CLOCKS_PER_SEC &&
  25. #endif
  26. session->protocol == 1 &&
  27. (session->history.directions & 7) == 5 &&
  28. diff -Nur dsniff-2.4-old/sshow.c.orig dsniff-2.4/sshow.c.orig
  29. --- dsniff-2.4-old/sshow.c.orig 2009-09-15 00:11:20.579452073 +0300
  30. +++ dsniff-2.4/sshow.c.orig 2009-09-15 00:11:20.561451664 +0300
  31. @@ -217,6 +217,7 @@
  32. {
  33. clock_t delay;
  34. int payload;
  35. + long CLK_TCK= sysconf(_SC_CLK_TCK);
  36. delay = add_history(session, 0, cipher_size, plain_range);
  37. @@ -265,6 +266,7 @@
  38. clock_t delay;
  39. int skip;
  40. range string_range;
  41. + long CLK_TCK= sysconf(_SC_CLK_TCK);
  42. delay = add_history(session, 1, cipher_size, plain_range);