Add bash file with functions to enable and disable monitor mode using either...
This commit is contained in:
@@ -69,7 +69,7 @@ def handle_sniff(args):
|
||||
if not cwd_is_device_root_dir():
|
||||
handle_metadata()
|
||||
else:
|
||||
cmd = ['sudo tcpdump', '-i', args.capture_interface]
|
||||
cmd = ['sudo', 'tcpdump', '-i', args.capture_interface]
|
||||
if args.monitor_mode:
|
||||
cmd.append('-I')
|
||||
if args.no_name_resolution:
|
||||
@@ -83,8 +83,10 @@ def handle_sniff(args):
|
||||
cmd.append(str(args.count))
|
||||
elif args.mins:
|
||||
pass
|
||||
print('Executing: ' + ' '.join(cmd))
|
||||
print('Complete command:' + ' '.join(cmd))
|
||||
# TODO maybe dump this into file -> put into device metadata
|
||||
# TODO generate pcap filename
|
||||
# TODO construct capture metadata file
|
||||
try:
|
||||
start_time = datetime.now().strftime('%H:%M:%S')
|
||||
subprocess.run(cmd)
|
||||
|
||||
Reference in New Issue
Block a user