Skip to content

Instantly share code, notes, and snippets.

View MisakaMikoto-35c5's full-sized avatar
🌚
🌚

MisakaMikoto-35c5

🌚
🌚
View GitHub Profile
import re
import urllib
from urllib import request
class PixivSpider:
IMAGE_PATTERN = re.compile(r'src="http[s]://[\w\d\-\_\.]{4,255}/\w/600x600/img-master/img/\d{4}/\d{2}/\d{2}/\d{2}/\d{2}/\d{2}/\d+_p0_master1200.jpg" alt="[^"]+"')
TAGS_PATTERN = re.compile(r'<ul class="inline-list"><li class="tag">.+</li></ul>')
TAG_PATTERN = re.compile(r'class="text">[^<>]+</a>')
#!/usr/bin/env python3
import time
class FakeFileType:
def __init__(self, permission, user, group, size, create_time):
self.PERMISSION = permission
self.USER = user
self.GROUP = group
self.SIZE = size
#!/bin/sh
DNS=114.114.115.115
wget -O /etc/dnsmasq.d/accelerated-domains.china.conf --no-check-certificate \
https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf
wget -O /etc/dnsmasq.d/apple.china.conf --no-check-certificate \
https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/apple.china.conf
wget -O /etc/yum.repos.d/dcantrel-cde-epel-7.repo https://copr.fedorainfracloud.org/coprs/dcantrel/cde/repo/epel-7/dcantrel-cde-epel-7.repo
yum update -y
yum install cde -y
yum -y groupinstall "X window system"
echo -e '\n\nTERM=linux' >> /etc/bashrc
systemctl set-default graphical
systemctl enable dtlogin
systemctl start dtlogin
#!/usr/bin/python3
# Source: https://python3-cookbook.readthedocs.io/zh_CN/latest/c11/p02_creating_tcp_server.html
import socket
import random
import threading
from socketserver import ThreadingTCPServer
from socketserver import StreamRequestHandler, TCPServer
@MisakaMikoto-35c5
MisakaMikoto-35c5 / isp-filter.py
Created December 8, 2019 13:03
筛选运营商
#!/usr/bin/python3
# Data Source: https://iptoasn.com/
# Format: range_start range_end AS_number country_code AS_description
# Split: \t
def data_reader(filename):
filepipe = open(filename, 'r', encoding='utf-8')
data_str = filepipe.read()
filepipe.close()
#!/usr/bin/python3
import requests, json, time
class Worker:
API_PREFIX = 'http://10.0.2.1/qbittorrent'
HTTP_AUTH_ENABLED = True
HTTP_AUTH_USERNAME = 'yjsnpi'
HTTP_AUTH_PASSWORD = '1145141919810893'

OpenWRT-NPTv6-scripts

LICENSE

WTFPL

Note

  • File iptables-nptv6.sh is tested on OpenWRT 19.07 it's use iptables as network filter tool.
  • File nptv6.sh is tested on OpenWRT 23.05, and use nftables as network filter tool. It also keep iptables compatibility but no tested. If have any issue, please comment at below (suggested) or email me.

Install Phantun

Install

Onekey Install: curl -fsSL https://gist.githubusercontent.com/MisakaMikoto-35c5/0e469016745fbf27480c39ae3156f280/raw/install-phantun.sh | sudo bash Or on OpenWRT: curl -fsSL https://gist.githubusercontent.com/MisakaMikoto-35c5/0e469016745fbf27480c39ae3156f280/raw/install-phantun.sh | sh

Make sure unzip and curl is installed!!!

Usage