空路由或者说黑洞路由是一个没有最终目的地的路由。匹配的包将被删除或者抛弃而不是转发。这种空路由的行为也被称做黑洞过滤。简单说空路由就是不路由。 创建空路由主要用于保护你的系统,使其不发送任何响应数据给远程系统。
创建一个空路由
创建空路由通常使用 `route` 命令。尽管语法上存在一些差异,但是 Window 和 Unix 系统都支持这个命令。
创建一个C 网段的空路由:
# route add 193.252.19.0 0.0.0.0 add net 193.252.19.0: Glossary Link gateway 0.0.0.0
用`netstat -nr`命令我们可以看到新添加的空路由:
# netstat -nr
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
…
193.252.19 0.0.0.0 UGS 0 0 fxp0
..
命令结果显示无论我们从这个网段收到什么数据包,都不会做任何应答。空路由通常用于防止那些发送垃圾邮件的服务器和网络上一些无聊的人。
在Linux下用 iproute2 创建空路由
$ ip route add blackhole 192.168.32.128/32
在Solaris 和 BSD 下用 route 创建空路由:
$ route add -host 10.10.0.1 127.0.0.1 -blackhole
$ route add -net 10.10.64.0/18 127.0.0.1 -blackhole
Cisco IOS 上可以路由到 Null0 接口:
ip route 192.168.0.0 255.255.0.0 Null0
在Windows XP/Vista下不支持reject或者blackhole参数
指向路由,不过可以指定一个不存在的IP地址(例如:192.168.32.254)作为目标网关来实现。
route -p ADD 192.168.32.128 MASK 255.255.255.255 192.168.32.254
译自:
http://mayur.gondaliya.com/computer-networks/creating-a-null-route-341.html
wget http://mirror.zeddicus.com/auto-l2tp/1.2/centos/l2tp.sh
chmod +x l2tp.sh
./l2tp.sh
window 7 支持L2TP 需要修改注册表
下载 l2tp.rar
window xp l2tp 设置参考:
http://www.vpsyou.com/2010/10/04/l2tp-vpn.html
具体参考:
http://www.vpsyou.com/2010/10/04/l2tp-vpn.html
标签:
发现淘宝首页的搜索框支持语音识别输入。
稍微研究了下发现是Google Chrome 支持语音识别输入。
做了个简单的Demo:
<!Doctype html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh" lang="zh">
<head>
<title>test</title>
</head>
<body>
<input type="text" id="a" name="a" autofocus="true" autocomplete="off"
x-webkit-speech="" x-webkit-grammar="builtin:translate" />
</body>
</html>
注意:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh" lang="zh">
lang务必用zh
要不然对着麦克风说半天中文识别出来的都是废。
用Chrome同学可以在下面的输入框里看到个麦克风。
编辑 ~/.bashrc
增加:
export TERM=xterm-256color
标签:
wget –save-headers=on –save-cookies=cookie –keep-session-cookies “https://www.adobe.com/cfusion/tdrc/index.cfm?product=acrobat_pro&loc=cn”
screen wget -r -x –load-cookies=cookie –keep-session-cookies “http://trials2.adobe.com/AdobeProducts/PHSP/12_1/osx10/Photoshop_12_1_LS3.dmg”
1. sudo easy_install Pygments
2. emacs ~/.bash_profile
增加
# for syntax highlight
alias xcat=’pygmentize -f console’
3. xcat jquery.js
input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
outline: 2px solid #6FA1D9 !important;
-webkit-box-shadow:0px 0px 5px #6FA1D9 !important;
}
input[type="checkbox"]:focus,input[type="submit"]:focus,input[type="reset"]:focus, input[type="radio"]:focus {
outline: 1px solid #6FA1D9 !important;
}
参考:
http://www.douban.com/group/topic/13291053/
http://fis.io/firefox-input-area-highlighting.html
http://www.balsamiq.com
NGEN
eJzzzU/OLi0odswsqvFzd/WrsUQCNc41hmBRAO9oC9s=
标签:
private String convertToValidBase64Encode(String cookieParam)
{
switch(cookieParam.length()%4)
{
case 3:
cookieParam=cookieParam+”=”;
break;
case 2:
cookieParam=cookieParam+”==”;
break;
case 1:
cookieParam=cookieParam+”===”;
break;
default:
System.out.println(“Default: the cookieParam value is–”+cookieParam);
}
return cookieParam;
}
标签:
cURL 需要 ssl 所以在window下需要把
libeay32.dll
ssleay32.dll
这两个DLL 复制到windows\system32 或者 Server\bin 目录下。
标签: