MENU

腾讯云 查询备案的api接口

March 26, 2024 • 已被 603 位童鞋围观过 • 代码分享

之前抓取的腾讯的Dnspod 查询IP备案的接口 来源页面 : https://tool.dnspod.cn/baidu.com

$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession
$session.Cookies.Add((New-Object System.Net.Cookie("language", "zh", "/", "www.dnspod.cn")))
Invoke-WebRequest -UseBasicParsing -Uri "https://www.dnspod.cn/cgi/dnsapi?action=Tools.Check.Website&uin=&mc_gtk=&isSkipAuth=1" `
-Method POST `
-WebSession $session `
-UserAgent "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" `
-Headers @{
"Accept" = "application/json, text/javascript, */*; q=0.01"
  "Accept-Language" = "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2"
  "Accept-Encoding" = "gzip, deflate, br"
  "Referer" = "https://tool.dnspod.cn/baidu.com"
  "Origin" = "https://tool.dnspod.cn"
  "Sec-Fetch-Dest" = "empty"
  "Sec-Fetch-Mode" = "no-cors"
  "Sec-Fetch-Site" = "same-site"
  "TE" = "trailers"
  "X-SeqId" = "ba61f46a-da35-5086-8357-75b84b0c5442"
  "X-Referer" = "https://tool.dnspod.cn/baidu.com"
  "Pragma" = "no-cache"
  "Cache-Control" = "no-cache"
} `
-ContentType "application/json; charset=utf-8" `
-Body "{`"ori_domain`":`"tudou.com`",`"api`":`"Tools.Check.Website`"}"

需要的话 可以直接伪造请求结构。