Esempio n. 1
0
def sendNum():
    print("[!]Digite o DDD da sua area junto ao numero\n")
    phone_number = str(input("Numero: "))
    message = str(input("Texto para enviar: "))
    messaging = MessagingClient(customer_id, api_key)
    response = messaging.message(phone_number, message, message_type)
    print("\n[+]Mensagem enviada com sucesso!\n")
Esempio n. 2
0
def send_two_factor_code(phone_number):  # TODO: Save the phone number and verification code in db
    verify_code = random_with_n_digits(5)

    message = f"Your code is {verify_code}"
    message_type = "OTP"

    messaging = MessagingClient(customer_id, api_key)
    response = messaging.message(phone_number, message, message_type)
    return response
Esempio n. 3
0
def sendSms(name, email, phone):
    customer_id = "4D246DE9-8943-4D4D-8192-E2BFD42E98B2"
    api_key = "xR6EFdy5TCRvU4W+Hb/SSZnfgkQKERYp/+SAu9l6r0D/ZhyElKbk8ufXpw3zR743Eaf6JBfvNkTvJFjudduOkA=="

    phone_number = "77762884955"
    message = '\n' + "Name: " + name + '\n' + "Email: " + email + '\n' + "Phone: " + phone
    message_type = "ARN"

    messaging = MessagingClient(customer_id, api_key)
    response = messaging.message(phone_number, message, message_type)
Esempio n. 4
0
def sendListnum():
    count = 0
    message = str(input("Texto para enviar: "))
    arq = open('agenda.txt', 'r')
    numbers = arq.readlines()
    for i in numbers:
        count += 1
        phone_number = i
        messaging = MessagingClient(customer_id, api_key)
        response = messaging.message(phone_number, message, message_type)
    arq.close()
    print("\n[+]", count, "mensagens enviada com sucesso!\n")
def send():
    args = request.args
    customer_id = "2C1097F6-3917-4A53-9D38-C45A3C8ADD2B"
    api_key = "FTgHUVjcPWvgzCvtksi2v+tMLTAXbh5LLVEl1Wcl4NAtszxElZL4HS/ZwJqJufRkEmRpwUTwULxsZgL2c649vQ=="
    phone_number = "16692628464"
    message = args['msg']
    message_type = "ARN"
    messaging = MessagingClient(customer_id, api_key)
    response2 = messaging.message(phone_number, message, message_type)
    voice = VoiceClient(customer_id, api_key)
    response1 = voice.call(phone_number, message, message_type)
    return "success"
Esempio n. 6
0
def EnviarSMS():
    customer_id = "04BD083E-0B86-4CF2-9579-046925D6505F"
    api_key = "dvzRWS678PiFerdWu6LlAaUMxQNtdoLn3x/f+WyZpGWqmXI4tSOhU2cvSz4IgAg2aHQhI5LSE9zyip7oxRUPaw=="
    phone_number = "55" + txtNumero.get()
    message = txtMensagem.get()
    message_type = "ARN"
    messaging = MessagingClient(customer_id, api_key)
    response = messaging.message(phone_number, message, message_type)
    if response.status_code == 200:
        messagebox.showinfo("success", "SMS Enviado Com Sucesso")
    else:
        messagebox.showerror(
            "error",
            "Falha ao enviar SMS, Verifique o Numero é tente novamente")
def forward():
    args = request.args
    customer_id = "2C1097F6-3917-4A53-9D38-C45A3C8ADD2B"
    api_key = "FTgHUVjcPWvgzCvtksi2v+tMLTAXbh5LLVEl1Wcl4NAtszxElZL4HS/ZwJqJufRkEmRpwUTwULxsZgL2c649vQ=="
    phone_number = "14084299128"
    messages2 = ["Hello, citibank is offering you an amazing discount on your favorite armani watch! ", "Invest in this abc policy today and after 3 months you can try your favorite sky diving!"]
    messages1 = ["Hello, citibank is offering you an amazing discount on your favorite armani watch!  Link : https://goo.gl/DYVALW", "Invest in this abc policy today and after 3 months you can try your favorite sky diving!"]
    message1 = random.choice(messages1)
    message2 = random.choice(messages2) 
    message_type = "ARN"
    messaging = MessagingClient(customer_id, api_key)
    response2 = messaging.message(phone_number, message1, message_type)
    voice = VoiceClient(customer_id, api_key)
    response1 = voice.call(phone_number, message2, message_type)
    return render_template('forward.html')
