Why won't any computer detect my iphone 5?

Hi! I have an iphone 5 and i've always had my phone unlocked until now. My brother put a pin on the phone as a prank and now we don't remember what it is. I can unlock it if i connect it to itunes but no computer detects the phone. I tried different cables and multiple computers. What's weird is that if the iphone is off and i connect it to a pc it turns on. What can i do?