From 88b756dc3cf239876ad7386bc4fff9266821a131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chema=20Garc=C3=ADa?= Date: Wed, 22 Jul 2020 12:10:19 +0200 Subject: [PATCH] deduplicate subdomains and support for multiple CN --- ctfr.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ctfr.py b/ctfr.py index 36a2ea1..466dfd9 100644 --- a/ctfr.py +++ b/ctfr.py @@ -59,12 +59,11 @@ def main(): exit(1) for (key,value) in enumerate(req.json()): - subdomains.append(value['name_value']) + subdomains.extend(value['name_value'].split('\n')) - print("\n[!] ---- TARGET: {d} ---- [!] \n".format(d=target)) - subdomains = sorted(set(subdomains)) + subdomains = sorted(list(set(subdomains))) for subdomain in subdomains: print("[-] {s}".format(s=subdomain)) @@ -73,6 +72,6 @@ def main(): print("\n\n[!] Done. Have a nice day! ;).") - -main() +if __name__ == "__main__": + main()