fix: add User-agent

fuck netease

Signed-off-by: Zxilly <zhouxinyu1001@gmail.com>
This commit is contained in:
Zxilly 2021-05-06 20:41:55 +08:00
parent deca58d5ff
commit 999487653c
2 changed files with 7 additions and 4 deletions

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=UA2F
PKG_VERSION:=3.4
PKG_VERSION:=3.5
PKG_RELEASE:=8

View File

@ -263,10 +263,13 @@ static int queue_cb(const struct nlmsghdr *nlh, void *data) {
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);
}
} else {
uapointer = memmem(tcppkpayload, tcppklen, "\r\nuser-agent: ", 14);
}
if (!uapointer) {
uapointer = memmem(tcppkpayload, tcppklen, "\r\nUser-agent: ", 14);
}
if (uapointer) {
debugflag++; //flag5