also there will be great a risk to get a offer if I discloses it.
Yes, you are right. The enlightened ones / larger corps may give you an offer, but otherwise be prepared to be skipped from offers on disclosing the details.
I have a guilty feeling that, actually I am cheating them, as I will be going for a 6 month maternity leave
Think: How would it have been any better if you went for pregnancy immediately after joining the job? 1 year after joining? 1 review cycle after joining?
The long leave is law mandated, not something of your own making. As such, don't feel guilty about it. What in the case you have a change of plans about the pregnancy? Any untoward incidents?
about 7 or 8 months after joining
In which case, you can expect to work for 6-7 months for the company before you go on leave, which can be sufficient time duration for many IT projects to be complete.
I am 6 year experienced software engineer. How can I handle this situation professionally?
Since you are feeling really guilty, avoid joining the companies/teams for whom you would be a critical resource. (Example, 3 developer membered startup with you as a lead engineer, critical timed project looking for senior engineer etc). As long as you join a place where you are one of many foot soldiers, a good manager should be able to manage things around.
Many companies today have programs for mothers who left their career midway for family commitment and are rejoining the industry after an extended break. So that is another route you can explore if your conditions permit - take a break at pregnancy for 1-2 years for child care and then join some place.