Exemplo n.º 1
0
 def __init__(self):
     super(WhaLayer, self).__init__()
     YowInterfaceLayer.__init__(self)
     self.interface = WhaLayerInterface(
     )  # TODO: I have no idea if this is the correct way of using the interface attribute
     self.interface.sendMessage = self.sendMessage  # TODO: I have no idea if this can be called in out-of-thread context
     self.interface.disconnect = self.disconnect  # TODO: see above
     self.connected = False
Exemplo n.º 2
0
 def __init__(self):
     super(Detect, self).__init__()
     YowInterfaceLayer.__init__(self)
     print('Layer Running')
     self.LIST_CONTACTS = []
     self.GOT_CONTACTS = False
     self.myfile = None
     self.wr = None
Exemplo n.º 3
0
 def __init__(self):
     super(IPerformLayer, self).__init__()
     YowInterfaceLayer.__init__(self)
     self.PROP_IDENTITY_AUTOTRUST = True
     self.connected = False
     self.jidAliases = {
         "": "@s.whatsapp.net"
         # "name": "*****@*****.**"
     }
Exemplo n.º 4
0
    def __init__(self):
        super(EchoLayer, self).__init__()
        YowInterfaceLayer.__init__(self)
        self.connected = False
        self.serve = Serve()

        self.bus_service = ServiceBusService(
            service_namespace='msgtestsb',
            shared_access_key_name='RootManageSharedAccessKey',
            shared_access_key_value='Ar9fUCZQdTL7cVWgerdNOB7sbQp0cWEeQyTRYUjKwpk=')
Exemplo n.º 5
0
    def __init__(self):
        super(EchoLayer, self).__init__()
        YowInterfaceLayer.__init__(self)
        self.connected = False
        self.serve = Serve()

        self.bus_service = ServiceBusService(
            service_namespace='msgtestsb',
            shared_access_key_name='RootManageSharedAccessKey',
            shared_access_key_value=
            'Ar9fUCZQdTL7cVWgerdNOB7sbQp0cWEeQyTRYUjKwpk=')
Exemplo n.º 6
0
    def __init__(self):

        super(YowsupWebLayer, self).__init__()
        YowInterfaceLayer.__init__(self)

        self.connected = False
        self.username = None
        self.sendReceipts = False
        self.sendRead = False
        self.credentials = None

        self.jidAliases = {
            # "NAME": "*****@*****.**"
        }
Exemplo n.º 7
0
    def __init__(self):
        super(YowsupCliLayer, self).__init__()
        YowInterfaceLayer.__init__(self)
        self.accountDelWarnings = 0
        self.connected = False
        self.username = None
        self.sendReceipts = True
        self.disconnectAction = self.__class__.DISCONNECT_ACTION_PROMPT

        # add aliases to make it user to use commands. for example you can then do:
        # /message send foobar "HI"
        # and then it will get automaticlaly mapped to foobar's jid
        self.jidAliases = {
            # "NAME": "*****@*****.**"
        }
Exemplo n.º 8
0
    def __init__(self):
        super(YowsupCliLayer, self).__init__()
        YowInterfaceLayer.__init__(self)
        self.accountDelWarnings = 0
        self.connected = False
        self.username = None
        self.sendReceipts = True
        self.disconnectAction = self.__class__.DISCONNECT_ACTION_PROMPT

        #add aliases to make it user to use commands. for example you can then do:
        # /message send foobar "HI"
        # and then it will get automaticlaly mapped to foobar's jid
        self.jidAliases = {
            # "NAME": "*****@*****.**"
        }
Exemplo n.º 9
0
    def __init__(self, image_path=None, phone_number=None):
        super(WhatsappImageSendLayer, self).__init__()
        YowInterfaceLayer.__init__(self)
        self.accountDelWarnings = 0
        self.connected = False
        self.username = None
        self.sendReceipts = True
        self.sendRead = True
        self.disconnectAction = self.__class__.DISCONNECT_ACTION_PROMPT
        self.credentials = None
        self.image_path = image_path
        self.phone_number = phone_number

        #add aliases to make it user to use commands. for example you can then do:
        # /message send foobar "HI"
        # and then it will get automaticlaly mapped to foobar's jid
        self.jidAliases = {
            # "NAME": "*****@*****.**"
        }
