This file contains 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
#define SINGLETON(__class) \ | |
+ (instancetype)sharedInstance; | |
#define DEF_SINGLETON(__class) \ | |
static __class * __singleton__ = nil; \ | |
+ (instancetype)sharedInstance { \ | |
static dispatch_once_t once; \ | |
dispatch_once(&once, ^{ \ | |
__singleton__ = [[super allocWithZone:NULL] init]; \ | |
}); \ |
This file contains 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
#!/usr/bin/env python | |
# coding=utf-8 | |
# find my iphone 钓鱼网站 | |
import string, random | |
import requests | |
import time | |
import socket, struct | |
import thread, threading | |
from Queue import Queue |
This file contains 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
Iee9keaYk+mfs+S5kAp8fG11c2ljLjE2My5jb20KQEAqLm11c2ljLjEyNi5uZXQKCiFRUemfs+S5kAp8 | |
fHkucXEuY29tXgp8fGkueS5xcS5jb20vdjgvcGxheXNvbmcuaHRtbAp8fGMueS5xcS5jb20vdjgvZmNn | |
LWJpbi9mY2dfcGxheV9zaW5nbGVfc29uZy5mY2cKQEBkbC5zdHJlYW0ucXFtdXNpYy5xcS5jb20KCiHp | |
hbfni5fpn7PkuZAKfHxrdWdvdS5jb21eCnx8aXAua3Vnb3UuY29tL2NoZWNrL2lzY24KQEBmcy5vcGVu | |
Lmt1Z291LmNvbQoKIemFt+aIkemfs+S5kAp8fGt1d28uY25eCnx8aXBjaGVjay5rdXdvLmNuL2lwX2No | |
ZWNrLmt1d28KQEBzeWNkbi5rdXdvLmNuXgoKIeeZvuW6pumfs+S5kAp8fG11c2ljLmJhaWR1LmNvbS9k | |
YXRhL3VzZXIvbG9jYXRpb24KQEB5aW55dWVzaGl0aW5nLmJhaWR1LmNvbQo= |
This file contains 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
#!/bin/bash | |
set -e pipefail | |
uuid=`curl -fsSL "https://open.weixin.qq.com/connect/qrconnect?appid=wxaac6769b766cb943&redirect_uri=http%3A%2F%2Fads.privacy.qq.com%2Foptout%2FwxPassport&response_type=code&scope=snsapi_login&state=gryhphlfgdjhofds#wechat_redirect" | grep 'qrcode-image' | sed -E 's#.*<img class=".*" src="/connect/qrcode/(.*)" />#\1#'` | |
echo "请使用微信扫码登录..." | |
echo "二维码地址:https://open.weixin.qq.com/connect/qrcode/$uuid" | |
while :; do | |
wx_code=`curl -fsSL "https://long.open.weixin.qq.com/connect/l/qrconnect?uuid=$uuid" | sed -E "s/.*window.wx_code='(.*)';/\1/"` |
This file contains 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
#!/bin/bash | |
# | |
# This watchdog script restart systemctl wireguard service if ping timeout for 3 times | |
# | |
# Usage: | |
# ./wg-watchdog.sh [interface] [ip] | |
# | |
# Example: | |
# ./wg-watchdog.sh wg0 192.168.40.1 | |
# |
This file contains 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
#!/bin/sh | |
# 使用方式: | |
# 1. 使用小翼管家App绑定光猫,确保光猫处于在线状态 | |
# 2. 打开抓包工具,同时手机打开网关详情页,开关一下指示灯,获取token和mac地址 | |
# 3. 填入下面的环境变量中运行 | |
mac="112233AABBCC" | |
token="........................................................................................................" |
This file contains 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
#!/bin/sh | |
# ./amlogic-s9xxx-network-failsafe.sh | |
# 使用方式:在 Amlogic S9xxx 盒子及其 Docker 容器的 /etc/rc.local 中加入此文件,可以在开机后网络异常的情况下自动修复。若修复之后 60s 仍不正常,会自动重启。 | |
interface="eth0" | |
_logger() { | |
echo "[`basename "$0"`] $1" | |
} |
This file contains 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
#!/bin/sh | |
# Description: | |
# A WireGuard watchdog for OpenWrt. | |
# If peer has an endpoint_host, disconnected 2 minutes ago, and remote ip has changed, we will trigger an force reconnect for this interface. | |
# | |
# Usage: | |
# Add "*/10 * * * * sh /path/to/openwrt-wireguard-watchdog.sh" in crontab. | |
# | |
# Dependency: busybox, resolveip, uci, wireguard-tools |
This file contains 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
#!/bin/bash | |
# This script is generated by chatgpt for telnet auto-login. | |
if [ $# -eq 0 ]; then | |
echo "Usage: $0 <host>" | |
exit 1 | |
fi | |
host=$1 | |
user=$(grep -A 2 "Host $host" ~/.ssh/config | grep User | awk '{print $2}') |
This file contains 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
#!/bin/sh | |
# Run this script from cron every 10 minutes: | |
# echo '*/10 * * * * /path/to/ddns_watchdog.sh' >> /etc/crontabs/root | |
. /lib/functions.sh | |
handle_ddns_service() { | |
local cfg="$1" | |
local enabled |
OlderNewer