增加SSH爆破检测

This commit is contained in:
huoji
2023-05-08 00:15:08 +08:00
parent b00e51fdc7
commit 7484922894
3 changed files with 3 additions and 1 deletions

1
.gitignore vendored
View File

@@ -1 +1,2 @@
*.cmake
linux_kernel/.main.o.d

View File

@@ -110,8 +110,10 @@ int cleanup(void) {
}
destory_dev();
cleanup_msg();
return -1;
}
static int __init driver_entry(void) {
printk(KERN_WARNING "[DebugMessage] safe duck init\n");

View File

@@ -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) {
struct ip_hashmap_node_t *data = get_ipdata_by_hashmap(ip_address);
if (data == NULL) {
printk(KERN_ERR "Failed to get ip data from hashmap\n");
return false;
}
return data->info.ip_meta_info.is_attack;