Most insects that I know of on eggplant/aubergine/brinja, attack the leaves. The only insects I've found that enter the fruit itself, are 'the eggfruit caterpillar', Sceliodes cordalis and 'the eggplant fruit and shoot borer' Leucinodes orbonalis. Caterpillars of these moths use their mandibles to chew their way into the fruit.
These moths are only listed as naturally occurring in the tropical and subtropical parts of Australia and Asia. So if you live somewhere else & one of these species are your pest, then please consider reporting it to your department of agriculture. Here's a link to a paper on how to control Leucinodes orbonalis, which could work for S.cordalis too: