摘要:
老是忘记,做个记录import requestsparams = {"ip": ip,"port": port,}data = json.dumps(params)res = requests.get(url=url, data=data)result = json.loads(res.conten 阅读全文
摘要:
hasattr() 函数用于判断对象是否包含对应的属性。 hasattr 语法: hasattr(object, name) #!/usr/bin/python # -*- coding: UTF-8 -*- class Coordinate: x = 10 y = -5 z = 0 point1 阅读全文
摘要:
第一步,安装dnspython 第二步,直接上代码 import dns.resolver def DnstoIp(domain): """ 将域名转换为IP地址 :return: """ A = dns.resolver.query(domain, 'A') # print(A) for i in 阅读全文