Iran vows 'painful response' if Israel attacks