Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
If you use a mac look at the top bar, go to "GO" then go to "GO TO FOLDER" type in /etc/ it will open up a folder with a lot of files, look for "HOSTS" copy it onto your desktop. open it up then you will see for ex: 55.272.20.269 gs.apple.com. in front of the gs.apple.com put a "#" then save the file thats on your desktop and drag back into the folder that is open. after that you will be able to restote.

Haven't seen that post before. It changes the story quite drastically.
This isn't a problem with the HOSTS file. 1013 is one of the most common error codes (partially due to TinyUmbrella), and iTunes has a tendency to group unrelated errors into that code. This looks like such a case.

Go to http://www.ih8sn0w.com and download the latest release of iREB. Put your iPhone into DFU mode and connect it to the computer. Close iTunes and start iREB. Use it to put your iPhone into Pwned-DFU mode and try the restore. If this doesn't work, go to the Recovery Mode Loop Fixer tab and try that.
 
It works. I've done it at least a thousand times.
If this doesn't work against all odds. download iREB and follow the instructions it gives you.

I promise it didn't work. No luck with iReb either.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.