@@ -190,6 +190,7 @@ static struct option long_options[] = {
190
190
{"max-payload" , optional_argument , 0 , '|' },
191
191
{"fake-from-hex" , required_argument , 0 , 'u' },
192
192
{"fake-gen" , required_argument , 0 , 'j' },
193
+ {"fake-resend" , required_argument , 0 , 't' },
193
194
{"debug-exit" , optional_argument , 0 , 'x' },
194
195
{0 , 0 , 0 , 0 }
195
196
};
@@ -952,6 +953,15 @@ int main(int argc, char *argv[]) {
952
953
puts ("WARNING: fake generator has failed!" );
953
954
}
954
955
break ;
956
+ case 't' : // --fake-resend
957
+ fakes_resend = atoub (optarg , "Fake resend parameter error!" );
958
+ if (fakes_resend == 1 )
959
+ puts ("WARNING: fake-resend is 1, no resending is in place!" );
960
+ else if (!fakes_resend )
961
+ puts ("WARNING: fake-resend is 0, fake packet mode is disabled!" );
962
+ else if (fakes_resend > 100 )
963
+ puts ("WARNING: fake-resend value is a little too high, don't you think?" );
964
+ break ;
955
965
case 'x' : // --debug-exit
956
966
debug_exit = true;
957
967
break ;
@@ -1005,6 +1015,8 @@ int main(int argc, char *argv[]) {
1005
1015
" would be sent on every request in the command line argument order.\n"
1006
1016
" --fake-gen <value> Generate random-filled fake packets for Fake Request Mode, value of them\n"
1007
1017
" (up to 30).\n"
1018
+ " --fake-resend <value> Send each fake packet value number of times.\n"
1019
+ " Default: 1 (send each packet once).\n"
1008
1020
" --max-payload [value] packets with TCP payload data more than [value] won't be processed.\n"
1009
1021
" Use this option to reduce CPU usage by skipping huge amount of data\n"
1010
1022
" (like file transfers) in already established sessions.\n"
@@ -1065,7 +1077,8 @@ int main(int argc, char *argv[]) {
1065
1077
"Fake requests, wrong checksum: %d\n" /* 18 */
1066
1078
"Fake requests, wrong SEQ/ACK: %d\n" /* 19 */
1067
1079
"Fake requests, custom payloads: %d\n" /* 20 */
1068
- "Max payload size: %hu\n" , /* 21 */
1080
+ "Fake requests, resend: %d\n" /* 21 */
1081
+ "Max payload size: %hu\n" , /* 22 */
1069
1082
do_passivedpi , do_block_quic , /* 1 */
1070
1083
(do_fragment_http ? http_fragment_size : 0 ), /* 2 */
1071
1084
(do_fragment_http_persistent ? http_fragment_size : 0 ),/* 3 */
@@ -1087,8 +1100,9 @@ int main(int argc, char *argv[]) {
1087
1100
do_auto_ttl ? auto_ttl_max : 0 , ttl_min_nhops ,
1088
1101
do_wrong_chksum , /* 18 */
1089
1102
do_wrong_seq , /* 19 */
1090
- fakes_count , /* 20 */
1091
- max_payload_size /* 21 */
1103
+ fakes_count , /* 20 */
1104
+ fakes_resend , /* 21 */
1105
+ max_payload_size /* 22 */
1092
1106
);
1093
1107
1094
1108
if (do_fragment_http && http_fragment_size > 2 && !do_native_frag ) {
0 commit comments