Made the changes in my code.Now it is taking the input but second time when you select 1.It simply exits.Same problem in your code karthigayan.

output

Please look at the menu and enter the corresponding choice

1.Simple Port Scan :
2.Check you device name,net address and subnet mask
3.Let's Sniff

1
Enter the ip : 127.0.0.1
22 is open
25 is open
111 is open
631 is open
now exit scanner
Do you wish to continue : y

Please look at the menu and enter the corresponding choice

1.Simple Port Scan :
2.Check you device name,net address and subnet mask
3.Let's Sniff

1
Enter the ip : 209.85.231.104
now exit scanner
Do you wish to continue : n
----------------------------------------------------------------------------------------------------------------
Second time it doesn't do anything .Something wrong in the scanner function ?