do exactly this
1. downlaod and restore iphone 3G S 3.1.2 Original from here
http://www.felixbruns.de/iPod/firmware/
2.
this is torrent download and restore custom 3G S 3.1.2 from
http://thepiratebay.org/torrent/5123...RE_-_IPHONETEA
3. run blackrain
4. unlock it
you're done