The crab will repeatedly rub the area of its body where it received the shock