Arthashastra
प्रत्युत्पन्ने वा कारणे यद् यद् उपपद्येत तत् तद् अमित्रे अन्तः पुर गते गूढ संचारः प्रयुञ्जीत ॥
or spies, having access to the enemy's harem, may, when opportunities occur, do to the enemy whatever is found possible on the occasion, and then get out unknown.
english translation
pratyutpanne vA kAraNe yad yad upapadyeta tat tad amitre antaH pura gate gUDha saMcAraH prayuJjIta ॥
hk transliteration by Sanscript