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
:: Runas ADMINISTRATOR | |
@ECHO OFF&(PUSHD "%~DP0")&(REG QUERY "HKU\S-1-5-19">NUL 2>&1)||( | |
powershell -Command "Start-Process '%~sdpnx0' -Verb RunAs"&&EXIT) | |
:: These settings will be restored everytime Windows reboot | |
netsh interface ipv6 set global randomizeidentifiers=disabled | |
netsh interface ipv6 set privacy state=disabled | |
:: Change 网桥 to your interface name, usually Ethernet | |
:: Show all interface: netsh interface show interface |
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
import requests | |
import sys | |
# Configuration | |
BASE_URL = "http://ip:8455" | |
USERNAME = "admin" # to manage storage, admin permission is required | |
PASSWORD = "{{PASSWORD}}" | |
MAX_LOGIN_ATTEMPTS = 5 | |
MAX_RELOAD_ATTEMPTS = 3 |
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
import requests | |
import ipaddress | |
proxy = { | |
"http": None, | |
"https": None | |
} | |
# 配置 | |
api_token = '{{API_HERE}}' # 替换为你的 Cloudflare API 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 | |
FLAG_FILE="/tmp/ipv6_prefix_change_flag" | |
FLAG_VALUE=$(cat $FLAG_FILE 2>/dev/null) | |
if [ "$FLAG_VALUE" = "1" ]; then | |
logger -t prefix_change "Script is already running. Skipping execution." | |
exit 0 | |
fi |
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
''' | |
Convert | |
192.168.0.0-192.168.2.255 | |
to | |
"192.168.0.0/23", | |
"192.168.2.0/24", | |
''' | |
import ipaddress | |
def ip_range_to_cidrs(start_ip:str, end_ip:str): |