注册 登录
编程论坛 VB6论坛

powershell脚本如何用vb6来实现?

sqbcai 发布于 2023-07-04 12:55, 794 次点击
像这类的脚本如何用vb6代码来写?

$session = New-Object Microsoft.
$session.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36"
Invoke-WebRequest -UseBasicParsing -Uri "https:// `
-WebSession $session `
-Headers @{
"authority"="
  "method"="GET"
  "path"="/track/w/?data=eyJkYXRhVHlwZSI6ICJlIiwic2Vzc2lvblV1aWQiOiAiNjBkNjAzMzYzNTBlODZkOGMzOGQ1OTA0YmI3NTdkYjZlMGM2ZTZlYiIsImN1cnJlbnRVcmwiOiAiaHR0cHM6Ly9kYXNoaS4xNjMuY29tL2FwcHMvd2VibWFpbD9zaWQ9UkJxbVRUek5kUm1xc2xYdnVNTk5JR3RYZHZteFp1RmsjbW9kdWxlPW1ib3guTGlzdE1vZHVsZSU3QyU3QiUyMmZpZCUyMiUzQTElMkMlMjJvcmRlciUyMiUzQSUyMmRhdGUlMjIlMkMlMjJkZXNjJTIyJTNBdHJ1ZSUyQyUyMnJlc2V0RmlsdGVyJTIyJTNBJTdCJTIyZmlkJTIyJTNBMSUyQyUyMm9yZGVyJTIyJTNBJTIyZGF0ZSUyMiUyQyUyMmRlc2MlMjIlM0F0cnVlJTdEJTdEIiwicmVmZXJyZXIiOiAiaHR0cHM6Ly9kYXNoaS4xNjMuY29tL2FjY291bnQvdmlldy9tYS9sb2dpbiIsInJlZmVycmVyRG9tYWluIjogImRhc2hpLjE2My5jb20iLCJzZGtWZXJzaW9uIjogIjEuNi4xMi44Iiwic2RrVHlwZSI6ICJqcyIsImRldmljZU9zIjogIndpbmRvd3MiLCJkZXZpY2VPc1ZlcnNpb24iOiAiV2luNyIsImRldmljZVBsYXRmb3JtIjogIndlYiIsImJyb3dzZXIiOiAiY2hyb21lIiwiYnJvd3NlclZlcnNpb24iOiAiMTAyLjAuMC4wIiwic2NyZWVuV2lkdGgiOiAxMzY2LCJzY3JlZW5IZWlnaHQiOiA3NjgsImV2ZW50SWQiOiAid2VibWFpbF9mcmFtZV9uYXZfZm9sZGVyIiwiYXBwS2V5IjogIk1BLTlEOTktOTJERjgzNjFCQTMzIiwidGltZSI6IDE2ODg0NDYyODg3MDcsInBlcnNpc3RlZFRpbWUiOiAxNjYzNDg0OTIxMjA0LCJkZXZpY2VVZGlkIjogIjZkY2E5MTM4NTkwNjljNjgxM2RhNzgyYTRjZWI5YWM5MzhhOThkNzEiLCJwYWdlVGl0bGUiOiAiKDUyN%2BWwgeacquivuykg6YKu566x5aSn5biIIiwidXJsUGF0aCI6ICIvYXBwcy93ZWJtYWlsIiwiY3VycmVudERvbWFpbiI6ICJkYXNoaS4xNjMuY29tIiwicGFnZU9wZW5TY2VuZSI6ICJCcm93c2VyIiwic2Vjb25kTGV2ZWxTb3VyY2UiOiAiIiwiYXR0cmlidXRlcyI6IHsiZmlkIjogMSwiZGlkIjogImU3ZmQ2MzUyNTJjNGE5MWVmMGVhN2Y4OWVjODVkYTk5X3YxIiwibWFsZnJvbSI6ICJtYWlsMTYzIiwiZGFzaGlfdWlkIjogIjViMDcxMmZiZGY5NzEyYjlhZDMxMmVlZThlODgyODdjIiwidWlkIjogInNxYmNhaUAxNjMuY29tIiwiYWNjb3VudHNfbGVuZ3RoIjogNSwiZXZlbnRUeXBlIjogImNsaWNrIn19&appKey=81faa49c0dd3e640effe3b4af800c91483556b55&_=1688446288710"
  "scheme"="https"
  "accept"="*/*"
  "accept-encoding"="gzip, deflate, br"
  "accept-language"="zh-CN,zh;q=0.9"
  "origin"="https://dashi.
  "referer"="https://dashi.
  "sec-ch-ua"="`" Not A;Brand`";v=`"99`", `"Chromium`";v=`"102`", `"Google Chrome`";v=`"102`""
  "sec-ch-ua-mobile"="?0"
  "sec-ch-ua-platform"="`"Windows`""
  "sec-fetch-dest"="empty"
  "sec-fetch-mode"="cors"
  "sec-fetch-site"="cross-site"
}
1 回复
#2
约定的童话2023-07-04 20:37
网抓代码嘛,用VBA也可做,目测是下载附件啥的
1