Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added scan subdomain only feature in onboard command #31

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion mantis/utils/args_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ def args_parse() -> ArgsModel:
help = 'List of comma separated aws profiles for Route53',
)

onboard_parser.add_argument('--sub',
dest = 'subdomain',
help='Subdomain to onboard and scan',
action = 'store_true')


scan_parser = subparser.add_parser("scan", help="Scan an org", usage=ArgsParse.scan_msg())
Expand Down Expand Up @@ -278,7 +282,10 @@ def args_parse() -> ArgsModel:
if args.subcommand == "scan":
if args.subdomain:
parsed_args["subdomain"] = args.subdomain


if args.subcommand == "onboard":
if args.subdomain:
parsed_args["subdomain"] = args.host

args_pydantic_obj = ArgsModel.parse_obj(parsed_args)
logging.info(f'parsed args - {args_pydantic_obj}')
Expand Down
Loading