Skip to content

Instantly share code, notes, and snippets.

View yumusb's full-sized avatar
🎯
Focusing

榆木 yumusb

🎯
Focusing
View GitHub Profile
@yumusb
yumusb / main.sh
Last active February 9, 2023 07:33
判断是否可用openai
if [[ $(curl -sS https://chat.openai.com/ -I | grep "text/plain") != "" ]]
then
echo "IP被BAN"
else
iso2_code=$(curl -sS https://chat.openai.com/cdn-cgi/trace | grep "loc=" | awk -F= '{print $2}')
country=$(curl -sS https://raw.githubusercontent.com/lukes/ISO-3166-Countries-with-Regional-Codes/master/all/all.csv | grep ",$iso2_code," | awk -F, '{print $1}')
country=$(echo ${country/\"/})
if [[ $(curl -sS "https://openaiapi-site.azureedge.net/public-assets/d/7f4419c385/static/js/main.3133adcb.js" | grep "\"${country}\"") != "" ]]
then
echo "可正常使用"
import sys
def httpget(url):
if sys.version_info.major == 2:
import urllib2
req = urllib2.Request(url)
data = urllib2.urlopen(req).read()
return data
else:
import urllib.request
194.5.xx.235:443
172.86.xx.233:443
138.3.xx.162:443
185.232.xx.114:443
47.240.xx.217:7547
66.42.xx.123:443
66.42.xx.180:443
47.240.xx.160:7547
168.138.xx.154:443
144.24.xx.202:443
{
"Ip": "42.193.225.116",
"Ports": ["42.193.225.116:22", "42.193.225.116:8888"],
"DefaultBeaconResponses": {
"http://42.193.225.116:8888/": "302/219"
},
"Jarm": "",
"Certificate": "",
"Beacons": null
}
#!/usr/bin/env bash
# shellcheck disable=SC2268
BIN_PATH=${BIN_PATH:-/usr/local/share/mtg}
TOML_PATH=${TOML_PATH:-/usr/local/etc/mtg}
curl() {
$(type -P curl) -L -q --retry 5 --retry-delay 10 --retry-max-time 60 "$@"
}
systemd_cat_config() {
if systemd-analyze --help | grep -qw 'cat-config'; then
systemd-analyze --no-pager cat-config "$@"
@yumusb
yumusb / clien2.ovpn
Last active February 23, 2021 10:03
client
dev tun
proto tcp
remote 1.1.1.1 1194
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
comp-lzo
port 1194
proto tcp
dev tun
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
dh /etc/openvpn/keys/dh2048.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
<!--
// -------------------------------------------------------------
// author Giga
// project qeeqbox/social-analyzer
// email gigaqeeq@gmail.com
// description app.py (CLI)
// licensee AGPL-3.0
// -------------------------------------------------------------
// contributors list qeeqbox/social-analyzer/graphs/contributors
// -------------------------------------------------------------
drop() {
echo "drop censys"
for ip in 192.35.168.0/23 162.142.125.0/24 74.120.14.0/24 167.248.133.0/24
do
#echo $ip;
iptables -I INPUT -s $ip -j DROP -m comment --comment "censys.io";
done
echo "drop shodan"
for ip in 93.174.95.106 94.102.49.193 80.82.77.139 94.102.49.190 185.163.109.66 89.248.172.16 71.6.146.186 89.248.167.131 185.181.102.18 80.82.77.33 198.20.69.0/24 198.20.70.0/24 198.20.99.0/24 66.240.236.119 71.6.135.131 66.240.192.138 71.6.167.142 82.221.105.6 82.221.105.7 71.6.165.200 188.138.9.50 71.6.146.185 71.6.158.166 198.20.87.0/24 66.240.219.146 104.131.0.69
sed -i 's/#include luawaf.conf;/include luawaf.conf;/g' nginx.txt