Created
November 10, 2025 11:25
-
-
Save scottt/ec6d4f1a81b87c7eb4558ffdcb1e1a61 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $uri = 'https://127.0.0.1:16006/CHTCertTokenServer/checkport' | |
| $headers = @{ | |
| 'Accept' = '*/*' | |
| 'Accept-Language' = 'en-US,en;q=0.9,zh-TW;q=0.8,zh;q=0.7' | |
| 'Connection' = 'keep-alive' | |
| 'Content-Length' = '0' | |
| 'Content-Type' = 'text/plain;charset=UTF-8' | |
| 'Origin' = 'https://pki.chinatrust.com' | |
| 'Referer' = 'https://pki.chinatrust.com/' | |
| 'Sec-Fetch-Dest' = 'empty' | |
| 'Sec-Fetch-Mode' = 'cors' | |
| 'Sec-Fetch-Site' = 'cross-site' | |
| 'User-Agent' = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0' | |
| 'sec-ch-ua' = '"Not)A;Brand";v="8", "Chromium";v="138", "Microsoft Edge";v="138"' | |
| 'sec-ch-ua-mobile' = '?0' | |
| 'sec-ch-ua-platform' = '"Windows"' | |
| } | |
| # For self-signed certificates or untrusted CAs, you might need to bypass SSL certificate validation. | |
| # Use this line with caution and only in development/testing environments where you understand the risks. | |
| # [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} | |
| Invoke-RestMethod -Uri $uri -Method POST -Headers $headers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment