Skip to content

Instantly share code, notes, and snippets.

@csrutil
Created December 4, 2022 10:21
Show Gist options
  • Save csrutil/2ccb24fb31c51b36022be7c15cb72d72 to your computer and use it in GitHub Desktop.
Save csrutil/2ccb24fb31c51b36022be7c15cb72d72 to your computer and use it in GitHub Desktop.
curl 'http://dns.weixin.qq.com/cgi-bin/micromsg-bin/newgetdns' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/jxl,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
-H 'Accept-Language: en-US,en;q=0.9' \
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Cookie: pgv_pvid=3065483806' \
-H 'DNT: 1' \
-H 'Pragma: no-cache' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36' \
--compressed \
--insecure \
| grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' \
| sort \
| uniq \
| awk '{ print "- IP-CIDR," $0 "/32,DIRECT"; }'
@csrutil
Copy link
Author

csrutil commented Apr 23, 2023

curl 'http://dns.weixin.qq.com/cgi-bin/micromsg-bin/newgetdns' \
  -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/jxl,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
  -H 'Accept-Language: en-US,en;q=0.9' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Cookie: pgv_pvid=3065483806' \
  -H 'DNT: 1' \
  -H 'Pragma: no-cache' \
  -H 'Upgrade-Insecure-Requests: 1' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36' \
  --compressed \
  --insecure \
  | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' \
  | sort \
  | uniq \
  | awk '{ print "ipset add CHINALIST " $0 " -q"; }' > qq.ipset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment