Gravitationally Driven Electromagnetic Perturbations of Neutron Stars and Black Holes Stars