Recently in Hacking Category

FFmpeg for RTSP to RTMP conversion

ffmpeg -rtsp_transport tcp -i rtsp://user:password@localhost:554/rtsp -vcodec copy -f flv -r 25 -s 1920x1080 -an "rtmp://localhost/rtmp"

-an: Disable audio

-f: Force format

-r: Frame rate

-s: Video resolution

-vcodec: Set the video codec. "copy" means no decoding/encoding.

FFmpeg is so awesome.

Ubuntu and Realtek 8192cu Driver


Today I wasted several hours configuring a Ubuntu machine for development. The major problem I had involves getting a wifi USB adapter to work properly. It uses Realtek 8192cu chipset, and apparently the driver that comes with the kernel is really outdated. If you don't upgrade the driver, it'll appear to work (you get connected but you'd get disconnected later) and then stops and no matter how you configure the routes it just won't work. You must blacklist the old drivers and install this one.

First, check if you are using the old drivers with lsmod | grep ^rt. If you are, use modprobe -r xxx to unload them. Unplug the wifi adapter now.

Then add these 3 lines to /etc/modprobe.d/blacklist.conf:

blacklist rtl8192cu
blacklist rtl8192c_common
blacklist rtlwifi

Now unfortunately you still need internet connection to proceed, just use cable.

Install rtl8192cu-tjp-dkms_1.6_all.deb. Note that may take a few minutes.

Finally, add 8192cu on a new line to /etc/modules. Reboot (reboot -h now) and your wifi should be working.

2G iPhone updating to iPhone OS 3.0


It's confirmed that if you have a 2G iPhone that is unlocked with BootNeuter (running firmware 2.2.1), you can safely update to OS 3.0 using iTunes (yes just press that Update button).

For detailed and step-by-step instructions see here

This method requires: jailbreaked iPhone 2.x, Cydia, Term-vt100, OpenSSH

Install MobileInstallation Patch from Cydia via “”, the patch is under section “Tweaks”. If you currently have the MobileInstallation, you ALSO need to install the patch. Don’t worry, you can install appulous apps with this patch.

  • In XCode, go to Project > Edit Project Settings.
  • Set Base SDK to "Device - iPhone OS 2.0"
  • Under Code Signing Identity, set Any iPhone OS Device to "Don't Code Sign"
  • Delete the value of Code Signing Resource Rules Path
  • Delete all previous build files.
  • Go to Project > Set Active SDK > Device - iPhone OS 2.0
  • Go to Project > Set Active Build Configuration > Release
  • Build. NOT Build and Go.
  • Copy to iPhone under /Applications using ssh or whatever method you prefer.

Now open Terminal on iPhone and execute the following code

su -
chmod +x
ldid -S
killall SpringBoard //restart the SpringBoard

Run MyApp by touching the icon on SpringBoard.

Update: With the MobileInstallation Patch mentioned above, iPhone 2.2 seems unable to install/upgrade app by itself, you have to use iTunes (8.x) to uninstall an app first, then install/upgrade it.