I found a 100% working way of starting the quest "A Cornered Rat" if it for some reason doesnt start. (I had a destroy thieves guild mod, so that messed up the whole main questline.)
Type in console:
prid 00019DF9 (This activates Vekel the Man in console so you can edit his actor values.)
addtofaction 0005a1a4 1 (Adds Vekel into player ally group, so he will talk to you without you joining the thieves guild.)
startquest MQ202 (Makes it possible to ask from Vekel about Esbern, and therefore start the quest.)
Then talk to Vekel the Man in Riften Ratway. You should now have the option to ask about esbern without playing the thieves guild quests if you have killed every member of it including Karliah, like i did. Or if the other Thieves guilders attack you, he wont.