This commit is contained in:
Sebastian Lenzlinger 2024-06-12 20:01:59 +02:00
parent ae82bd3a67
commit 7d9095f113
5 changed files with 35 additions and 2 deletions

View File

@ -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
View File

@ -0,0 +1,10 @@
import subprocess
import logging
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.DEBUG)
if __name__ == '__main__':

View 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

View File

@ -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
View 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