// ==UserScript==
// @name 蝉大师
// @namespace undefined
// @description 蝉大师
// @match *://www.chandashi.com/*
// @require https://code.jquery.com/jquery-latest.js
// @run-at document-start
// ==/UserScript==
function untopAllKeywords() {
var untops = $('.span-img-untop');
for (var i = 0; i != untops.length; i++) {
untops[i].click();
}
}
function waitForKeyElements (
selectorTxt, /* Required: The jQuery selector string that
specifies the desired element(s).
*/
actionFunction, /* Required: The code to run when elements are
found. It is passed a jNode to the matched
element.
*/
bWaitOnce, /* Optional: If false, will continue to scan for
new elements even after the first match is
found.
*/
iframeSelector /* Optional: If set, identifies the iframe to
search.
*/
) {
var targetNodes, btargetsFound;
if (typeof iframeSelector == "undefined")
targetNodes = $(selectorTxt);
else
targetNodes = $(iframeSelector).contents ()
.find (selectorTxt);
if (targetNodes && targetNodes.length > 0) {
btargetsFound = true;
/*--- Found target node(s). Go through each and act if they
are new.
*/
targetNodes.each ( function () {
var jThis = $(this);
var alreadyFound = jThis.data ('alreadyFound') || false;
if (!alreadyFound) {
//--- Call the payload function.
var cancelFound = actionFunction (jThis);
if (cancelFound)
btargetsFound = false;
else
jThis.data ('alreadyFound', true);
}
} );
}
else {
btargetsFound = false;
}
//--- Get the timer-control variable for this selector.
var controlObj = waitForKeyElements.controlObj || {};
var controlKey = selectorTxt.replace (/[^\w]/g, "_");
var timeControl = controlObj [controlKey];
//--- Now set or clear the timer as appropriate.
if (btargetsFound && bWaitOnce && timeControl) {
//--- The only condition where we need to clear the timer.
clearInterval (timeControl);
delete controlObj [controlKey];
}
else {
//--- Set a timer, if needed.
if ( ! timeControl) {
timeControl = setInterval ( function () {
waitForKeyElements ( selectorTxt,
actionFunction,
bWaitOnce,
iframeSelector
);
},
300
);
controlObj [controlKey] = timeControl;
}
}
waitForKeyElements.controlObj = controlObj;
}
(function() {
waitForKeyElements("#switchMin,#switchHour", function(node) {
console.log('fuck');
node.click(function() {
isCustomerApp = '1';
isVip = '1';
isCustomer = '1';
istop = '1';
});
});
})();
Rebuild Explorer icon cache
@ECHO OFF
::TaskKill /im "Explorer.exe" /f
echo waiting for explorer exited
pause
Attrib -s -h -r "%UserProfile%\AppData\Local\IconCache.db"
Del /q "%UserProfile%\AppData\Local\IconCache.db"
Del /q "%LocalAppData%\Microsoft\Windows\Explorer\*.db"
pushd %CD%
cd/d "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\"
for /f "delims=" %%i in ('dir/b/a thumbcache_*.db') do (
attrib -s -h -r "%%~fi"
Del /q "%%~fi"
)
popd %CD%
reg delete "HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v IconStreams /f
reg delete "HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v PastIconsStream /f
Start Explorer.exe
VS 2015 编译 PyQt
qt\build.bat
@echo off
cd/d "%~dp0"
set ARCH=amd64
set "QT_ROOT=%~dp0"
set QMAKESPEC=win32-msvc2015
set CL=/MP3 /GL
set LINK=/OPT:REF /LTCG:INCREMENTAL
if not defined QT_INITIALIED (
set "PATH=%QT_ROOT%qtbase\bin;D:\Dev\Python;%PATH%"
)
if not defined QT_INITIALIED (
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" %ARCH%
set QT_INITIALIED=1
)
::configure -platform win32-msvc2015 -prefix c:\Qt\5.3.0.2015\msvc2013 -opensource -confirm-license -c++11 -opengl desktop -nomake examples -nomake tests -qt-sql-sqlite -icu -I C:\Qt\icu_52_1_msvc_2013_32_devel\icu\include -L C:\Qt\icu_52_1_msvc_2013_32_devel\icu\lib -openssl -I C:\Qt\openssl-1.0.1h.VS2013\include -L C:\Qt\openssl-1.0.1h.VS2013\lib -plugin-sql-mysql -I C:\Qt\MySql5.1\include -L C:\Qt\MySql5.1\lib\opt
configure -platform win32-msvc2015 ^
-release ^
-shared ^
-ltcg ^
-opensource -confirm-license -c++11 ^
-opengl desktop ^
-direct2d ^
-directwrite ^
-nomake examples ^
-nomake tests ^
-qt-sql-sqlite
pyqt\build.bat
@echo off
cd/d "%~dp0"
set ARCH=amd64
set "QT_ROOT=D:\Desktop\pyqt\qt5\5.5\Src\"
set QMAKESPEC=win32-msvc2015
set CL=/MP3 /GL
set LINK=/OPT:REF /LTCG:INCREMENTAL
if not defined QT_INITIALIED (
set "INCLUDE=D:\Desktop\pyqt\sip-4.17\siplib;%INCLUDE%"
set "PATH=%QT_ROOT%qtbase\bin;D:\Dev\Python;D:\Desktop\pyqt\sip-4.17\sipgen;%PATH%"
)
if not defined QT_INITIALIED (
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" %ARCH%
set QT_INITIALIED=1
)
call configure.py --confirm-license
在 Windows 10 上用 openvpn 搭建代理服务器
首先下载最新的 openvpn
cd/d C:\Program Files\OpenVPN\easy-rsa
init-config.bat
然后可以编辑一下 1
vars.bat
@echo off
set HOME=%~dp0
set KEY_CONFIG=openssl-1.0.0.cnf
set KEY_DIR=keys
set KEY_SIZE=2048
set KEY_COUNTRY=CN
set KEY_PROVINCE=BJ
set KEY_CITY=Ouroboros
set KEY_ORG=Ouroboros
set KEY_EMAIL=Ouroboros@Ouroboros.com
set KEY_CN=Ouroboros
set KEY_NAME=Ouroboros
set KEY_OU=Ouroboros
set PKCS11_MODULE_PATH=changeme
set PKCS11_PIN=1234
调用
初始化变量, 调用 1
vars.bat
初始化 1
clean-all.bat
目录1
keys
C:\Program Files\OpenVPN\easy-rsa>vars.bat
C:\Program Files\OpenVPN\easy-rsa>clean-all.bat
The system cannot find the file specified.
1 file(s) copied.
1 file(s) copied.
C:\Program Files\OpenVPN\easy-rsa>
1
build-ca.bat
C:\Program Files\OpenVPN\easy-rsa>build-ca.bat
WARNING: can't open config file: /etc/ssl/openssl.cnf
Loading 'screen' into random state - done
Generating a 2048 bit RSA private key
.............................+++
.....................................................................................+++
writing new private key to 'keys\ca.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [CN]:
State or Province Name (full name) [BJ]:
Locality Name (eg, city) [Ouroboros]:
Organization Name (eg, company) [Ouroboros]:
Organizational Unit Name (eg, section) [Ouroboros]:
Common Name (eg, your name or your server's hostname) [Ouroboros]:
Name [Ouroboros]:
Email Address [Ouroboros@Ouroboros.com]:
C:\Program Files\OpenVPN\easy-rsa>
1
build-key-server.bat server
C:\Program Files\OpenVPN\easy-rsa>build-key-server.bat server
WARNING: can't open config file: /etc/ssl/openssl.cnf
Loading 'screen' into random state - done
Generating a 2048 bit RSA private key
......................+++
........+++
writing new private key to 'keys\server.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [CN]:
State or Province Name (full name) [BJ]:
Locality Name (eg, city) [Ouroboros]:
Organization Name (eg, company) [Ouroboros]:
Organizational Unit Name (eg, section) [Ouroboros]:
Common Name (eg, your name or your server's hostname) [Ouroboros]:server
Name [Ouroboros]:
Email Address [Ouroboros@Ouroboros.com]:
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:123456
An optional company name []:
WARNING: can't open config file: /etc/ssl/openssl.cnf
Using configuration from openssl-1.0.0.cnf
Loading 'screen' into random state - done
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
countryName :PRINTABLE:'CN'
stateOrProvinceName :PRINTABLE:'BJ'
localityName :PRINTABLE:'Ouroboros'
organizationName :PRINTABLE:'Ouroboros'
organizationalUnitName:PRINTABLE:'Ouroboros'
commonName :PRINTABLE:'server'
name :PRINTABLE:'Ouroboros'
emailAddress :IA5STRING:'Ouroboros@Ouroboros.com'
Certificate is to be certified until Oct 20 20:20:52 2025 GMT (3650 days)
Sign the certificate? [y/n]:y
1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated
C:\Program Files\OpenVPN\easy-rsa>
1
build-key.bat client_someone
C:\Program Files\OpenVPN\easy-rsa>build-key.bat client_someone
WARNING: can't open config file: /etc/ssl/openssl.cnf
Loading 'screen' into random state - done
Generating a 2048 bit RSA private key
.........................................................................+++
...........................................................+++
writing new private key to 'keys\client_someone.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [CN]:
State or Province Name (full name) [BJ]:
Locality Name (eg, city) [Ouroboros]:
Organization Name (eg, company) [Ouroboros]:
Organizational Unit Name (eg, section) [Ouroboros]:
Common Name (eg, your name or your server's hostname) [Ouroboros]:client_someone
Name [Ouroboros]:
Email Address [Ouroboros@Ouroboros.com]:
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:123456
An optional company name []:
WARNING: can't open config file: /etc/ssl/openssl.cnf
Using configuration from openssl-1.0.0.cnf
Loading 'screen' into random state - done
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
countryName :PRINTABLE:'CN'
stateOrProvinceName :PRINTABLE:'BJ'
localityName :PRINTABLE:'Ouroboros'
organizationName :PRINTABLE:'Ouroboros'
organizationalUnitName:PRINTABLE:'Ouroboros'
commonName :T61STRING:'client_someone'
name :PRINTABLE:'Ouroboros'
emailAddress :IA5STRING:'Ouroboros@Ouroboros.com'
Certificate is to be certified until Oct 20 20:22:03 2025 GMT (3650 days)
Sign the certificate? [y/n]:y
1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated
C:\Program Files\OpenVPN\easy-rsa>
1
build-dh.bat
C:\Program Files\OpenVPN\easy-rsa>build-dh.bat
WARNING: can't open config file: /etc/ssl/openssl.cnf
Loading 'screen' into random state - done
Generating DH parameters, 2048 bit long safe prime, generator 2
This is going to take a long time
..........................................................................
....+........+.....+............................+.................+.......
....+.......+......+.........+............................................
.
.
....................................................................++*++*
C:\Program Files\OpenVPN\easy-rsa>
好了, 现在到 keys 里看看, 有这么些文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
01.pem
02.pem
ca.crt
ca.key
client_someone.crt
client_someone.csr
client_someone.key
dh2048.pem
index.txt
index.txt.attr
serial
server.crt
server.csr
server.key
其中, 这些放到服务端
下:1
openvpn\config
1
2
3
4
ca.key
ca.crt
server.crt
server.key
这些放到客户端
下:1
openvpn\config
1
2
3
ca.crt
client_someone.crt
client_someone.key
再编写
和 1
server.ovpn
. 首先是 1
client.ovpn
:1
server.ovpn
port 2333
proto tcp
dev tap
server 10.8.0.0 255.255.255.0
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
push "redirect-gateway def1"
push "dhcp-option DNS 114.114.114.114"
keepalive 10 120
comp-lzo
persist-key
persist-tun
verb 3
接着是
:1
client.ovpn
client
dev tap
proto tcp
remote OPEN_VPN_SERVER_IP 2333
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client_someone.crt
key client_someone.key
remote-cert-tls server
comp-lzo
verb 3
分别把这两个
放到对应的 1
.ovpn
下1
openvpn\config
最后还要配置一下服务器:
- 启动
服务, 最好设为自动1
Routing and Remote Access
- 在
下新建名为1
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
的1
IPEnableRouter
, 设为1
DWORD
1
1
- 最后设置一下联网的网卡的连接共享, 注意 TAP 的名字, 最好不要有中文, 如下图

设置完后重启即可
WNDR4300 安装 openwrt 小记
先来这里下载最新的固件, 现在最新的是 1
openwrt-15.05-rc3-ar71xx-nand-wndr4300-ubi-factory.img
https://downloads.openwrt.org/chaos_calmer/15.05-rc3/ar71xx/nand/
刷好后, 设置好 root 密码启用 ssh
可以在这里下到各种软件的 bin
https://github.com/shadowsocks/openwrt-shadowsocks
http://sourceforge.net/projects/openwrt-dist/files/shadowsocks-libev/2.2.2-89e0f7f/ar71xx/
http://sourceforge.net/projects/openwrt-dist/files/luci-app/shadowsocks-spec/
wget ss-libev 和 ss-luci-app, 1
opkg install x.ipk
1
wget -O- 'http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' | awk -F\| '/CN\|ipv4/ { printf("%s/%d\n", $4, 32-log($5)/log(2)) }' > /etc/shadowsocks/ignore.list2
在
里添加下面几行1
/etc/dnsmasq.conf
1
2
3
4
5
6
7
8
9
10
11
12
no-resolv
server=208.67.222.222#5353
server=208.67.220.220#5353
server=/cn/114.114.114.114
server=/bilibili.com/114.114.114.114
server=/weibo.com/114.114.114.114
server=/alicdn.com/114.114.114.114
server=/tbcdn.com/114.114.114.114
server=/taobao.com/114.114.114.114
server=/alipay.com/114.114.114.114
server=/tmall.com/114.114.114.114
1
/etc/init.d/dnsmasq restart