def __init__(self, idVendor, idProduct): Publisher.__init__(self) self.idVendor = int(idVendor, 16) self.idProduct = int(idProduct, 16) self.dev = None
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.")
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
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)'}
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.")
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
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
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
def __init__(self, url, authurl, username, password, headers=None, timeout=0.1): Publisher.__init__(self) self._url = url self._authurl = authurl self._username = username self._password = password self._headers = eval(headers) self._timeout = float(timeout) self._fd = None
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)
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 = stopped; 1 = started self.setFilename(filename)
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)
def __init__(self, server, fileName, msgTo, msgFrom="*****@*****.**", 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
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 self.withNode = True
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)' }
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
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)
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
def __init__(self, server, fileName, msgTo, msgFrom = "*****@*****.**", 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
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)
def __init__(self, interface, 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._interface = interface self._timeout = float(timeout)
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)
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 reponse ''' Publisher.__init__(self) self._host = None self._socket = None self._dest_addr = dest_addr self._timeout = float(timeout)
def __init__(self, command, args="", waitTime=3): """ @type command: string @param command: Command to run @type args: string @type args: Comma separated list of arguments @type waitTime: integer @param waitTime: Time in seconds to wait before killing process """ Publisher.__init__(self) self.command = command self.args = args.split(",") self.waitTime = float(waitTime)
def __init__(self, command, args="", waitTime=3): ''' @type command: string @param command: Command to run @type args: string @type args: Comma separated list of arguments @type waitTime: integer @param waitTime: Time in seconds to wait before killing process ''' Publisher.__init__(self) self.command = command self.args = args.split(",") self.waitTime = float(waitTime)
def __init__(self, commandLine, windowname, waitTime=3): """ @type filename: string @param filename: Filename to write to @type windowname: string @param windowname: Partial window name to locate and kill """ Publisher.__init__(self) self.commandLine = commandLine self._windowName = windowname self.waitTime = float(waitTime) if sys.platform != 'win32': raise PeachException("Error, publisher LauncherGui not supported on non-Windows platforms.")
def __init__(self, filename, debugger="False", waitTime=3): """ @type filename: string @param filename: Filename to write to @type waitTime: integer @param waitTime: Time in seconds to wait before killing process """ Publisher.__init__(self) self._filename = None self._fd = None self._state = 0 # 0 -stoped; 1 -started self.setFilename(filename) self.waitTime = float(waitTime) self.debugger = False if debugger.lower() == "true": self.debugger = True
def __init__(self, filename, debugger = "False", waitTime = 3): ''' @type filename: string @param filename: Filename to write to @type waitTime: integer @param waitTime: Time in seconds to wait before killing process ''' Publisher.__init__(self) self._filename = None self._fd = None self._state = 0 # 0 -stoped; 1 -started self.setFilename(filename) self.waitTime = float(waitTime) self.debugger = False if debugger.lower() == "true": self.debugger = True
def __init__(self, url, realm, username, password, headers=None, timeout=0.1): """ @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 """ Publisher.__init__(self) self._url = url self._realm = realm self._username = username self._password = password self._headers = headers self._timeout = float(timeout) self._fd = None
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)
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)
def __init__(self, host="localhost", port=smtplib.SMTP_PORT, debugLevel=0, mailFrom="localhost@localhost", mailTo="localhost@localhost", username="", password=""): Publisher.__init__(self) self.host = host try: self.port = int(port) except: raise PeachException("The SMTP publisher parameter for port is not a valid number.") self.debugLevel = int(debugLevel) self.mailFrom = mailFrom self.mailTo = mailTo self.username = username self.password = password self.loadBalance = 0 self._connected = None
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
def __init__(self, filename, windowname, debugger = "false", waitTime = 3): ''' @type filename: string @param filename: Filename to write to @type windowname: string @param windowname: Partial window name to locate and kill ''' Publisher.__init__(self) self._filename = None self._fd = None self._state = 0 # 0 -stoped; 1 -started self.setFilename(filename) self._windowName = windowname self.waitTime = float(waitTime) self.debugger = False self.count = 0 self._fd_sequencial = None if debugger.lower() == "true": self.debugger = True if sys.platform != 'win32': raise PeachException("Error, publisher FileWriterLauncherGui not supported on non-Windows platforms.")
def __init__(self, filename, windowname, debugger="false", waitTime=3): """ @type filename: string @param filename: Filename to write to @type windowname: string @param windowname: Partial window name to locate and kill """ Publisher.__init__(self) self._filename = None self._fd = None self._state = 0 # 0 -stoped; 1 -started self.setFilename(filename) self._windowName = windowname self.waitTime = float(waitTime) self.debugger = False self.count = 0 self._fd_sequencial = None if debugger.lower() == "true": self.debugger = True if sys.platform != "win32": raise PeachException("Error, publisher FileWriterLauncherGui not supported on non-Windows platforms.")
def __init__(self, host="localhost", port=smtplib.SMTP_PORT, debugLevel=0, mailFrom="localhost@localhost", mailTo="localhost@localhost", username="", password=""): Publisher.__init__(self) self.host = host try: self.port = int(port) except: raise PeachException( "The SMTP publisher parameter for port is not a valid number.") self.debugLevel = int(debugLevel) self.mailFrom = mailFrom self.mailTo = mailTo self.username = username self.password = password self.loadBalance = 0 self._connected = None
def __init__(self, url, realm, username, password, headers=None, timeout=0.1): ''' @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 ''' Publisher.__init__(self) self._url = url self._realm = realm self._username = username self._password = password self._headers = headers self._timeout = float(timeout) self._fd = None
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
def __init__(self): ''' ''' Publisher.__init__(self)
def __init__(self, waitTime=3): Publisher.__init__(self) self.waitTime = float(waitTime)
def __init__(self): """ """ Publisher.__init__(self)
def __init__(self, devicename): Publisher.__init__(self) self._devicename = devicename print "[DEBUG]Passed devicename: [%s]" % self._devicename
def __init__(self, library): Publisher.__init__(self) self.library = library self.dll = None self.withNode = True