Hey guys,
well here's the thing, a couple days ago I tried to install some apps on my iphone 3g on OS 3.1.2 Jailbroken with Redsn0w 0.9.2 via iTunes and after syncing my iphone was finished, it suddenly restarted and after that it was continuously rebooting when Apple logo is displayed.

So I tried to restore the firmware in both Recovery and dfu Modes but the phone crashes when the "waiting for iPhone" dialog appers on iTunes (When the progress bar is displayed on iPhone), and the iTunes shows an Error 9.

Any IDEA for how to fix this problem would be helpful.
I mean it, ANY IDEA!!!!!!!