Example #1
0
	def __init__(self, target, partial_header, session_numbers, send_function, delay = 0.05, output_iface = "eth0", dport = 80, connection_number = 100, debuging = 0):
		"""Constructor"""
		super(ToperaLoris, self).__init__()

		self.__TARGET               = target
		self.__DPORT                = dport
		self.__DEBUG                = debuging
		self.__CONNECTIONS          = connection_number
		self.__OUTIFACE             = output_iface
		self.__DELAY                = delay
		self.__partial_header       = partial_header
		self.__SEND_FUNC            = send_function

		#
		# For controling the correspondence of SEQ <-> ACK
		#
		# {'sport': { 'ack': int, 'dport': int, 'seq': int}
		self.__SESSION_NUMBERS      = session_numbers

		# {'sport': seq_num }
		self.__SESSION_NUMBERS_3WAY = multiprocessing.Manager().dict()

		# Used ports
		self.__USED_PORTS           = multiprocessing.Manager().list()

		# Active connections
		self.__ACTIVE_CONNECTIONS   = 0

		#
		# Config firewall
		#
		setup_firewall(self.__TARGET, self.__DEBUG)
Example #2
0
    def __init__(self,
                 target,
                 partial_header,
                 send_function,
                 sleep_time=0,
                 dest_ports=["80"],
                 output_iface="eth0",
                 debuging=0):
        """Constructor"""
        super(ToperaPortScanner, self).__init__()

        self.__TARGET = target
        self.__DEBUG = debuging
        self.__OUTIFACE = output_iface
        self.__PORTS = dest_ports
        self.__TOTAL_PORTS = len(dest_ports)
        self.__PARTIAL_HEADER = partial_header
        self.__USED_PORTS = multiprocessing.Manager().list()
        self.__PORTS_COUNT = 0
        self.__SEND_FUNC = send_function
        self.__SLEEP_TIME = sleep_time
        self.__DONE = False

        # Configure the firewall
        setup_firewall(self.__TARGET)
Example #3
0
	def __init__(self, target, partial_header, send_function, sleep_time = 0, dest_ports = ["80"], output_iface = "eth0", debuging = 0):
		"""Constructor"""
		super(ToperaPortScanner, self).__init__()

		self.__TARGET               = target
		self.__DEBUG                = debuging
		self.__OUTIFACE             = output_iface
		self.__PORTS                = dest_ports
		self.__TOTAL_PORTS          = len(dest_ports)
		self.__PARTIAL_HEADER       = partial_header
		self.__USED_PORTS           = multiprocessing.Manager().list()
		self.__PORTS_COUNT          = 0
		self.__SEND_FUNC            = send_function
		self.__SLEEP_TIME           = sleep_time
		self.__DONE                 = False

		# Configure the firewall
		setup_firewall(self.__TARGET)