According to section 509 of the IPC, whoever intends to insult the modesty of any woman, utters any word, makes any sound or gesture, or exhibits any object, intending that such word or sound shall be heard, or that such gesture or object shall be seen by such woman, or intrudes upon the privacy of such woman, shall be punished with simple imprisonment for a term which may extend to three years, or with fine, or with both.
This section is intended to protect the dignity and honor of women and to prevent any kind of harassment or insult to their modesty. Any person who violates this section can be punished with imprisonment or a fine or both.