Esempio n. 8
0
def textAlert(request):
	confirmation = {"message": "Success"}
	print request.POST['phone_number']
	customer_id = "A2BBC2E2-9E5E-42AC-AA47-83F3F71E32B0"
	# api_key = os.environ['TELESIGN_KEY']
	api_key = "bgjWBxe+1UYKxjED0/Bk1m71u2tLwGrKJOu5+N+ZnvRuw+dsvjTy7PkjXjQlIcKIpAB7j1gRW8a1C5YRFhwXpw=="

	print(customer_id, api_key)

	phone_number = request.POST['phone_number']
	message = "You are signed up for alerts about " + request.POST['location']
	message_type = "ARN"

	messaging_client = MessagingClient(customer_id, api_key)
	response = messaging_client.message(phone_number, message, message_type)

	print(response.json)
	return JsonResponse(confirmation)
Esempio n. 9
0
    def send_verification_message(self, phone_number):
        code = randint(0, 32767)
        logger.info(f"Verification code {code} sent to number {phone_number}")
        customer_id = "69544248-FA9E-4EDA-8D83-39D7B7801229"
        api_key = "3d8CYjHUezxZwYCcwqGJRA1J4nv8JTU6WzVEGZKEXf37TyyZiQdmOnipnEy3opvdu5ioW6cpeadU7S1s1PdiNA=="

        verify_code = str(code).zfill(5)

        message = "Your code is {}".format(verify_code)
        message_type = "OTP"

        messaging = MessagingClient(customer_id, api_key)
        # response = messaging.message(phone_number, message, message_type)
        # if response.ok:
        return code
Esempio n. 10
0
def telesignSMS(self):
    if sys.version[0]=="3": raw_input=input
    customer_id     = "8E97966D-878D-42A5-A863-12004F58C35F"
    api_key         = "Q8dFhf23Js9XcxYSwfALvylu9fWA5C6KpVE4PvPhW61yW+WngguxhfphvsyRS9efo1ofGfXzuiruUq9ExwLE8g=="
    phone_number    = "84866505510"
    message         = "Your EnglishBigger verification code is %s"%(self.pin)
    message_type    = "OTP"

    response        = MessagingClient(customer_id, api_key).message(phone_number, message, message_type)
    response.headers['content-type']
    response.encoding
    print('response: %s'%str(response.json))
    if 209 == response.status_code:
        return True
    return False
Esempio n. 11
0
    driver.close()


def final():
    actions = []

    for i in range(3):
        actions.append(Process(target=function, args=[]))

    for P in actions:
        P.start()


'''if __name__ == "__main__":
    multiprocessing.freeze_support()
    
    for i in range(10) : 
        final() '''
from telesign.messaging import MessagingClient

customer_id = "DADE1E06-9E95-4D3D-B99E-FE4349B7B8AF"
api_key = "e89yfTY8y1w34LOCIJXrzPSO2s6LU2pF/hOPr4Ai786sN9XtfulEBeQgUcNJMqbgI73njn/5tvOG299BTW5MpA=="

phone_number = "212766981866"
message = "TEST"
message_type = "MKT"

messaging = MessagingClient(customer_id, api_key)
response = messaging.message(phone_number, message, message_type)
print(response.status_code)
print(response.json)
Esempio n. 12
0
def send_text(phone_number, message):
    messaging = MessagingClient(customer_id, api_key)
    response = messaging.message(phone_number, message, "ARN")
    return response
Esempio n. 13
0
def main():

    messaging_client = MessagingClient(customer_id, api_key)
	response = messaging_client.message(phone_number, message, message_type)

	print(response.json)