Exemplo n.º 1
0
    def __init__(self, tag, attributes, children=None, data=None):

        Debugger.attach(self)

        self.tag = tag
        self.attributes = attributes
        self.children = children
        self.data = data
Exemplo n.º 2
0
	def __init__(self,tag,attributes,children=None,data=None):

		Debugger.attach(self)
		
		self.tag = tag;
		self.attributes = attributes;
		self.children = children;
		self.data = data
Exemplo n.º 3
0
    def __init__(self, tag, attributes, children=None, data=None):

        Debugger.attach(self)
        self.__log = logging.getLogger(__name__)

        self.tag = tag
        self.attributes = attributes
        self.children = children
        self.data = data
Exemplo n.º 4
0
	def __init__(self,tag,attributes,children=None,data=None):

		Debugger.attach(self)
		self.__log = logging.getLogger(__name__)
		
		self.tag = tag;
		self.attributes = attributes;
		self.children = children;
		self.data = data
Exemplo n.º 5
0
	def __init__(self):
		WADebug.attach(self)
		
		self.uaIndex = 1;
		self.pvars = [];
		self.port = 443;
		self.type = "GET"
		self.parser = None
		self.params = []
Exemplo n.º 6
0
    def __init__(self):
        WADebug.attach(self)

        self.uaIndex = 1
        self.pvars = []
        self.port = 443
        self.type = "GET"
        self.parser = None
        self.params = []
Exemplo n.º 7
0
    def __init__(self, o):
        Debugger.attach(self)

        self.outputKey = None

        self.realOut = o
        #self.out = o;
        self.tokenMap = {}
        self.out = ByteArray()

        self.tokenDictionary = TokenDictionary()
Exemplo n.º 8
0
    def __init__(self):
        WADebug.attach(self)

        self.pvars = []
        self.port = 443
        self.type = "GET"
        self.parser = None
        self.params = []
        self.headers = {}

        self.sent = False
        self.response = None
Exemplo n.º 9
0
	def __init__(self):
		WADebug.attach(self)

		self.pvars = [];
		self.port = 443;
		self.type = "GET"
		self.parser = None
		self.params = []
		self.headers = {}

		self.sent = False
		self.response = None
Exemplo n.º 10
0
    def __init__(self,inputstream):
        
        Debugger.attach(self)

        self.inputKey = None
        
        self._d('Reader init');
        self.tokenMap = Constants.dictionary;
        self.rawIn = inputstream;
        self.inn = ByteArray();
        self.buf = []#bytearray(1024);
        self.bufSize = 0;
        self.readSize = 1;
Exemplo n.º 11
0
    def __init__(self, inputstream):

        Debugger.attach(self)

        self.inputKey = None

        self._d('Reader init')
        self.tokenMap = Constants.dictionary
        self.rawIn = inputstream
        self.inn = ByteArray()
        self.buf = []  #bytearray(1024);
        self.bufSize = 0
        self.readSize = 1
Exemplo n.º 12
0
	def __init__(self):
		Debugger.attach(self)

		self.reader = BinTreeNodeReader(self)
		self.writer = BinTreeNodeWriter(self)
		
		self.readSize = 1;
		self.buf = [];
		self.maxBufRead = 0;
		self.connected = 0
		
		self.jid = ""
		
		super(ConnectionEngine,self).__init__(socket.AF_INET, socket.SOCK_STREAM);
Exemplo n.º 13
0
    def __init__(self,o):
        Debugger.attach(self)

        self.outputKey = None

        dictionary = Constants.dictionary
        self.realOut = o;
        #self.out = o;
        self.tokenMap = {}
        self.out = ByteArray();
        #this.tokenMap = new Hashtable(dictionary.length);
        for i in range(0,len(dictionary)):
            if dictionary[i] is not None:
                self.tokenMap[dictionary[i]]=i
        
        #Utilities.debug(self.tokenMap);
        '''
Exemplo n.º 14
0
	def __init__(self, connection):
		Debugger.attach(self)

		self.connection = connection
		self.mechanism = AuthMechanism
		self.authenticated = False

		self.username = None
		self.password = None
		self.domain = None
		self.resource = None

		self.supportsReceiptAcks = True
		self.accountKind = None
		self.expireData = None

		self.authCallbacks = []
Exemplo n.º 15
0
    def __init__(self, o):
        Debugger.attach(self)

        self.outputKey = None

        dictionary = Constants.dictionary
        self.realOut = o
        #self.out = o;
        self.tokenMap = {}
        self.out = ByteArray()
        #this.tokenMap = new Hashtable(dictionary.length);
        for i in range(0, len(dictionary)):
            if dictionary[i] is not None:
                self.tokenMap[dictionary[i]] = i

        #Utilities.debug(self.tokenMap);
        '''
Exemplo n.º 16
0
    def __init__(self, connection):
        Debugger.attach(self)

        self.connection = connection
        self.mechanism = AuthMechanism
        self.authenticated = False

        self.username = None
        self.password = None
        self.domain = None
        self.resource = None

        self.supportsReceiptAcks = True
        self.accountKind = None
        self.expireData = None

        self.authCallbacks = []
