diff --git a/common.h b/common.h index 998abfa..9c78a41 100644 --- a/common.h +++ b/common.h @@ -39,10 +39,12 @@ #endif #include +#include #if defined(__MINGW32__) #include #include + typedef unsigned char u_int8_t; typedef unsigned short u_int16_t; typedef unsigned int u_int32_t; @@ -51,7 +53,6 @@ typedef int socklen_t; #include #include #include -#include #include #endif diff --git a/network.cpp b/network.cpp index ee68990..9279b5c 100644 --- a/network.cpp +++ b/network.cpp @@ -1863,7 +1863,7 @@ int send_raw_tcp(raw_info_t &raw_info,const char * payload, int payloadlen) { tcph->urg = 0; //tcph->window = htons((uint16_t)(1024)); - tcph->window = htons((uint16_t) (receive_window_lower_bound + random() % receive_window_random_range)); + tcph->window = htons((uint16_t) (receive_window_lower_bound + get_true_random_number() % receive_window_random_range)); tcph->check = 0; //leave checksum 0 now, filled later by pseudo header tcph->urg_ptr = 0; @@ -2802,7 +2802,7 @@ int after_send_raw0(raw_info_t &raw_info) send_info.seq += raw_info.send_info.data_len; //////////////////modify } else if (seq_mode == 2) { - if (random() % 5 == 3) + if (get_true_random_number() % 5 == 3) send_info.seq += raw_info.send_info.data_len; //////////////////modify } else if(seq_mode==3||seq_mode==4)