Nifty ends at near one-month high as pharma, financial stocks lift markets