saber de qué pie cojea

Etymology
lit. 'know which foot someone limps'.

Verb

 * 1)  to know one's ideology; to know one's weaknesses