728x90 반응형 개발/Python1 python 네트워크 프로그램 import optparseimport socketfrom socket import *def connScan(tgtHost, tgtPort):try:connSkt = socket(AF_INET, SOCK_STEAM)connSkt.connect((tgtHost, tgtPort))connSkt.send('ViolentPython\r\n')results = connSkt.recv(100)print '[+]%d/tcp open'% tgtPortprint '[+]' + str(results)connSkt.close()except:print '[-]%d/tcp closed'% tgtPortdef portScan(tgtHost,tgtPorts):try:tgtIP = gethostbyname(tgtHost)except.. 2016. 8. 13. 이전 1 다음 728x90 반응형