In my case There are port in between two ranges which start from 7001 to 7050. If somebody has taken 40 of the port numbers so how i can find out the available port number in between these ranges of number.

**For example** 
A person take 7003 and 7012 port number so how i can figure out that 7004 to 7011 are available for me 

help me out please