Exemplo n.º 17
0
	def __init__(self):
		Debugger.attach(self);

		self.signalInterface = None
		#self.socket = connection
		self.terminateRequested = False
		self.disconnectedSent = False
		self.timeout = 180
		self.selectTimeout = 3
		self.requests = {};
		self.lock = threading.Lock()
		self.disconnectedCallback = None
		self.autoPong = True
		self.onPing = self.ping = None

		self.lastPongTime = int(time.time())
		super(ReaderThread,self).__init__();

		self.daemon = True
Exemplo n.º 18
0
	def __init__(self):
		Debugger.attach(self);

		self.signalInterface = None
		#self.socket = connection
		self.terminateRequested = False
		self.disconnectedSent = False
		self.timeout = 180
		self.selectTimeout = 3
		self.requests = {};
		self.lock = threading.Lock()
		self.disconnectedCallback = None
		self.autoPong = True
		self.onPing = self.ping = None

		self.lastPongTime = int(time.time())
		super(ReaderThread,self).__init__();

		self.daemon = True
Exemplo n.º 19
0
    def sendRequest(host, port, path, headers, params, reqType="GET"):

        params = urllib.urlencode(params)

        path = path + "?" + params if reqType == "GET" else path

        WADebug.stdDebug(reqType)
        WADebug.stdDebug(headers)
        WADebug.stdDebug(params)

        WADebug.stdDebug("Opening connection to %s" % host)

        conn = httplib.HTTPSConnection(host, port)

        WADebug.stdDebug("Requesting %s" % path)
        conn.request(reqType, path, params, headers)

        response = conn.getresponse().read()

        #WADebug.stdDebug(response)

        return response
Exemplo n.º 20
0
	def __init__(self):
		Debugger.attach(self)
		self.currKeyId = 1
		self.iqId = 0
		self.verbose = True
		self.state = 0
		self.lock = threading.Lock()
		self.autoPong = True
		
		self.domain = "s.whatsapp.net"
	
		#self.methodInterface = MethodInterface(authenticatedSocketConnection.getId())
		#self.signalInterface = SignalInterface(authenticatedSocketConnection.getId())
		self.readerThread = None
		
		self.methodInterface = LibMethodInterface()
		self.signalInterface = LibSignalInterface()
		self.readerThread = ReaderThread()
		self.readerThread.setSignalInterface(self.signalInterface)
		

		self.bindMethods()
Exemplo n.º 21
0
	def __init__(self):
		Debugger.attach(self)
		self.currKeyId = 1
		self.iqId = 0
		self.verbose = True
		self.state = 0
		self.lock = threading.Lock()
		self.autoPong = True
		
		self.domain = "s.whatsapp.net"
	
		#self.methodInterface = MethodInterface(authenticatedSocketConnection.getId())
		#self.signalInterface = SignalInterface(authenticatedSocketConnection.getId())
		self.readerThread = None
		
		self.methodInterface = LibMethodInterface()
		self.signalInterface = LibSignalInterface()
		self.readerThread = ReaderThread()
		self.readerThread.setSignalInterface(self.signalInterface)
		

		self.bindMethods()
Exemplo n.º 22
0
	def sendRequest(host, port, path, headers, params, reqType="GET"):

		params = urlencode(params);

		
		path = path + "?"+ params if reqType == "GET" and params else path
		
		WADebug.stdDebug(reqType)
		WADebug.stdDebug(headers);
		WADebug.stdDebug(params);

		WADebug.stdDebug("Opening connection to %s" % host);
		
		conn = httplib.HTTPSConnection(host ,port) if port == 443 else httplib.HTTPConnection(host ,port)
		
		WADebug.stdDebug("Requesting %s" % path)
		conn.request(reqType, path, params, headers);

		response = conn.getresponse()
		
		#WADebug.stdDebug(response)

		return response
Exemplo n.º 23
0
    def sendRequest(host, port, path, headers, params, reqType="GET"):

        params = urlencode(params)

        path = path + "?" + params if reqType == "GET" and params else path

        if len(headers):
            WADebug.stdDebug(headers)
        if len(params):
            WADebug.stdDebug(params)

        WADebug.stdDebug("Opening connection to %s" % host)

        conn = httplib.HTTPSConnection(
            host, port) if port == 443 else httplib.HTTPConnection(host, port)

        WADebug.stdDebug("Sending %s request to %s" % (reqType, path))
        conn.request(reqType, path, params, headers)

        response = conn.getresponse()

        return response
Exemplo n.º 24
0
  def sendRequest(host, port, path, headers, params, reqType="GET"):

    params = urlencode(params);


    path = path + "?"+ params if reqType == "GET" and params else path

    if len(headers):
      WADebug.stdDebug(headers)
    if len(params):
      WADebug.stdDebug(params)

    WADebug.stdDebug("Opening connection to %s" % host);

    conn = WARequest.getConn(host, port)
    if conn is None:
      conn = WARequest.getConn(host, port, True)

    WADebug.stdDebug("Sending %s request to %s" % (reqType, path))
    conn.request(reqType, path, params, headers);

    response = conn.getresponse()

    return response
Exemplo n.º 25
0
 def __init__(self):  # @@TODO unified naming pattern
     Debugger.attach(self)
     self.registeredSignals = {}
Exemplo n.º 26
0
    def __init__(self, conn):
        Debugger.attach(self)

        self.conn = conn
        self._d("Yowsup WAUTH-2 INIT")
Exemplo n.º 27
0
	def __init__(self,conn):
		Debugger.attach(self);

		self.conn = conn
		self._d("Yowsup WAUTH-1 INIT");