chrome app store in new tab

Recently Google began to put app store things into chrome new tab page.

I found this on ubuntu with chromium 9.0.597.94 (73967).

It’s pretty cool and I tried a lot of things, like my favorite  flash game Canabalt, google Talk and so on.

The apps web page is also become more attractive, comparing with chrome extension web pages.

I tried google talk app the first time I saw it, and it turned to be Chrome OS only… Google is definitely working on making Chrome OS special, and unfortunately, exclusive. I really don’t like the way as Apple goes, but on the other hand, the open minded Android market is not such a success as well.

php nslookup 安全性检查

昨天做了这个http://pp.hawkwithwind.net/nslookup.php之后,忽然想到,其实完全可以做一个网页版的命令行,远程控制服务器,其实相当于网页版的ssh了。转念一想,不行,因为那样的话安全性没有保障,等于是把自家后院交给人家随意践踏了。

想到这里,忽然意识到,自己写的那个nslookup.php,其实只是简单的把用户提交的字符串前面加一个"nslookup "然后给系统调用,这样其实是非常危险的。例如我尝试在输入框里面输入twitter.com & whoami,结果除了返回twitter的ip信息,也返回了我在服务器上的用户名。这种可怕的缺陷给黑客太多可趁之机了。立刻修改。

我目前的想法是,字符串里包含后台符号 &,分号 ; , 管道符号 | , 重定向符号 > 或者选项符号 – 的时候,就拒绝服务。另外也禁止了字符串内部的空格或者换行符。这样的话,似乎就没有其他的问题了吧?我在这方面不是很熟,估计还会有问题,欢迎黑客及爱好者们赐教~

后来又发现了好多其他可能的符号会导致插入语句。。现在我禁止的符号更多了。。包括大括号{}还有问号冒号等等都被我禁掉了。。

另外,虽然只有几行代码,我把他放到了github上,希望能给大家提供一点帮助~
https://github.com/hawkwithwind/phpNetTools