巧用 Python 的 CGIHTTPServer 模块开发 CGI 应用程序

在开发 CGI 应用程序中,使用 Apache 运行调试不是很方便,这里推荐使用 Python 的 CGIHTTPServer 模块,不仅无需安装 Apache 同时有一定的调试功能。

使用方法
1. 创建一个工作目录 web
2. 在 web 目录中创建一个 cgi-bin 应用程序目录
3. 复制 test.cgi 应用程序到 cgi-bin 目录中
4. 打开终端并切换到 web 目录,执行下面命令

python -m CGIHTTPServer

5. 打开 http://localhost:8000/cgi-bin/test.cgi

Over!

升级 VPS 操作系统计划

BurstNET 的 Linux VPS 已经有 Ubuntu 10.04 系统可用了,我打算升级一下。如果在原有的 VPS 上重新安装操作系统的话,会影响到当前的服务,如果在升级过程中出现问题的话,影响会更严重,且数据的拷贝很不方便。

所以我的方案是重新购买一个 VPS 安装 Ubntu 10.04 系统,在两个VPS都能使用的期间将设置和数据拷贝过去。

Over!

另类安装 Apk 方法

由于不喜安装一些 ApkManager,又需要安装 /sdcard 里的 apk。我采用了下面的方法。

例如安装 /sdcard/mobileqq.apk,打开手机终端,执行如下命令

httpd -f -p 8000 -h /sdcard

在浏览器里下载 http://localhost:8000/mobileqq.apk,完成后点击安装即可。

Over!

Latest proxy scripts for Windows

Enable compression.

socksv5.bat

@echo off
rem proxy.bat
rem Heihaier < admin@heiher.info >
 
:relink
echo Connecting VPS...
plink -N -C -D 1080 fwd@heiher.info -i fwd_rsa.ppk
echo Connection closed!
goto relink

http.bat

@echo off
rem proxy.bat
rem Heihaier < admin@heiher.info >
 
:relink
echo Connecting VPS...
plink -N -C -L 8000:127.0.0.1:80 fwd@heiher.info -i fwd_rsa.ppk
echo Connection closed!
goto relink

Over!

Android ssh: Warning: Reading the random source seems to have blocked.

Error:

$ ssh user@someserver
ssh: Warning: Reading the random source seems to have blocked.
If you experience problems, you probably need to find a better entropy source.

1. Copy ssh to /sdcard/ from /system/bin/
2. Connect sd to computer (Linux).
3. hexeditor /mnt/sdcard/ssh
4. Find ASCII string “/dev/random”.
5. modify HEX “72 61 6E 64 6F 6D 00 63” to HEX “75 72 61 6E 64 6F 6D 00”
6. Save & Exit
7. Copy ssh to /system/bin from /sdcard/
8. Change owner & permission.

Over!

[ROM]TMO-US-DRC83 Rooted by Heiher

这是我的第二个ROM,基于官方OTA的DRC83制作的,集成了一些 Native 程序,如 busybox, ssh, scp, iptables, sqlite3 等等,删除了系统空间的一些不常用的应用程序。感谢支持!

Model number:T-Mobile G1
Firmware version: 1.6
Baseband version: 62.50SC.20.17H_2.22.23.02 (DMD64)
Kernel version: 2.6.29 harry@linux-rvzl #1 (ADP 1.6)
Build numver: DRC83
Support languages: English

下载地址:http://www.heiher.info/sftp/android/TMO-OTA-US-DRC83-Rooted_heiher_20100620.zip

Over!

[Recovery] [15-May-2010] RA-dream-v1.7.0

Features

Use the trackball (up+down) to navigate through the menu, press the trackball to select items.
You can also use the volume keys (vol-up + vol-down) to navigate, and the CALL-ANSWER key to select items (in case your trackball is broken).

  • full ADB access in recovery mode
  • Busybox v1.15.3
  • HW-Key navigation (volume keys + CALL-ANSWER) option
  • Extended menu (with keyboard-shortcuts):
    • [HOME+Back] Reboot system now :: reboot your phone
    • [Alt+X] Go to console :: bring up the console
    • [Alt+T] USB-MS Toggle :: enable/disable USB mass storage (use when the phone is connected to your PC)
    • [Alt+B] Backup/Restore (recovery partition not included!)
      • [Alt+0] Nand backup :: Make a Nand backup
      • [Alt+1] Nand + ext backup :: Make a Nand + ext backup
      • [Alt+2] Nand restore :: Restore a Nand backup
      • [Alt+3] BART backup :: Make a BART backup (Nand + ext)
      • [Alt+4] BART restore :: Restore latest BART backup
      • [Alt+5] Bck Google files :: Makes a backup of the Google proprietary system files in /cache/google
      • [Alt+6] Rst Google files :: Restores the Google proprietary system files from /cache/google
    • [Alt+F] Flash zip from sdcard :: Flash a zip update file from your sdcard
    • [Alt+W] Wipe
      • [Alt+0] Wipe data/factory reset :: Wipe /data and /cache
      • [Alt+1] Wipe cache :: Wipe /cache only
      • [Alt+2] Wipe Dalvik-cache :: Wipe /cache/dalvik-cache
      • [Alt+2] Wipe SD:ext partition : Wipe the ext partition on your sdcard
      • [Alt+4] Wipe battery stats : Wipe the battery stats in /data
      • [Alt+5] Wipe rotate settings : Wipe the sensor settings in /data
    • [Alt+P] Partition sdcard
      • [Alt+0] Partition SD :: Interactive SD partitioning
      • [Alt+1] Repair SD:ext :: Repair the ext partition
      • [Alt+2] SD:ext2 to ext3 :: Convert ext2 to ext3
      • [Alt+3] SD:ext3 to ext4 :: Convert ext3 to ext4
    • [Alt+O] Other
      • [Alt+0] Fix apk uid mismatches :: Does extacly that
      • [Alt+1] Move recovery.log to SD :: Moves the recovery log file to your sdcard. (Use when you want more detailed recovery log information)
    • [ALT+Q]Power off :: Powers off your phone
  • Scripts available from console :

Install

  • There are several ways to install a custom recovery, choose the one that suits you most (I probably forgot a few).
  • You don’t need to enter “mount -a” if your partitions are already mounted.

Via terminal

flash_image recovery /sdcard/recovery-RA-dream-v1.7.0.img

Download
recovery-RA-dream-v1.7.0.img

Over!