Find Systems Free port

Hi All, Is there a way to find the systems free port using lotus script.

Based on the value returned by the Lotus script i may assign it to my field.

Please help in this regard???

Thanks in Advance!!!