diff --git a/mantis/models/args_model.py b/mantis/models/args_model.py index a843f94..ceb59bc 100644 --- a/mantis/models/args_model.py +++ b/mantis/models/args_model.py @@ -21,4 +21,5 @@ class ArgsModel(BaseModel): subdomain: str = Field(None) list_: bool = False list_orgs: bool = False + in_scope: bool = False \ No newline at end of file diff --git a/mantis/modules/dns/Cloudflare.py b/mantis/modules/dns/Cloudflare.py index c1f9109..3e89b22 100644 --- a/mantis/modules/dns/Cloudflare.py +++ b/mantis/modules/dns/Cloudflare.py @@ -60,7 +60,7 @@ async def main(self): records = cf.zones.dns_records.get(zone['id'], params={'per_page': per_page, 'page': record_page})['result'] for record in records: domain_dict = {} - if(self.args.ignore_stale == True): + if(self.args.in_scope == True): print(self.db_assets) for asset in self.db_assets: if(asset in record['name']): diff --git a/mantis/utils/args_parse.py b/mantis/utils/args_parse.py index 43916c2..061cb32 100644 --- a/mantis/utils/args_parse.py +++ b/mantis/utils/args_parse.py @@ -229,6 +229,12 @@ def args_parse() -> ArgsModel: scan_parser.add_argument('--sub', dest = 'subdomain', help='Subdomain to scan') + + scan_parser.add_argument('-is', '--in_scope', + dest = 'in_scope', + help = 'List only the records from nameserver that are in scope', + action = 'store_true' + ) list_parser = subparser.add_parser("list", help="List entities present in db", usage=ArgsParse.list_msg())