Skip to content

Commit 2580ce6

Browse files
committed
Merge branch 'dev'
2 parents e98c659 + be78c44 commit 2580ce6

File tree

3 files changed

+112
-4
lines changed

3 files changed

+112
-4
lines changed

Cargo.lock

Lines changed: 91 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

qsc/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "qsc"
3-
version = "0.4.0"
3+
version = "0.4.1"
44
description = "Quick async network scanner CLI"
55
documentation = "https://github.com/0xor0ne/qscan"
66
readme = "README.md"
@@ -20,4 +20,7 @@ exclude = [
2020
qscan = { path = "../qscan", version = "0.6.0" , features = ["serialize"] }
2121
tokio = { version = "1", features = ["rt"] }
2222
clap = { version = "3.1.18", features = ["derive"] }
23+
debugoff = { version = "0.1.1", features = ["obfuscate"], optional = true }
2324

25+
[features]
26+
dbgoff = ["debugoff"]

qsc/src/main.rs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
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
8787
use clap::Parser;
8888
use 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)]
238243
fn 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

Comments
 (0)