How to unlock my passcode on my iphone 4?

I bought an iphone 4 on ebay used no returns and when I bought it there was a pass code I talked to the person who sold it to me and said he doesn't know I think it is stolen but I really need it because i'm going abroad so could someone tell me how to reset the pass code or how to hack or get into the iphone or something please.

Please write every scenario possible so i could try them out please thank you.

If it's blocked or stolen i don't think you'll be able to. As far as i know only the phone network can unblock it. To find out you can type in the imei on checkmend.com but i think it costs a fiver, or you could ring up the network the phone is on and they should also be able to tell you its status for free.