Skip to content

Instantly share code, notes, and snippets.

@abc1763613206
abc1763613206 / bvtest.py
Last active February 23, 2024 22:18
BVID Validate
import requests
import json
import random
Back_URL = 'https://api.bilibili.com/x/web-interface/archive/stat?aid='
headers = {
'Cookie': "Replace Me With REAL COOKIE" ,
'Pragma': 'no-cache',
@kenshin17
kenshin17 / install-ndppd-active-ipv6-subnet.sh
Last active January 21, 2024 14:56
Script install NDP Proxy Daemon, active full subnet ipv6.
#!/bin/bash
# Author: kenshin17
# OS: Centos 7
# Description: Script install NDP Proxy Daemon, active full subnet ipv6.
IPv6SUBNET="xxxx:xxxx:xxxx:xxxx::/64"
echo "######################## CONFIG SYSCTL #########################"
echo "net.ipv6.conf.all.accept_ra = 2" >> /etc/sysctl.conf
echo "net.ipv6.conf.eth0.accept_ra = 2" >> /etc/sysctl.conf
@xiaostrong
xiaostrong / qqmessage.py
Created February 21, 2018 08:57
QQ空间留言脚本
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import requests
import time
import re
import json
import time
def login():
options = webdriver.ChromeOptions()
@blackgear
blackgear / surge.conf
Created October 26, 2015 05:39
Surge config for new user
[General]
loglevel = warning
bypass-system = true
skip-proxy = 192.168.0.0/16,10.0.0.0/8,172.16.0.0/12,localhost,*.local,*.lan
bypass-tun = 192.168.0.0/16,10.0.0.0/8,172.16.0.0/12
dns-server = 114.114.114.114,114.114.115.115
[Proxy]
PROXY = custom,服务器地址,服务器端口,加密方式,密码,模块地址,tcp-fast-open=true
@isayme
isayme / v2ex_coin.py
Last active July 3, 2020 07:59
V2EX 每日登陆奖励自动获取脚本. 此脚本不再更新, 毕竟要依赖第三方pycurl库. 新版见: https://github.com/isayme/v2ex
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 此脚本不再更新, 毕竟要依赖第三方pycurl库.
# 重写的脚本不再依赖非标准库, 感兴趣的见: https://github.com/isayme/v2ex
import sys
import string
try:
import pycurl2 as pycurl
@messense
messense / shadowsocks-on-openwrt.md
Last active June 8, 2023 07:49
shadowsocks on openwrt

配置 shadowsocks

架设好 shadowsocks 服务端,在路由器上安装 shadowsocks 客户端,并配置 /etc/config/shadowsocks.json ,假设本地监听端口为 1080 。启动 shadowsocks

/etc/init.d/shadowsocks start

配置 privoxy

安装 privoxy openwrt 版。

anonymous
anonymous / hash.php
Created March 27, 2013 07:23
<?php
/**
* 加密 hash,生成发送给用户的 hash 字符串
*
* @param array $hash_data
* @param string $hash_key
* @return string
*/
function encode_hash($hash_data, $hash_key = false)
@horsley
horsley / dns.php
Created January 25, 2013 09:18
Simple PHP code act as a dig tool to find dns records
<?php
$result = array();
$result_html = '';
if (isset($_POST['domain']) && !empty($_POST['domain'])) {
$domain_regex = '/[a-z\d][a-z\-\d\.]+[a-z\d]/i';
if (preg_match($domain_regex, $_POST['domain'])) {
if ($url = parse_url($_POST['domain'])) { //compatible when user post an url instead of a domain
if (isset($url['host'])) {
$result = dns_get_record($url['host'], DNS_A + DNS_AAAA + DNS_CNAME);
} else if (isset($url['path'])) {
@ewangke
ewangke / pptpinstall.sh
Created July 14, 2012 10:19
Install PPTP vpn server on Xen Ubuntu
#!/bin/bash
# Interactive PoPToP install script on a OpenVZ VPS
# Tested on Debian 5, 6, and Ubuntu 11.04
# 2011 v1.1
# Author: Commander Waffles
# http://www.putdispenserhere.com/pptp-debian-ubuntu-openvz-setup-script/
echo "######################################################"
echo "Interactive PoPToP Install Script for OpenVZ VPS"
echo "by Commander Waffles http://www.putdispenserhere.com"
@chuangbo
chuangbo / README.md
Last active June 19, 2023 04:48
Python dynamic DNSPod DNS Script

替换上你的 API Token,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。

获取 API Token 的方式

获得 domain_id 可以用 curl

curl -k https://dnsapi.cn/Domain.List -d "login_token=TOKEN"`