当前位置: 首页>>代码示例>>Python>>正文


Python publisher.Publisher类代码示例

本文整理汇总了Python中Peach.publisher.Publisher的典型用法代码示例。如果您正苦于以下问题:Python Publisher类的具体用法?Python Publisher怎么用?Python Publisher使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Publisher类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

    def __init__(self, idVendor, idProduct):
        Publisher.__init__(self)

        self.idVendor = int(idVendor, 16)
        self.idProduct = int(idProduct, 16)

        self.dev = None
开发者ID:KurSh,项目名称:peach,代码行数:7,代码来源:usb.py

示例2: __init__

 def __init__(self, url):
     Publisher.__init__(self)
     #: Indicates which method should be called.
     self.withNode = False
     self.url = url
     (self.scheme, self.netloc, self.path, self.query, self.frag) = httplib.urlsplit(url)
     self.headers = {'User-Agent': 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'}
开发者ID:KurSh,项目名称:peach,代码行数:7,代码来源:http.py

示例3: __init__

	def __init__(self,clientHost,clientPort,serverHost,serverPort,protocolFamily,protocolPort,communicationTimeout = 5):
		Publisher.__init__(self)
		## We store element type, so we can easily find out at any time what type of object it is.
		self.elementType = 'publisher'
		## Indication whether client application was already started.
		self._clientStarted = False
		## Interface on which proxy should accept connections from client. Variable had slightly different meaning in first version and changing its name will be probably part of future refactorization.
		self.CLIENT_HOST = clientHost
		## Port on which proxy should accept connections from client. Variable had slightly different meaning in first version and changing its name will be probably part of future refactorization.
		self.CLIENT_PORT = int(clientPort)
		## Server host to which should proxy connect.
		self.SERVER_HOST = serverHost
		## Server port to which should proxy connect.
		self.SERVER_PORT = int(serverPort)
		## How much data should be received at single moment.
		self.TRANSFER_BLOCK_SIZE = 1024
		## Protocol family of communication protocol (TCP/UDP). Important for data analysis.
		self.PROTOCOL_FAMILY = protocolFamily
		## Standard port of communication protocol. Important for data analysis.
		self.PROTOCOL_PORT = int(protocolPort)
		## Stores address, from which last client request came.
		self.CLIENT_SRC_HOST = None
		## Stores port, from which last client request came.
		self.CLIENT_SRC_PORT = None
		## How long should proxy wait for packets from client and server before it finishes the iteration.
		self.SELECT_TIMEOUT = int(communicationTimeout)
		## How long should proxy wait for incoming data before it tries to analyze them. First line of defence against segmentation.
		self.SELECT_READ_TIMEOUT = 0.01
		## How long should proxy wait for the first message of communication. It needs to be big enough, so it gives enough time to client application to start.
		self.INITIAL_SELECT_TIMEOUT = 60
		## How many times should proxy try to connect to the server before giving up.
		self.CONNECTION_ATTEMPTS_LIMIT = 30
		## How long should proxy wait between connection attempts.
		self.CONNECTION_ATTEMPT_TIMEOUT = 1
开发者ID:flaub,项目名称:HotFuzz,代码行数:34,代码来源:pppublisher.py

示例4: __init__

    def __init__(self, host, port, template, publish, storage=None):
        Publisher.__init__(self)

        self._host = host
        self._template = template
        self._publish = publish
        self._storagePath = storage
        self._server = None
        self._initialStart = True
        self._possiblePeerCrash = False
        self._client = None
        self._clientAddr = None
        self._contentTemplate = None

        try:
            socket.gethostbyaddr(self._host)
        except socket.error as msg:
            raise PeachException("Websocket publisher host not reachable: %s" % msg)

        try:
            self._port = int(port)
        except ValueError:
            raise PeachException("WebSocket publisher port is not a valid number: %s" % port)

        if self._publish != "base64" and not self._storagePath:
            raise PeachException(
                "Publisher's storage parameter needs to be set if not using Base64.")
开发者ID:KurSh,项目名称:peach,代码行数:27,代码来源:websocket.py

示例5: __init__

        def __init__(self, windowname, waitTime=3):
            Publisher.__init__(self)
            self.waitTime = float(waitTime)
            self._windowName = windowname

            if sys.platform != 'win32':
                raise PeachException("Error, publisher DebuggerLauncherGui not supported on non-Windows platforms.")
开发者ID:KurSh,项目名称:peach,代码行数:7,代码来源:process.py

示例6: __init__

    def __init__(self, host, port, timeout=0.25, throttle=0):
        """
		@type	host: string
		@param	host: Remote host
		@type	port: number
		@param	port: Remote port
		@type	timeout: number
		@param	timeout: How long to wait for reponse
		@type	throttle: number
		@param	throttle: How long to wait between connections
		"""
        Publisher.__init__(self)
        self._host = host

        try:
            self._port = int(port)
        except:
            raise PeachException("The Tcp publisher parameter for port was not a valid number.")

        try:
            self._timeout = float(timeout)
        except:
            raise PeachException("The Tcp publisher parameter for timeout was not a valid number.")

        try:
            self._throttle = float(throttle)
        except:
            raise PeachException("The Tcp publisher parameter for throttle was not a valid number.")

        self._socket = None
开发者ID:flaub,项目名称:HotFuzz,代码行数:30,代码来源:tcp.py

示例7: __init__

	def __init__(self, clsid):
		"""
		Create Com Object. clsid = '{...}'
		
		@type	clsid: string
		@param	clsid: CLSID of COM object in {...} format
		"""
		Publisher.__init__(self)
		self._clsid = clsid
开发者ID:flaub,项目名称:HotFuzz,代码行数:9,代码来源:com.py

示例8: __init__

 def __init__(self, server, fileName, msgTo, msgFrom="[email protected]",
              msgSubject="Fuzzing Test",
              msgText="Message generated by Peach Fuzzing Platform.\n\nhttp://peachfuzzer.com\n\n - Peach\n"):
     Publisher.__init__(self)
     self.server = server
     self.fileName = fileName
     self.msgFrom = msgFrom
     self.msgTo = msgTo
     self.msgSubject = msgSubject
     self.msgText = msgText
开发者ID:KurSh,项目名称:peach,代码行数:10,代码来源:smtp.py

示例9: __init__

 def __init__(self, host, timeout=0.1):
     """
     @type	host: string
     @param	host: Remote host
     @type	timeout: number
     @param	timeout: How long to wait for response
     """
     Publisher.__init__(self)
     self._host = host
     self._timeout = float(timeout)
开发者ID:KurSh,项目名称:peach,代码行数:10,代码来源:icmp.py

示例10: __init__

    def __init__(self, filename):
        """
		@type	filename: string
		@param	filename: Filename to write to
		"""
        Publisher.__init__(self)
        self._filename = None
        self._fd = None
        self._state = 0  # 0 -stoped; 1 -started
        self.setFilename(filename)
开发者ID:flaub,项目名称:Peach,代码行数:10,代码来源:file.py

示例11: __init__

 def __init__(self, dsn):
     """
     @type	dsn: string
     @param	dsn: DSN must be in format of "dsn/user/password" where DSN is a DSN name.
     """
     Publisher.__init__(self)
     self._dsn = dsn
     self._sql = None
     self._cursor = None
     self._sql = None
开发者ID:dolfcao,项目名称:peach,代码行数:10,代码来源:sql.py

示例12: __init__

 def __init__(self, dest_addr, timeout=0.1):
     """
     @type	host: string
     @param	host: Remote host
     @type	timeout: number
     @param	timeout: How long to wait for response
     """
     Publisher.__init__(self)
     self._host = None
     self._socket = None
     self._dest_addr = dest_addr
     self._timeout = float(timeout)
开发者ID:KurSh,项目名称:peach,代码行数:12,代码来源:raw.py

示例13: __init__

	def __init__(self, interface, timeout = 0.1):
		'''
		@type	host: string
		@param	host: Remote host
		@type	timeout: number
		@param	timeout: How long to wait for reponse
		'''
		Publisher.__init__(self)
		self._host = None
		self._socket = None
		self._interface = interface
		self._timeout = float(timeout)
开发者ID:thecrackofdawn,项目名称:Peach2.3,代码行数:12,代码来源:raw.py

示例14: __init__

 def __init__(self, filename, package, activity, port, device):
     '''
     @type   filename: string
     @param  filename: Filename to write to
     '''
     Publisher.__init__(self)
     self._filename = None
     self._fd = None
     self._state = 0 # 0 -stoped; 1 -started
     self._package = package
     self._activity = activity
     self._port = int(port)
     self._device = device
     self.setFilename(filename)
     # initial fuzztableService
     os.system("adb -s "+device+" shell am startservice -a 'tw.dm4.CONTACTSFUZZ' --es 'port' '"+port+"'")
     os.system("adb -s "+device+" forward tcp:"+port+" tcp:"+port)
开发者ID:atdog,项目名称:AndroidFuzzer,代码行数:17,代码来源:fuzzIntentData.py

示例15: __init__

    def __init__(self, ba_addr, port, timeout=8.0, giveup=3.0):
        Publisher.__init__(self)

        self.ba_addr = ba_addr

        try:
            self.port = int(port)
        except:
            raise PeachException("Publisher parameter for port was not a valid number.")

        try:
            self.timeout = float(timeout)
        except:
            raise PeachException("Publisher parameter for timeout was not a valid number.")

        try:
            self.giveup = float(giveup)
        except:
            raise PeachException("Publisher parameter for giveup was not a valid number.")

        self._socket = None
开发者ID:KurSh,项目名称:peach,代码行数:21,代码来源:bluetooth.py


注:本文中的Peach.publisher.Publisher类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。