iPhone 5 won't restore through iTunes. Error message after error message... :/

Well, I can't seem to restore my iPhone 5 through iTunes. I am jailbroken, and want to remove it (selling the phone). When I go to restore it to factory settings through iTunes, it'll start...but a few minutes into it I get either the error message 9006 or the error message 1480. I really don't know what else to do to remove a jailbreak. I've tried putting it into DFU mode & restoring that way but that didn't work either. I've also tried downloading the ipsw file and iTunes said it wasn't compatible (I tried the 7.0.4 one & the 7.1.1 one). I'm at a lost. :/ Any tips?
Have you tried doing a wipe ("erase all content and settings") first?


Double ROT13 encrypted for your protection
Have you tried doing a wipe ("erase all content and settings") first?


Double ROT13 encrypted for your protection

I'm jailbroken. That won't work. :/
Make sure you have the latest itunes, and check firewall settings. Reset computer (turn off and back on) You may need to put iPhone in DFU mode.

Original thread: https://forums.imore.com/threads/iphone-5-wont-restore-through-itunes-error-message-after-error-message.291112/