Improved portscan script