feat: reading from a file
This commit is contained in:
parent
862c872b73
commit
591e8fc9d5
12
src/main.rs
12
src/main.rs
|
@ -1,12 +1,18 @@
|
|||
use owo_colors::OwoColorize;
|
||||
use std::process::Command;
|
||||
use std::fs;
|
||||
|
||||
fn main() -> std::io::Result<()> {
|
||||
let ports = [80, 443, 8448];
|
||||
for port in ports {
|
||||
let file: Vec<String> = fs::read_to_string("sage.txt")
|
||||
.unwrap()
|
||||
.lines()
|
||||
.map(String::from)
|
||||
.collect();
|
||||
|
||||
for port in &file[1..file.len()] {
|
||||
let netcat = Command::new("nc")
|
||||
.arg("-vz")
|
||||
.arg("devraza.giize.com")
|
||||
.arg(format!("{}", file[0]))
|
||||
.arg(format!("{}", port))
|
||||
.output()?;
|
||||
|
||||
|
|
Loading…
Reference in a new issue