if data.find('!scan') != -1:
nick = data.split('!')[ 0 ].replace(':','')
targetip = socket.gethostbyname(str(arg))
sck.send('PRIVMSG ' + chan + " :" ' scanning host' + targetip + '\r\n')
for i in range(20, 1025):
s = socket(AF_INET, SOCK_STREAM)
result = s.connect_ex((targetip, i))
if (result == 0) :
s.send('PRIVMSG ' + chan + " :" 'port %d: OPEN' % (i,) + '\r\n')
s.close()
Я получаю эту ошибку:
targetip = socket.gethostbyname(str(arg))
socket.gaierror: [Errno 11003] getaddrinfo failed