tcpliveplay_opts.def 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. autogen definitions options;
  2. copyright = {
  3. date = "2012";
  4. owner = "Yazan Siam";
  5. type = "bsd";
  6. author = <<- EOText
  7. Copyright 2012 Yazan Siam
  8. For support please use the tcpreplay-users@lists.sourceforge.net mailing list.
  9. The latest version of this software is always available from:
  10. http://tcpreplay.appneta.com
  11. EOText;
  12. };
  13. package = "tcpliveplay";
  14. prog-name = "tcpliveplay";
  15. prog-title = "Replays network traffic stored in a pcap file on live networks using new TCP connections";
  16. long-opts;
  17. gnu-usage;
  18. help-value = "H";
  19. save-opts-value = "";
  20. load-opts-value = "";
  21. argument = "<eth0/eth1> <file.pcap> <Destination IP [1.2.3.4]> <Destination mac [0a:1b:2c:3d:4e:5f]> <'random' dst port OR specify dport #>";
  22. config-header = "config.h";
  23. include = "#include \"defines.h\"\n"
  24. "#include \"tcpliveplay.h\"\n"
  25. "#include \"common.h\"\n"
  26. "#include \"config.h\"\n"
  27. "#include \"common/sendpacket.h\"\n"
  28. "#include \"send_packets.h\"\n"
  29. "#include <stdlib.h>\n"
  30. "#include <string.h>\n"
  31. "#include <stdbool.h>\n"
  32. "#include <sys/types.h>\n"
  33. "#include <unistd.h>\n";
  34. homerc = "$$/";
  35. #ifdef TCPREPLAY_EDIT
  36. #include tcpedit/tcpedit_opts.def
  37. #endif
  38. explain = <<- EOExplain
  39. This program, 'tcpliveplay' replays a captured set of packets using new TCP
  40. connections with the captured TCP payloads against a remote host in order to
  41. do comprehensive vulnerability testing.
  42. EOExplain;
  43. detail = <<- EODetail
  44. The basic operation of tcpliveplay is it rewrites the given pcap file
  45. in a scheduled event format and responds with the appropriate packet if
  46. the remote host meets tcp protocal's SEQ/ACK expectation. Once expectations
  47. are met, then the local packets are sent with the same payload except with
  48. new tcp SEQ & ACK numbers meeting the response from the remote hose.
  49. The input pcap file are rewritten to start at the first encounter of the
  50. SYN packet for correct operation making this packet be the first action in
  51. the event schedule of local host doing the replay.
  52. For more details, please see the Tcpreplay Manual at:
  53. http://tcpreplay.appneta.com
  54. EODetail;
  55. man-doc = <<- EOMan
  56. .SH "SIGNALS"
  57. tcpliveplay understands the following signals:
  58. @enumerate
  59. @item @var{SIGUSR1}
  60. Suspend tcpliveplay
  61. @item @var{SIGCONT}
  62. Restart tcpliveplay
  63. @end enumerate
  64. .SH "SEE ALSO"
  65. tcpdump(1), tcpprep(1), tcprewrite(1), tcpreplay(1)
  66. .SH "BUGS"
  67. tcpliveplay can only send packets as fast as your computer's interface,
  68. processor and system bus will allow.
  69. If the remote host responds differently than expected (meaning differently
  70. than remote captured data) due to network changes then the replay abort
  71. and ask you to try again.
  72. The replay only modifies layer 2 and 3 of each packet during the replay.
  73. The payload is replayed exactly the same as the original capture.
  74. Timing may be an issue because the tcpliveplay sends the appropriate packet
  75. once the remote host's packet meets the correct expectation.
  76. EOMan;
  77. /*
  78. * Debugging
  79. */
  80. flag = {
  81. ifdef = DEBUG;
  82. name = dbug;
  83. value = d;
  84. arg-type = number;
  85. max = 1;
  86. immediate;
  87. arg-range = "0->5";
  88. arg-default = 0;
  89. descrip = "Enable debugging output";
  90. doc = <<- EOText
  91. If configured with --enable-debug, then you can specify a verbosity
  92. level for debugging output. Higher numbers increase verbosity.
  93. EOText;
  94. };
  95. /*
  96. * Outputs: -i, -I
  97. */
  98. flag = {
  99. name = version;
  100. value = V;
  101. descrip = "Print version information";
  102. flag-code = <<- EOVersion
  103. fprintf(stderr, "tcpliveplay version: %s (build %s)", VERSION, git_version());
  104. #ifdef DEBUG
  105. fprintf(stderr, " (debug)");
  106. #endif
  107. fprintf(stderr, "\n");
  108. fprintf(stderr, "Copyright 2012 by Yazan Siam <tcpliveplay@gmail.com>\n");
  109. #ifdef HAVE_LIBDNET
  110. fprintf(stderr, "Compiled against libdnet: %s\n", LIBDNET_VERSION);
  111. #else
  112. fprintf(stderr, "Not compiled with libdnet.\n");
  113. #endif
  114. #ifdef HAVE_WINPCAP
  115. fprintf(stderr, "Compiled against winpcap: %s\n", get_pcap_version());
  116. #elif defined HAVE_PF_RING_PCAP
  117. fprintf(stderr, "Compiled against PF_RING libpcap: %s\n", get_pcap_version());
  118. #else
  119. fprintf(stderr, "Compiled against libpcap: %s\n", get_pcap_version());
  120. #endif
  121. #ifdef ENABLE_64BITS
  122. fprintf(stderr, "64 bit packet counters: enabled\n");
  123. #else
  124. fprintf(stderr, "64 bit packet counters: disabled\n");
  125. #endif
  126. #ifdef ENABLE_VERBOSE
  127. fprintf(stderr, "Verbose printing via tcpdump: enabled\n");
  128. #else
  129. fprintf(stderr, "Verbose printing via tcpdump: disabled\n");
  130. #endif
  131. fprintf(stderr, "Injection method: %s\n", sendpacket_get_method(NULL));
  132. exit(0);
  133. EOVersion;
  134. doc = "";
  135. };
  136. flag = {
  137. name = less-help;
  138. value = "h";
  139. immediate;
  140. descrip = "Display less usage information and exit";
  141. flag-code = <<- EOHelp
  142. USAGE(EXIT_FAILURE);
  143. EOHelp;
  144. doc = "";
  145. };