If the domain name (e.g. abc) can be resolved to IP
The result come out as expected
If the domain name (eg. abc) cannot be resolved to IP
Traceback (most recent call last):
File "./nshreport.py", line 159, in <module>
main()
File "./nshreport.py", line 64, in main
status = portstatus(ip,port)
File "./nshreport.py", line 11, in portstatus
result = s.connect_ex((ip,port))
socket.gaierror: [Errno -2] Name or service not know
Symptom
If the domain name (e.g. abc) can be resolved to IP
The result come out as expected
If the domain name (eg. abc) cannot be resolved to IP