First things first, asses the level of the threat. Is it a Krabby or a Kingler? Try to maneuver yourself over to the door, then flee and try to lose it. If that is not possible try to recall how they see the world around them. Do they primarily use their sight, smell, hearing, or something else? Then you could try going for the eyes if it seems possible to do without getting hurt.