BMTD 's Yard of Fun

Technology, Sports, Music, Chinese Essays

Browsing Posts in Software

I tried to import my firefox bookmarks into blogrolling and found that it only accepts OPML but not html. So i wrote a small utility that converts html to opml.

html2opml is a php script that simply converts html to a opml file, and every URL in the HTML input will become an entry in the generated OPML. Since most entries in my bookmarks does not have RSS feeds only “link” type opml outlines with “Url” attribute are created.

The html2opml online utlility is at

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 ( : 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:

function getXmlHttp() {
    var xmlHttpObject;

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

    return xmlHttpObject;

var httpRequest = getXmlHttp();'UniversalBrowserRead');'GET', 'http://localhost/test1.php', true);

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


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.

--偶认为对国内来说RFID在物流行业有很大前景。中国是零售业主要的供货地;虽然沃尔马,target等现在只要求最大的一些米国supplier使用RFID,但迟早会推行到国内的supplier. 正如物流业在国内的蓬勃发展,RFID也会相应跟上。

--RFID现在推广的主要障碍是tag的成本。现在reflective tag成本大约要20美分左右,因此只能应用在批量商品的包装箱级别,而无法做到每件商品上都放一个。但长远来说这不是问题。



I had been using vmware workstation for a long while. It’s pretty good in terms of performance and ease of use– I ran vmware on WinNT and Win2K with several VMs concurrently, each of them with a different OS: redhat, freeBSD, Gentoo and Debian. The network config is easy and straight forward– there are virtual NICs installed on your host, the guess can talk to the host via diffrent methods such as bridge, NAT … the downside is that it’s not free– several hundred bucks is not cheap.

Before I used VMWare several years ago , I looked to the open source community– at that monent there were the Bochs ( project and the Plex86 project. Bochs was not built for performance but aimed at providing IA-32 emulation across different hardware platforms. it’s very slow. Plex86 was aimed at being a vmware-like virtual machine but at that moment the project seemed to be dead.

Recently I checked plex86 project page again and found that the project seemed to have been reactivated– but overall it is still in its early stage.

I found two other open source projects that look very promising : one is qemu ( ), another is colinux ( ).

qemu seems very good except for network configurations– I installed Suse linux as the guest OS successfully. I tried to setup the network connection with host with no luck and the documentation does not provide helpful info… but overall it’s much faster than bochs and perhaps can compete with VMWare someday.

COLinux, unlike others, is dedicated to running linux as the guest OS on windows PCs. For me it’s enough since linux is the major guest OS i need. CoLinux does its job very well–I installed debian very quickly, no problem with network at all and i can always use the apt-get command. Although it can not run the GUI from inside the VM, it does not bother me at all– I can either run VNCServer and use UltraVNC to control the desktop, or use a PC X server such as Cygwin-X. And the speed is awesome, it feels like I am running linux natively– at the end of the day, finally I can use an open source software to run linux on my Windows PC!

I may take a look at the PearPC ( as well– If only i have a copy of Max OSX :(, to try out things from Mac world.