File tree Expand file tree Collapse file tree 2 files changed +0
-14
lines changed Expand file tree Collapse file tree 2 files changed +0
-14
lines changed Original file line number Diff line number Diff line change @@ -50,11 +50,6 @@ fn main() {
5050 process:: exit ( 0 ) ;
5151 }
5252
53- if !utils:: is_root_user ( ) {
54- eprintln ! ( "Should run this binary as root or use --help for options" ) ;
55- process:: exit ( 1 ) ;
56- }
57-
5853 let ( selected_interface, ip_networks) = network:: compute_network_configuration ( & interfaces, & scan_options) ;
5954
6055 if scan_options. is_plain_output ( ) {
Original file line number Diff line number Diff line change 1- use std:: env;
21use std:: process;
32use std:: sync:: Arc ;
43
@@ -10,14 +9,6 @@ use ansi_term::Color::{Green, Red};
109use crate :: network:: { ResponseSummary , TargetDetails } ;
1110use crate :: args:: ScanOptions ;
1211
13- /**
14- * Based on the current UNIX environment, find if the process is run as root
15- * user. This approach only supports Linux-like systems (Ubuntu, Fedore, ...).
16- */
17- pub fn is_root_user ( ) -> bool {
18- env:: var ( "USER" ) . unwrap_or_else ( |_| String :: from ( "" ) ) == * "root"
19- }
20-
2112/**
2213 * Prints on stdout a list of all available network interfaces with some
2314 * technical details. The goal is to present the most useful technical details
You can’t perform that action at this time.
0 commit comments