Earlier I posted on how to jailbreak iPad 3.2 firmware with spirit. Now I am going to explain how to jailbreak the iPhone 3G/3GS 3.1.2/3.1.3 firmware os with Spirit. Compared other jailbreak tools, Spirit is much easier to use and it saves time.
Spirit is an untethered jailbreak tool, for iPhone 3G/3GS and iPod Touch 2G/3G with 3.1.2 or 3.1.3 firmware and also the iPad 3.2 firmware OS, which is available for both Windows and Mac OS X. Here are the steps to jailbreak iPhone 3G/3GS running 3.1.2/3.1.3 firmware OS.
NOTE: Before beginning, it is better to take a backup of your iPhone 3G/3GS so that if there is any problem caused due to the jailbreak, you could restore back the data and solve the problem.
1. Download the latest version of iTunes.
2. Now download the Spirit jailbreak tool for Windows or for Mac OS X.
3. Connect your iPhone 3G/3GS to the computer.
4. Launch Spirit.
5. When it shows that your iPhone is connected to the PC, click on the Jailbreak button.

6. Now wait till Spirit completes the jailbreak process.
7. When over, it shows that the jailbreak is complete and then click on Quit.
That’s all! Now you have a completely jailbroken iPhone 3G/3GS with 3.1.2/3.1.3 firmware OS.

on my iphone it didnt worked!!! i hove no network!!! what can i do?
Try restoring your iPhone.
i did!! now i have cabel & itunes icon on screen!! pleas help!!
That is strange. You restored your iPhone from an old backup and still problem? Check it once more.
this is the only jailbreak i could get to work for my iphone 3g running 3.1.3 and it was super easy i really recommend it