import json
import multiprocessing
import threading
import requests
import xmltodict # 万网查询
def check_domin_www(file_path):
for line in open(file_path):
line = line.strip()
try:
url = f'''http://panda.www.net.cn/cgi-bin/check.cgi?area_domain={ line }.com'''
r = requests.get(url)
res_dict = xmltodict.parse(r.content.decode())
domin = res_dict['property']['key']
res = res_dict['property']['original'][:3]
print(res_dict)
if res == 210:
with open('domin_res.txt', 'a') as f:
f.write(domin)
f.write('\n')
except Exception as e:
print('出错了')
pass # 阿里云查询
def check_domin_aliyun(file_path):
for line in open(file_path):
line = line.strip()
try:
url = f'''https://checkapi.aliyun.com/check/checkdomain?domain={ line }.com&token=Yc0dc45c0cbd5d71276b9baf6d419c32f'''
r = requests.get(url)
res_dict = json.loads(r.content.decode())
if res_dict['success'] == 'true':
if res_dict['module'][0]['avail'] == 1:
with open('domin_res.txt', 'a') as f:
f.write(res_dict['module'][0]['name'])
f.write('\n')
else:
print(res_dict)
except Exception as e:
print('出错了')
pass # now查询
def check_domin_now(file_path):
for line in open(file_path):
line = line.strip()
try:
url = f'''https://checkapi.now.cn:8080/?domains={ line }.com'''
r = requests.get(url)
res_dict = json.loads(r.content.decode())
if res_dict['code'] == 100:
if res_dict['results'][0]['status'] == 1:
with open('domin_res.txt', 'a') as f:
f.write(res_dict['results'][0]['domain'])
f.write('\n')
else:
print(res_dict)
except Exception as e:
print(e)
pass # 中企动力查询
def check_domin_300(file_path):
for line in open(file_path):
line = line.strip()
try:
url = f'''https://api-shop.300.cn/domain/findDomainStatus?domainName={ line }&domainSuffix=.com'''
r = requests.get(url)
res_dict = json.loads(r.content.decode())
if res_dict['status'] == 101:
if res_dict['data']['domainStatus'] == 2:
with open('domin_res_300.txt', 'a') as f:
f.write(f'{ line }.com')
f.write('\n')
else:
print(res_dict)
except Exception as e:
import traceback
print(traceback.print_exc()) def run(file_path):
t = threading.Thread(target=check_domin_300, args=(file_path,))
t.start() if __name__ == '__main__': i = 23
while i < 27:
p = multiprocessing.Process(target=run, args=('E:/code/Modbus_RTU/passs/pass_{}.txt'.format(i),))
p.start() i += 1

域名查询是否注册的demo的更多相关文章

  1. linux下查询域名或IP注册信息的操作记录(whois)

    在运维工作中,有时需要查询某些域名的注册信息(域名的NS,注册用户,注册邮箱等),可以使用whois这个命令.whois命令令用来查找并显示指定帐号(或域名)的用户相关信息,因为它是到Network ...

  2. 【转】万网域名查询接口(API)的说明

    1.域名查询接口采用HTTP,POST,GET协议:调用URL:http://panda.www.net.cn/cgi-bin/check.cgi参数名称:area_domain 值为标准域名,例:h ...

  3. php调用whois接口域名查询

    由两部分组成,一个index.php文件,一个whois的接口文件: <html> <head> <title>域名到期查询</title> <s ...

  4. 万网域名查询API接口

    域名查询 接口地址:http://panda.www.net.cn/cgi-bin/check.cgi 接口采用HTTP,POST,GET协议 参数名称:area_domain 值为标准域名,例:nm ...

  5. python3实现域名查询和whois查询

    关键字:python3 域名查询 域名查询接口 whois查询原文:http://www.cnblogs.com/txw1958/archive/2012/08/31/python3-domain-w ...

  6. dig 常用的域名查询工具

    dig 命令是常用的域名查询工具,可以用来测试域名系统工作是否正常. 语法: dig (选项) (参数) 选项: @<服务器地址>: 指定进行域名解析的域名服务器: -b: 当主机具有多个 ...

  7. C#根据域名查询IP(CMD命令参数输入或者启动程序后再输入查询)

    有时因为需要,希望知道域名的IP,那用C#怎么实现呢?以下是实现代码 using System; using System.Collections.Generic; using System.Linq ...

  8. 10.18 nslookup:域名查询工具

    功能说明 nslookup命令是常用的域名解析查询工具. 如果系统没有nslookup命令,则需要安装下面的软件包: yum-y inatall bind-otil9   语法格式 nslookup ...

  9. nslookup域名查询命令查询ip

    一.nslookup(name server lookup ) nslookup可以指定查询的类型,可以查到DNS记录的生存时间还可以指定使用哪个DNS服务器进行解释.在已安装TCP/IP协议的电脑上 ...

随机推荐

  1. Dubbo 03 Restful风格的API

    目录 Dubbo03 restful风格的API 根路径 协议 版本 用HTTP协议里的动词来实现资源的增删改查 用例 swagger(丝袜哥) OpenAPI 资源 编写API文档 整合Spring ...

  2. qt中不能编辑

    下载的qt代码不能编辑,原因是文本编码是GB2312,现在选择的是utf-8,把编码改过来就可以编辑了

  3. java web课堂测试

    下面是web界面 <%@ page language="java" import="java.util.*" pageEncoding="UTF ...

  4. 求两个数的最大公约数和最小公倍数Java(cvte考题)

    //最大公约数 最小公倍数 通过测试 public class GongYue{ public static int gongyue(int m, int n) throws Exception{ i ...

  5. 32.把数组排成最小的数(python)

    题目描述 输入一个正整数数组,把数组里所有数字拼接起来排成一个数,打印能拼接出的所有数字中最小的一个.例如输入数组{3,32,321},则打印出这三个数字能排成的最小数字为321323. # -*- ...

  6. zrender-部分小知识点集合

    1.存组件元素和取组件元素,会在数据更新时,将存起来的拿出来 在construct(){ this.saveData=[];//先声明一个空的数组 } //存的方法 setSave(ele,i,nam ...

  7. zTree 节点展开

    var treeObj = $("#treeDemo"); $.fn.zTree.init(treeObj, setting, Znode1); zTree_Menu = $.fn ...

  8. [RCTF]Pwn200 wp

    0x00: XCTF开赛了,只看了pwn,这次还比较有意思,有x86  x64  arm mips 多种cpu构架的pwn.自己只搞出了pwn200 0x01: 基本信息: x64 动态链接 有调试符 ...

  9. Ajax异步传值总结

    Ajax异步传值 将数据从前台传向后台: 1:通过get方式,将参数在链接中,配合“?”进行传值. 实例: //前台传值方法 //触发该方法调用ajax function testAjax(yourD ...

  10. css 内容居中

    css: parent{display:table;} child{display:table-cell;vertical-align:middle;}