def main(): global domains_long, domains_short, domains, api, message_queu, backup_restored, domains_types digital_ocean_token = config.digital_ocean_token message_queu["action1"] = [] message_queu["action2"] = [] message_queu["action3"] = [] message_queu["action4"] = [] message_queu["action5"] = [] message_queu["action6"] = [] message_queu["action7"] = [] if config.namecheap_key == "": print(f"{bcolors.FAIL}[+] Namecheap API Key missing{bcolors.ENDC}") sys.exit() if config.apivoid_key == "": print(f"{bcolors.FAIL}[+] APIVoid API Key missing{bcolors.ENDC}") sys.exit(0) api = Api(config.namecheap_username, config.namecheap_key, config.namecheap_ipaddress, sandbox=False) for i in config.names: domains_types[i] = config.names[i] temp_domains = list(api.domains_getList()) backup_restored = check_backup() for i in temp_domains: domains.append(i['name']) check_names = True for i in config.names: if len(config.names[i]) == 0: check_names = False break if check_names == False: check_names = True for i in domains_types: if len(domains_types[i]) == 0: print("[+] No domains found in haul " + i) check_names = False if check_names == False: restricted_menu() thread = Thread(target=set_and_check) thread.start() thread2 = Thread(target=menu) thread2.start() thread.join() thread2.join()
def test_domains_getList(): api = Api(username, api_key, username, ip_address, sandbox=True) iter(api.domains_getList())
def test_domains_getList(): api = Api(username, api_key, username, ip_address, sandbox = True) api.domains_getList()
import pprint from credentials import api_key, username, ip_address badnames = "parkingpage.namecheap.com." # newipv6 githuba = "192.30.252.153" githubb = "192.30.252.154" from yaml import load, dump try: from yaml import CLoader as Loader, CDumper as Dumper except ImportError: from yaml import Loader, Dumper api = Api(username, api_key, username, ip_address, sandbox=False, debug=False) dlist = api.domains_getList() from yaml import load, dump l = {} for x in dlist: domain_name = x["Name"] # print (domain_name) # try: # x['hosts']=api.domains_dns_getHosts(domain_name) # except Exception as e: # print (e) l[domain_name] = x