Resetting an iPhone's password when it's in set up mode?

My iPhone 4S was freaking out all night and I decided to restore it as an attempt to fix it. The next day, the phone was finished restoring. My friend and his little brother came over. His little brother thought it would be funny to put in a random code, so you can imagine how annoyed I was when my phone asked for the password and the fact that he forgot what the code was. Also, I won't be able to restore the phone again because it won't connect to my laptop and I wouldn't be able to restore it while it's still in set up mode.

Go to the Apple store and customer service will be able to reset the phone.

You could do it by iTunes and do install Leo Privacy Guard so as to make your device absolutely secure.