File tree 2 files changed +12
-2
lines changed
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ OPTIONS:
98
98
--ip-addr <iplist> Inline list of IP addresses to impersonate, comma-separated
99
99
--ip-addr-file <ipfile> File with the list of IP addresses to impersonate
100
100
-m, --mac-addr <mac> MAC address to use in the response packets
101
+ -q, --quiet Quiet mode: does not output anything on stdout
101
102
-v Increase message verbosity
102
103
-V, --version Print version information
103
104
```
Original file line number Diff line number Diff line change @@ -139,6 +139,13 @@ fn main() {
139
139
. multiple_occurrences ( true )
140
140
. help ( "Increase message verbosity" ) ,
141
141
)
142
+ . arg (
143
+ Arg :: new ( "quiet" )
144
+ . long ( "quiet" )
145
+ . short ( 'q' )
146
+ . help ( "Quiet mode: do not output anything on stdout" )
147
+ . takes_value ( false ) ,
148
+ )
142
149
. get_matches ( ) ;
143
150
let verbose = args. occurrences_of ( "verbosity" ) as usize ;
144
151
/* initialise logger */
@@ -210,8 +217,10 @@ fn main() {
210
217
} ;
211
218
info ! ( "interface......{}" , masscanned. iface. unwrap( ) . name) ;
212
219
info ! ( "mac address....{}" , masscanned. mac) ;
213
- masscanned. log . add ( Box :: new ( ConsoleLogger :: new ( ) ) ) ;
214
- masscanned. log . init ( ) ;
220
+ if !args. contains_id ( "quiet" ) {
221
+ masscanned. log . add ( Box :: new ( ConsoleLogger :: new ( ) ) ) ;
222
+ masscanned. log . init ( ) ;
223
+ }
215
224
let ( mut tx, mut rx) = get_channel ( masscanned. iface . unwrap ( ) ) ;
216
225
loop {
217
226
/* check if network interface is still up */
You can’t perform that action at this time.
0 commit comments