When I forgot my iPhone pass code I thought that I would lose all of my photos and music. After some research I discovered that I could unlock my iPhone password even though I could not remember what it was. Since you can't really bypass the iPhone password and have full access to all of the phones files, and there is no such thing as an iPhone default password, you will need to recover the correct iPhone password lock combination.
This video shows how you can get back into your iPhone without a restore if you can't remember your password. It works with the 3GS, 4 and the first iPad. This method does not require an iPhone password reset.
Please watch the entire video and make sure that you have downloaded all of the required files from the website at the end of the description.
No matter which version your device has installed on it you must download the 5.0.1 IPSW.