Ultrasn0w unlock works with firmware 3.1.2
MuscleNerd, the member of Dev-Team, created a nice post on twitter saying that ultrasn0w, the program that lets you unlock the iPhone 3G/3GS, functions just great with firmware 3.1.2. However you need to preserve baseband 04.26.08.
So the Dev-Team is working on new version of PwnageTool. Here is a screenshot that shows the new firmware and the old baseband: