SYNC
This commit is contained in:
parent
ae82bd3a67
commit
7d9095f113
@ -29,7 +29,7 @@ def setup_argparse():
|
||||
|
||||
interfaces_parser = subparsers.add_parser('list-interfaces', aliases=['li', 'if'],
|
||||
help='List available network interfaces.')
|
||||
interfaces_parser.set_defaults(func=list_interfaces())
|
||||
interfaces_parser.set_defaults(func=list_interfaces)
|
||||
|
||||
return root_parser
|
||||
|
||||
|
||||
10
code/iottb/main2.py
Normal file
10
code/iottb/main2.py
Normal file
@ -0,0 +1,10 @@
|
||||
import subprocess
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
10
code/iottb/subcommands/sniff.py
Normal file
10
code/iottb/subcommands/sniff.py
Normal file
@ -0,0 +1,10 @@
|
||||
import subprocess
|
||||
|
||||
def sniff_tcpdump(args, filter):
|
||||
pass
|
||||
|
||||
def sniff_mitmproxy(args, filter):
|
||||
pass
|
||||
|
||||
def sniff_raw(cmd,args):
|
||||
pass
|
||||
@ -15,7 +15,7 @@ def ensure_installed():
|
||||
raise RuntimeError('tcpdump is not installed. Please install it to continue.')
|
||||
|
||||
|
||||
def list_interfaces() -> str:
|
||||
def list_interfaces(args) -> str:
|
||||
"""List available network interfaces using tcpdump."""
|
||||
ensure_installed()
|
||||
try:
|
||||
|
||||
13
notes/scrible
Normal file
13
notes/scrible
Normal file
@ -0,0 +1,13 @@
|
||||
`iottb sniff`:
|
||||
min: nothing
|
||||
min meaningfull: interface
|
||||
min usefull: ip/mac addr of dev
|
||||
good: ip/mac, device type
|
||||
better:
|
||||
|
||||
`iottb device`
|
||||
`add`: add new device config
|
||||
|
||||
`iottb db`
|
||||
`init` initialize device database
|
||||
`add` add device
|
||||
Loading…
x
Reference in New Issue
Block a user