Skip to content

Instantly share code, notes, and snippets.

View Justsoos's full-sized avatar
🌴
On vacation

Justsoos

🌴
On vacation
View GitHub Profile
@Justsoos
Justsoos / sip.sh
Last active November 10, 2018 03:51
CIL of taobao ipinfo
#!/bin/sh
ip=$(getent hosts $1 | head -n1 | cut -d " " -f1)
[ -z $ip ] && ip=$1
curl -s -H 'HOST:ip.taobao.com' "http://139.224.241.114/service/getIpInfo.php?ip=$ip" | jq '.'
@Justsoos
Justsoos / p.sh
Last active February 3, 2023 02:31
proxychains CLI wrapper (updated)
#!/bin/sh
# proxychains wrapper
# Choose pre-supposed profile with -1,-2,-3 OR appoint by -n proxy(Node)_ip(hostname):port and -p proxy_protocol and -q as quiet mode
# Default profile
proxy_hostname=127.0.0.1
proxy_port=1080
protocol=socks5
# profile 1
proxy_hostname_1=127.0.0.1
#!/usr/bin/env python3
# IMPORTANT! install the correct package: pip3 install html-table-parser-python3
# if puzzled by "from html_table_parser import HTMLTableParser, ImportError: cannot import name 'HTMLTableParser'"
# delete the dir of "python3/dist-packages/html_table_parser" manully and then reinstall, it comes from a bug of pip
import re
import requests
import argparse
# import logging
from requests.adapters import HTTPAdapter
@Justsoos
Justsoos / p.sh -- obsolete
Last active November 2, 2018 21:27
obsolete: proxychains CLI wrapper
#!/bin/sh
# proxychains CLI wrapper
# Choose pre-supposed profile with -1,-2,-3, OR no param means default profile, OR appoint manually by -n proxy(Node)_ip(hostname):port and -p proxy_Protocol
# Default profile
PROXY_HOSTNAME=127.0.0.1
PROXY_PORT=1080
PROTOCOL=socks5
# profile 1
PROXY_HOSTNAME1=127.0.0.1
@Justsoos
Justsoos / wifi.sh
Created April 5, 2018 16:28
Tiny Core Linux wifi script v1.1
#!/bin/sh
# (c) Robert Shingledecker 2011-2012 v1.1
. /etc/init.d/tc-functions
alias awk="busybox awk"
alias grep="busybox grep"
help() {
echo "Usage:"
echo " Default select AP from menu and request IP via DHCP."
@Justsoos
Justsoos / huya.py
Last active August 25, 2021 16:58
huya.com 流提取,不用 api,直接页面抓
#! /usr/bin/env python3
import re
import sys
import json
import logging
import requests
import argparse
import html
import base64
def json2link(configs_json):
d = configs_json
links = []
try:
if (isinstance(d, dict)) and d['configs']:
j = d['configs']
else:
j = d
for i in j:
def json2link(configs_json):
d = configs_json
link = []
try:
if (isinstance(d, dict)) and d['configs']:
j = d['configs']
else:
j = d
for i in j:
def link2json(single_link):
if not single_link:
return None
link = to_str(single_link).strip()
try:
if link[:5] == 'ss://':
t = link[5:]
elif link[:6] == 'ssr://':
raise ValueError('Not SS, but SSR address: {}'.format(link))
elif len(link) < 6:
一、 禁止修改HOSTS文件:
attrib +r +a +s +h %windir%\system32\drivers\etc\hosts
echo y|cacls %windir%\system32\drivers\etc\hosts /g everyone:r
二、允许修改HOSTS文件:
echo y|cacls %windir%\system32\drivers\etc\hosts /g everyone:f
attrib -r -a -s -h %windir%\system32\drivers\etc\hosts