BMTD 's Yard of Fun

Technology, Sports, Music, Chinese Essays

Browsing Posts in Internet and Web

Ganux simulates a linux terminal through a browser. According to the author: “I have changed it into a hacking-game. The objective of this game is to gain root of this “machine”. I can assure you that this’s not easy! A surprise will be given to those who can hack into it!”

So this is a minimum operating system running on the browser– quite interesting. I spent some time to look into the javascript code to find the secret there. Apparently it’s not difficult– basically it uses javascript to encrypt the passwords. We just need to get the password file (that’s easy if you understand the code) — the file is in unix password format and encrypted using crypt(3) algorithm. Then use a password cracker such as John the Ripper to crack the root password– that may need several days or longer depends on your machine speed and dictionary size.

The author of Ganux is also the authour of the open source PHP gmail lib, a very useful library– combining ganux and gmail will be cool– imagine we have an OS running on the web browsers and the underlying file sytem is using GMail as the storage…

quoted from Greasemonkey’s web site (http://greasemonkey.mozdev.org/) : Greasemonkey is a Firefox extension which lets you to add bits of DHTML (“user scripts”) to any webpage to change it’s behavior. In much the same way that user CSS lets you take control of a webpage’s style, user scripts let you easily control any aspect of a webpage’s design or interaction.

Just tried the firefox greasemonkey — I was trying to use it for enhancing the batch website snapshot-capture script: One problem of the current script is that the mozilla remote control command is asynchronos so it does not know whether the current page has been fully loaded or not before taking the snapshot and moving to the next web site; what it can do is simply to wait for a constant period of time between two web sites. Using a user script that applies to all web sites we can make sure the snapshot-capturing script is notified when every web page is completely loadedbefore it takes the snapshot.

I chose to use xmlhttprequest for simplicity– of course we can use other things such as xml-rpc or soap for the same purposes.

Here is a simple example of such script that uses xmlhttprequest on firefox:

<pre>
function getXmlHttp() {
    var xmlHttpObject;

    try {
            xmlHttpObject = new XMLHttpRequest();
    } catch (e) {
            xmlHttpObject = false;
    }

    return xmlHttpObject;
}

var httpRequest = getXmlHttp();

netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');
httpRequest.open('GET', 'http://localhost/test1.php', true);

httpRequest.onreadystatechange = function()
{
  if (httpRequest.readyState == 4)
    { alert(httpRequest.responseText); }
}

httpRequest.send(null);
</pre>

When i tested it i got security exception because the xmlHttpRequest object tries to connect to a host (localhost) that is different than the host of the requested web page URL. To get around this one has to sign the javascript or enable the signed.applets.codebase_principal_support policy on firefox.

p2p协议中gnutella protocol 传输效率低下,gnutella based clients的market share也逐渐减少,早已是irrelevent的东东。同样具有search功能的eDonkey/eMule network在大文件共享上要强得多。

但现在国外在p2p Streaming上实用的东东PeerCast (open source)却是基于gnutella协议的,用于audio streamming效果很不错, video效果感觉一般。

国外还有几个propreitery protocol的免费p2p streaming软件:p2pRadio是open source的用java写的,StreamerP2P是一个closed source产品。

在VOD或realtime broadcast之类的流媒体应用上真正有前途的的还是象bittorrent之类的高效swarming技术。除了大家提到的coolstreaming外, 国内还有几个类似的产品--据我所知这方面这几个国人的产品是走在了前列。

另外许多人正在研究增强bittorrent本身,例如搜索功能,与RSS结合等。现在已经有几个这方面的东东。

还有一个突破性的产品是swarmstream–号称具有接近BT的throughput但又能保证数据包的接收顺序–这是streaming技术梦寐以求的功能。虽然$5000一套SDK, 还是物有所值。

VPS stands for virtual private Server, a techology to divide a server into multiple “virtual machines” and each of the “virtual server” can run its own operating system as if it’s a standalone server. VPS is mainly used for Web hosting. It can also be used toestablished “sandbox” or for demo/testing purposes etc.

The technology is based on virtual machine technology that exists for a while.

Virtual server products that I know of:

– IBM had the technology (named zen?) to divide a mainframe into bunches of vritual servers running linux several years ago(they call it “partition”);
– The latest Sun solaris 10 also had this feature (they call it “zone),…
– virtuozzo
– open source Linux projects like Linux VServer , Xen ,freeVPS and UML (UML is the slowest in terms of performance) for linux,
– Jail for FreeBSD
– freeVPS
– openVPS (based on linux-VServer )
–VMWare server
–Even Microsoft has the Microsoft Virtual server 2005 (http://www.microsoft.com/windowsserversystem/virtualserver/default.mspx) running on top of Windows server 2003.

谢老蔡:)

关于大文件共享,我刚想起一个更好的办法: 用 gmail + roamdrive. roamdrive是一个可以把一个hotmail或gmail账户当成你的网上硬盘的软件–原理是把大的文件切割成小块,每块变成一个email,这样就能突破gmail每个邮件10MB的限制。

我建立了一个新的gmail账号,pku8808@gmail.com ;需要上载或下载文件的同学去http://www.roamdrive.com 当漏一个最新的roamdrive软件,然后就可以直接从windows 把文件拖动到gmail里去,或者从gmail拖动到本地硬盘。