马孔多不下雪

QQ号被永久冻结,可dnspod解析只绑定此QQ登录咋办?

Hints

一般人都会想到先找腾讯申诉,不过永久冻结的申诉结果是这样的:

所以一句话:小灬心灬腾灬讯。

所以说就真的没办法了吗,难道只能一个个反查出解析的域名再重新解析了吗?

不,像dnspod这类网站都有一种API的方式可以获取账号信息,即不用登陆。

当然,在之前申请Let’s encrypt的野卡域名的时候因为只能用dnspod插件所以我服务器上保留有dnspod API信息。(ID,TOKEN格式)

利用dnspod API获取解析列表

看了下官网API文档,我们只需要两个操作就可以得到我们要的解析列表。

当然如果你没有API TOKEN而且账号被永久冻结,并且用QQ快捷登陆的话就凉凉了,没救了。

先获取账号下域名的id

curl -X POST https://dnsapi.cn/Domain.List -d "login_token=[ID,TOKEN]&format=json"

[ID,TOKEN]就是你的API key,逗号也要输入,中括号不要输入。

Windows10自1809版本更新后似乎内置了curl命令(pro workstation是这样的),如果没有可以通过mac或者linux,不碍事。

然后你的控制台就会得到一串没有空格没有回车没有格式化过的json。

推荐用工具格式化一下便于阅读,大概像这个样子:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
"status": {
"code": "1",
"message": "Action completed successful",
"created_at": "2020-02-05 17:59:25"
},
"info": {
"domain_total": 3,
"all_total": 3,
"mine_total": 3
},
"domains": [{
"id": 73467724,
"status": "enable",
"src_flag": "DNSPOD",
"name": "4o5.xyz",
"records": "41"
}]
}

重点是domains数组里面的id,因为后面它要按域名来查询,所以要用到。

得到了id之后就可以查询对应id下面的解析条目了:

curl -X POST https://dnsapi.cn/Record.List -d "login_token=[ID,TOKEN]&format=json&domain_id=[domainID]"

[domainID]就是你刚刚查询到的id,中括号不要输入,当然你可能不只有一个id,我有三个解析在dnspod所以这一条命令要换id发三次。

然后就有解析列表了,格式化一下,大概这个样子:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
{
"status": {
"code": "1",
"message": "Action completed successful",
"created_at": "2020-02-05 18:03:49"
},
"domain": {
"id": "73490716",
"name": "jxx.world",
"punycode": "jxx.world",
"grade": "DP_Free",
"owner": "qcloud_uin_100009096860@qcloud.com",
"ext_status": "",
"ttl": 600,
"min_ttl": 600,
"dnspod_ns": ["f1g1ns1.dnspod.net", "f1g1ns2.dnspod.net"],
"status": "enable"
},
"info": {
"sub_domains": "6",
"record_total": "6",
"records_num": "6"
},
"records": [{
"id": "443197515",
"ttl": "86400",
"value": "f1g1ns1.dnspod.net.",
"enabled": "1",
"status": "enable",
"updated_on": "2019-08-01 20:48:24",
"name": "@",
"line": "\u9ed8\u8ba4",
"line_id": "0",
"type": "NS",
"weight": null,
"monitor_status": "",
"remark": "",
"use_aqb": "no",
"mx": "0",
"hold": "hold"
}, {
"id": "443197517",
"ttl": "86400",
"value": "f1g1ns2.dnspod.net.",
"enabled": "1",
"status": "enable",
"updated_on": "2019-08-01 20:48:24",
"name": "@",
"line": "\u9ed8\u8ba4",
"line_id": "0",
"type": "NS",
"weight": null,
"monitor_status": "",
"remark": "",
"use_aqb": "no",
"mx": "0",
"hold": "hold"
}, {
"id": "443256047",
"ttl": "600",
"value": "jxx.world.cdn.cloudflare.net.",
"enabled": "1",
"status": "enable",
"updated_on": "2019-08-01 23:29:52",
"name": "@",
"line": "\u9ed8\u8ba4",
"line_id": "0",
"type": "CNAME",
"weight": null,
"monitor_status": "",
"remark": "",
"use_aqb": "no",
"mx": "0"
},{
"id": "451742052",
"ttl": "600",
"value": "v.jxx.world.cdn.cloudflare.net.",
"enabled": "1",
"status": "enable",
"updated_on": "2019-08-29 18:06:15",
"name": "v",
"line": "\u9ed8\u8ba4",
"line_id": "0",
"type": "CNAME",
"weight": null,
"monitor_status": "",
"remark": "",
"use_aqb": "no",
"mx": "0"
}, {
"id": "443256056",
"ttl": "600",
"value": "www.jxx.world.cdn.cloudflare.net.",
"enabled": "1",
"status": "enable",
"updated_on": "2019-08-01 23:30:09",
"name": "www",
"line": "\u9ed8\u8ba4",
"line_id": "0",
"type": "CNAME",
"weight": null,
"monitor_status": "",
"remark": "",
"use_aqb": "no",
"mx": "0"
}]
}

然后就可以转移dns解析了,但是还是要一条一条的加,太痛苦了,废物tx。

突然发现套路云的分运营商解析也不要钱,当初我选腾讯干啥呢。


 评论