forked from midefos/martillo-maldito
better rule contains
This commit is contained in:
1 parent
d02c0b7c66
commit
8256b0358d
1 file changed
+1
-1
@@ -8,7 +8,7 @@ pub fn is_port_secured(port: u16, docker: bool) -> bool {
|
||||
}
|
||||
|
||||
for rule in rules.unwrap() {
|
||||
if rule.contains(&format!("-p tcp --dport {} -j DROP", port)) {
|
||||
if rule.contains(&format!("-p tcp -m tcp --dport {} -j DROP", port)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user