forked from midefos/martillo-maldito
adding argument to check if port is secured
This commit is contained in:
1 parent
fb487fd655
commit
bf4602375d
4 files changed
+64
-29
No files matched your search
+5
-1
@@ -4,7 +4,7 @@ pub mod iptables_wrapper;
|
||||
pub mod login_attempt;
|
||||
|
||||
use cli::Arguments;
|
||||
use iptables_wrapper::{allow_ip_port, ban_port, remove_ip_port, unban_port};
|
||||
use iptables_wrapper::{allow_ip_port, ban_port, is_port_secured, remove_ip_port, unban_port};
|
||||
use linemux::MuxedLines;
|
||||
use login_attempt::LoginAttempt;
|
||||
use std::path::PathBuf;
|
||||
@@ -22,6 +22,10 @@ async fn main() {
|
||||
} => {
|
||||
let _ = start_ban_server(ssh_auth_log, iptables_save).await;
|
||||
}
|
||||
Arguments::IsPortSecured { port, docker } => {
|
||||
let is_secured = is_port_secured(port, docker);
|
||||
println!("{}", is_secured);
|
||||
}
|
||||
Arguments::BanPort {
|
||||
port,
|
||||
docker,
|
||||
|
||||
Reference in new issue
Block a user