The stock market ended positively on Thursday with BSE Sensex gaining 172.75 points to 77,478.93 and NSE Nifty rising by 62.85 points to 23,578.85. The Indian equity benchmark indices, traded flat in the opening session, after hitting record highs in the previous session, the 30-share BSE Sensex climbed at 77,554.83, while NSE Nifty was trading at 23575.