Exemplo n.º 10
0
    def __init__(self, tokenReSendMessage, urlReSendMessage, myNumber):
        super(SendReciveLayer, self).__init__()
        YowInterfaceLayer.__init__(self)
        self.accountDelWarnings = 0
        self.connected = False
        self.username = None
        self.sendReceipts = True
        self.sendRead = True
        self.disconnectAction = self.__class__.DISCONNECT_ACTION_PROMPT
        self.myNumber = myNumber
        self.credentials = None

        self.tokenReSendMessage = tokenReSendMessage
        self.urlReSendMessage = urlReSendMessage

        # add aliases to make it user to use commands. for example you can then do:
        # /message send foobar "HI"
        # and then it will get automaticlaly mapped to foobar's jid
        self.jidAliases = {
            # "NAME": "*****@*****.**"
        }
Exemplo n.º 11
0
 def __init__(self):
     self.isOnline = False
     self.BotPhoneNumber = '917009213133'  # TODO: BotPhoneNumber=The Running Bot's Number
     super(Whatsbot, self).__init__()
     YowInterfaceLayer.__init__(self)
     self.GOT_CONTACTS = False
     self.csvlink = ''
     self.synced = False
     self.SYNC_CONTACTS = []  #List of contacts which need to be synced
     self.LIST_CONTACTS = [
     ]  # List of Contacts to whom mwssage has to be sent
     print('WhatsBot Running')
     global DB_CONNECTION
     getDbConnection()
     self.connection = DB_CONNECTION
     self.forwarding = False
     self.lockXact = False
     self.ackQueue = []
     self.lock = threading.Condition()
     self.phone_num_last = '919417290392'
     self.RanOnce = False  # for Spamming Message
     self.bot_id = ''
     self.message_id = ''
     self.chunkSize = 1000
Exemplo n.º 12
0
 def __init__(self):
     YowInterfaceLayer.__init__(self)
Exemplo n.º 13
0
    def __init__(self):
        super(ZmqBrokerLayer, self).__init__()
        YowInterfaceLayer.__init__(self)
        self.connected = False

        self.group_association = {}
 def __init__(self):
     YowInterfaceLayer.__init__(self)
     self.startInputThread()
 def __init__(self):
     YowInterfaceLayer.__init__(self)
Exemplo n.º 16
0
 def __init__(self, sendQueue):
     super(QueueLayer, self).__init__()
     YowInterfaceLayer.__init__(self)
     self.connected = False
     self.sendQueue = sendQueue
Exemplo n.º 17
0
Arquivo: layer.py Projeto: peteh/snips
 def __init__(self):
     YowInterfaceLayer.__init__(self)
     self._mqttClient = MqttClient("creampi3.local", "whatsapp-cli",
                                   "36309040975")
     self._mqttClient.connect()
     self._mqttClient.publish("whatsappcli/messages/incoming", "test")
Exemplo n.º 18
0
 def __init__(self):
     YowInterfaceLayer.__init__(self)
     self.broadcastEvent(YowLayerEvent(YowNetworkLayer.EVENT_STATE_CONNECT))
     logger.info("Layer initialized")
Exemplo n.º 19
0
 def __init__(self, sendQueue):
     super(QueueLayer, self).__init__()
     YowInterfaceLayer.__init__(self)
     self.connected = False
     self.sendQueue = sendQueue
Exemplo n.º 20
0
 def __init__(self, receiveQueue):
     super(QueueLayer, self).__init__()
     YowInterfaceLayer.__init__(self)
     self.connected = False
     self.receiveQueue = receiveQueue
Exemplo n.º 21
0
 def __init__(self, receiveQueue):
     super(QueueLayer, self).__init__()
     YowInterfaceLayer.__init__(self)
     self.connected = False
     self.receiveQueue = receiveQueue