Skip to content

Commit 029d51d

Browse files
committed
Fix body error
1 parent bf87c43 commit 029d51d

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ path = "cli/main.rs"
2121
scant3r_utils = { path ="./utils" }
2222
scanners = { path = "./scanners" }
2323
clap = "3.0.14"
24+
console = "0.15.0"

utils/src/requests.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,10 @@ impl Msg {
132132
url: self.url.clone(),
133133
status: res.status(),
134134
headers: res.headers().clone(),
135-
body: res.text().unwrap(),
135+
body: match res.text() {
136+
Ok(body) => body,
137+
Err(_) => "".to_string(),
138+
},
136139
}),
137140

138141
Err(e) => Err(e),

0 commit comments

Comments
 (0)