koteikin
4/9/2018 - 8:08 PM

VestaCP

VestaCP

#!/usr/bin/python3
import socket
import ipcalc


subnet = ipcalc.Network('0.0.0.0/22') # change subnet
for host in subnet:
	sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
	sock.settimeout(1)                                      #1 Second Timeout
	result = sock.connect_ex((str(host),8083))
	if result == 0:
	  print('VestaCP on ' + str(host))