Skip to content

Commit

Permalink
fix: add User-agent
Browse files Browse the repository at this point in the history
fix for some fucking idiot programmer in Tencent

Signed-off-by: Zxilly <[email protected]>
  • Loading branch information
Zxilly committed May 6, 2021
1 parent 99f4312 commit deca58d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/ua2f.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit deca58d

Please sign in to comment.