增加SSH爆破检测
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
*.cmake
|
*.cmake
|
||||||
|
linux_kernel/.main.o.d
|
||||||
|
|||||||
@@ -110,8 +110,10 @@ int cleanup(void) {
|
|||||||
}
|
}
|
||||||
destory_dev();
|
destory_dev();
|
||||||
cleanup_msg();
|
cleanup_msg();
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __init driver_entry(void) {
|
static int __init driver_entry(void) {
|
||||||
printk(KERN_WARNING "[DebugMessage] safe duck init\n");
|
printk(KERN_WARNING "[DebugMessage] safe duck init\n");
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ void block_ip_address(size_t ip_address, size_t time_sec) {
|
|||||||
bool check_is_blacklist_ip(size_t ip_address) {
|
bool check_is_blacklist_ip(size_t ip_address) {
|
||||||
struct ip_hashmap_node_t *data = get_ipdata_by_hashmap(ip_address);
|
struct ip_hashmap_node_t *data = get_ipdata_by_hashmap(ip_address);
|
||||||
if (data == NULL) {
|
if (data == NULL) {
|
||||||
printk(KERN_ERR "Failed to get ip data from hashmap\n");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return data->info.ip_meta_info.is_attack;
|
return data->info.ip_meta_info.is_attack;
|
||||||
|
|||||||
Reference in New Issue
Block a user