31 lines
651 B
Python
31 lines
651 B
Python
import argparse
|
|
import logging
|
|
from pathlib import Path
|
|
|
|
from .commands.sniff import setup_sniff_parser
|
|
from .config import Config
|
|
from .utils.file_utils import ensure_directory_exists
|
|
|
|
|
|
def setup_logging():
|
|
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)s %(name)s: %(message)s')
|
|
|
|
|
|
def main():
|
|
setup_logging()
|
|
|
|
parser = argparse.ArgumentParser(description='IoT Testbed')
|
|
subparsers = parser.add_subparsers()
|
|
|
|
setup_sniff_parser(subparsers)
|
|
|
|
args = parser.parse_args()
|
|
if hasattr(args, 'func'):
|
|
args.func(args)
|
|
else:
|
|
parser.print_help()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|