Afghan President Hamid Karzai says he has fired two " high-ranking " Afghan officials who were spying for other countries , and warns he would not spare anyone who engages in such activity .