How to jailbreak my iphone when it's not activated?

My parents bought me a second hand jail-broken iphone 3gs.
it got wet so i took it to repair and they reset it and changed the battery.
when i got it back it was in the configuration screen which required me to connect it to itunes.
on itunes, i received a message saying there is no sim card in the iphone i'm trying to activate.
since it's second hand and i don't know which sim card fits it, i need to unlock it.
i tried using blackra1n, and after it entered recovery mode it just got back to the configuration screen and still won't read my sim card.
is there some software i can use to jailbreak it atm?
thanks (:

You don't unlock a phone by jailbreaking it you do it by getting a sim card and using the unlock code for it

Jailbreak it with redsnow and unlock with ultrasnow.