It is embarrassing but it happens. A little preparation goes a long way towards fixing this.
If you are flying in a wormhole, you have a probe launcher and 16 core scanner probes with you. 16 because sometimes the first 8 get lost.
Before you enter a wormhole, do a 'show info', and compare the text with this page.
Having access to probes and a launcher is even more important if you see any of :
- This wormhole is reaching the end of its natural lifetime
- This wormhole is on the verge of dissipating into the ether (I have never seen this message)
- This wormhole has had its stability critically disrupted by the mass of numerous ships passing through and is on the verge of collapse
- (or if you are in a capital, an orca, or a higgs rigged battleship: This wormhole has had its stability reduced by ships passing through it, but not to a critical degree yet
How to have probes regardless of what ship you fly
On a combat ship, a mobile depot and probes + launcher in the hold works well.
On my Epithals, my probe launchers are offline as I don't have the fitting for shields, stabs and launcher. If I ever get stuck I can offline a shield, online a launcher and get back to empire space. Some ships have so called 'utility slots' that are unused for weapons
There is also the alt account. Every Eve account has 3 pilots. Send in an alt with a T1 scanning frigate, prototype cloak, scanning mids, nanofibre lows and gravimetric rigs before you send in you pricey combat ship.
I have some 'recruit a friend' trial accounts for scanning alts. 21 days of training gives plenty of time for training astrometrics 4, astrometrics rangefinding/pinpointing/acquisition at 3 on 3 pilots. Grab the same scanning frigate as above, but put the cloaking skillbook into the cargo hold. Log off two of these pilots in any wormhole you may need (either defensive for getting home - or offensive for invading someone later). When it comes time to activate your emergency pilot, you will get either a month of gametime or a plex on your main, essentially making your emergency alt very close to free. You still need to pay approximately 10M ISK for skillbooks and a basic scanning frigate.
Note: you can not be logged into a trial account and a real account on the same computer at the same time, but you can create your alt, swap accounts and send ISK then log back in again.
If you are stuck in wormhole space
So, for better or worse the above advice is not followed. Maybe your scanner had an encounter with slightly used ammunition. Maybe the wormhole was collapsed by your scanning pilot returning home.
Are you truly stuck? Did a corp member already scan down other exits? Check your corporation and personal bookmarks.
If you get really stuck in a wormhole without a scanner, your options become limited. If you are in a cheap ship with a cheap set of implants (or even no implants), self destruct your ship for the insurance, then self destruct your pod. This will be painful but may save you a lot of time.
If you are in a ship or pod too expensive to do this with, you are permitted to break the golden wormhole rule, and ask for help in local. You are already in trouble, and maybe someone will help, or maybe they will help for a price.
http://www.torpedodelivery.com/wormhole-location/ may be worth a look. I have never used their service, but would not rule it out either.
Look at the owners of any Customs Offices or POS (or even citadels?) in system and contact their CEO's or diplomats (from corp or alliance descriptions).
Watch the system in Zkillboard (eg https://zkillboard.com/system/31000477/ - just a random wormhole) looking for kills. If someone is in there, you might be able to get bookmarks from them.
If you end up in a bad place in known space
If you get back to known space and are in an expensive ship, but are in a horrible place, pirates all around or hostiles between you and highsec, then note what system you are in and logout.
Grab another pilot, corp member, alt, or even a activate an emergency 'recruit a friend' alt. There are some options for ships : A Yacht (Stats , Pricing ) - ideal for a brand new alt, an interceptor with scanner and cloak, ideally a T3 cruiser interdiction nullified and covert with plenty of stabs; and escort your main home. This escort may be flying +1 system checking for camps or bubbles, or it might be scanning down wormholes or both. It might even be with an extra mobile depot in the hold and a set of warp core stabs (See also http://foo-eve.blogspot.com.au/2013/12/how-to-transfer-mobile-depot-in-deep.html )
Getting stuck without a scanner in a wormhole is something I try to avoid, but these are some tips to recover from disaster.