fix: add User-agent

fix for some fucking idiot programmer in Tencent

Signed-off-by: Zxilly <zhouxinyu1001@gmail.com>
This commit is contained in:
Zxilly 2021-05-06 20:12:16 +08:00
parent 99f431261d
commit deca58d5ff

View File

@ -260,8 +260,13 @@ static int queue_cb(const struct nlmsghdr *nlh, void *data) {
tcppklen = nfq_tcp_get_payload_len(tcppkhdl, pktb); //获取 tcp长度
if (tcppkpayload) {
char *uapointer = memmem(tcppkpayload, tcppklen, "\r\nUser-Agent: ", 14);
char *uapointer = memmem(tcppkpayload, tcppklen, "\r\nUser", 6);
if (uapointer) {
uapointer = memmem(tcppkpayload, tcppklen, "\r\nUser-Agent: ", 14);
}
if (!uapointer) {
uapointer = memmem(tcppkpayload, tcppklen, "\r\nUser-agent: ", 14);
}
if (uapointer) {
debugflag++; //flag5