python 判断网站端口,CDN

#coding:utf-8
import socket,time,thread
import urlparse
import datetime

from libs.Conn_scan import Mongo
from multiprocessing import Process, Queue, Lock, Pool

import sys
import socket
import logging
import requests
import dns.resolver
from time import time
from bs4 import BeautifulSoup
from fake_useragent import UserAgent
from requests.packages.urllib3.exceptions import InsecureRequestWarning
#线程池
from multiprocessing.dummy import Pool as ThreadPool
from multiprocessing.dummy import Lock

reload(sys)
sys.setdefaultencoding('utf-8')
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)

logger = logging.getLogger(__name__)

class Scanner(object):
    def __init__(self, target, start, end):
        self.target = target
        self.start  = start
        self.end    = end
        self.time   = time()
        self.ports  = []
        self.result = []
        self.mutex  = Lock()
        self.get_ports()

留一半

你可能感兴趣的:(python 判断网站端口,CDN)