I recently bought an iphone? - 1

I recently bought an iphone and I only paid 10 bucks for it because the previous owner could not remember the passcode is there any way for me to unlock it without the passcode without plugging it into iTunes because I obv don't have it linked to my computer withuout it being unlocked. I'm not sure what iphone it is either.

Added (1). how do I sync it to iTunes without being able to get onto it

The only way to do this is to result in syncing it with itunes. Also since the code is unknown you will have to perform a reset on the device which will wipe everything back to factory default.including photos and music. I've been in a similar situation and with my bachelors degree in computer engineering I still never found a way around it.