mirror of
https://github.com/CHN-beta/xmurp-ua.git
synced 2026-01-11 01:09:25 +08:00
debuging
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
const static unsigned char* str_ua_begin = "User-Agent: ";
|
||||
const static unsigned char* str_ua_end = "\r\n";
|
||||
const static unsigned char* str_head_end = "\r\n\r\n";
|
||||
static unsigned char str_ua_rkp[9];
|
||||
static unsigned char str_ua_rkp[16];
|
||||
|
||||
void* rkpMalloc(unsigned size)
|
||||
{
|
||||
|
||||
10
src/rkp-ua.c
10
src/rkp-ua.c
@@ -15,7 +15,7 @@ unsigned int hook_funcion(void *priv, struct sk_buff *skb, const struct nf_hook_
|
||||
return NF_ACCEPT;
|
||||
if(!rkpSettings_capture(skb))
|
||||
return NF_ACCEPT;
|
||||
|
||||
return NF_ACCEPT;
|
||||
rtn = rkpManager_execute(rkpm, skb);
|
||||
|
||||
n_skb_captured++;
|
||||
@@ -44,9 +44,9 @@ static int __init hook_init(void)
|
||||
nfho.priority = NF_IP_PRI_RAW;
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0)
|
||||
ret = nf_register_net_hook(&init_net, &nfho);
|
||||
// ret = nf_register_net_hook(&init_net, &nfho);
|
||||
#else
|
||||
ret = nf_register_hook(&nfho);
|
||||
// ret = nf_register_hook(&nfho);
|
||||
#endif
|
||||
|
||||
printk("rkp-ua: Started, version %s\n", VERSION);
|
||||
@@ -67,9 +67,9 @@ static void __exit hook_exit(void)
|
||||
mutex_destroy(&lock);
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0)
|
||||
nf_unregister_net_hook(&init_net, &nfho);
|
||||
// nf_unregister_net_hook(&init_net, &nfho);
|
||||
#else
|
||||
nf_unregister_hook(&nfho);
|
||||
// nf_unregister_hook(&nfho);
|
||||
#endif
|
||||
printk("rkp-ua: Stopped.\n");
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ struct rkpManager* rkpManager_new(struct mutex* lock)
|
||||
}
|
||||
void rkpManager_delete(struct rkpManager* rkpm)
|
||||
{
|
||||
__rkpManager_lock(rkpm);
|
||||
// __rkpManager_lock(rkpm);
|
||||
unsigned i;
|
||||
for(i = 0; i < 256; i++)
|
||||
{
|
||||
@@ -41,7 +41,7 @@ void rkpManager_delete(struct rkpManager* rkpm)
|
||||
rkps = rkps2;
|
||||
}
|
||||
}
|
||||
__rkpManager_unlock(rkpm);
|
||||
// __rkpManager_unlock(rkpm);
|
||||
rkpFree(rkpm);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user