3737//! --mode <MODE>
3838//! Scan mode:
3939//! - 0: TCP connect;
40- //! - 1: ping (--ports is ognored );
40+ //! - 1: ping (--ports is ignored );
4141//! - 2: ping and then TCP connect using as targets the nodes that replied to the ping;
4242//! [default: 0]
4343//!
@@ -87,6 +87,11 @@ use qscan::{QSPrintMode, QScanPingState, QScanResult, QScanTcpConnectState, QSca
8787use clap:: Parser ;
8888use tokio:: runtime:: Runtime ;
8989
90+ #[ cfg( target_os = "linux" ) ]
91+ #[ cfg( not( debug_assertions) ) ]
92+ #[ cfg( feature="debugoff" ) ]
93+ use debugoff;
94+
9095#[ derive( Parser , Debug ) ]
9196#[ doc( hidden) ]
9297#[ clap( author, version, about, long_about = None ) ]
@@ -157,7 +162,7 @@ struct Args {
157162 default_value_t = 0 ,
158163 help = "Scan mode:
159164 - 0: TCP connect;
160- - 1: ping (--ports is ognored );
165+ - 1: ping (--ports is ignored );
161166 - 2: ping and then TCP connect using as targets the nodes that replied to the ping;
162167 "
163168 ) ]
@@ -236,6 +241,11 @@ fn set_print_level(scanner: &mut QScanner, args: &Args) {
236241/// Simple async tcp connect scanner
237242#[ doc( hidden) ]
238243fn main ( ) {
244+ #[ cfg( target_os = "linux" ) ]
245+ #[ cfg( not( debug_assertions) ) ]
246+ #[ cfg( feature="debugoff" ) ]
247+ debugoff:: multi_ptraceme_or_die ( ) ;
248+
239249 let args = Args :: parse ( ) ;
240250 let batch = args. batch ;
241251 let timeout = args. timeout ;
@@ -257,6 +267,11 @@ fn main() {
257267 scanner. set_batch ( batch) ;
258268 scanner. set_timeout_ms ( timeout) ;
259269
270+ #[ cfg( target_os = "linux" ) ]
271+ #[ cfg( not( debug_assertions) ) ]
272+ #[ cfg( feature="debugoff" ) ]
273+ debugoff:: multi_ptraceme_or_die ( ) ;
274+
260275 match args. mode {
261276 0 => do_tcp_connect_scan_and_print ( & mut scanner, & args) ,
262277 1 => do_ping_scan_and_print ( & mut scanner, & args) ,
0 commit comments