24sms.net Sender

Iniciado por Sanko, Mayo 22, 2013, 04:51:35 PM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Bueno os vengo a dejar un pequeñito code que hice para resolver unas dudas que se plantearón en este tema : You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

Sin más el code y una imágen del mensaje recibido:

Código: python
# m.24sms.net app to send sms
# Coded by Sanko

import urllib, urllib2
from cookielib import CookieJar

class SMS_Sender():

    def __init__(self):
        self._Responser()

    def _Responser(self):
        self.__Params('Sanko', 'Aqui tu prefijo + numero de telefono')
        #
        try:
            data_encoded = urllib.urlencode(self.data)
            response = self.opener.open("http://m.24sms.net/", data_encoded)
            content = response.read()
        except:
            print "Error doing the response"

        def __Parser():
            if content == "Site is doing maintenance,please come back later.":
                print "ERROR sending the SMS"
            else:
                print "the SMS was sent correctly!"

        __Parser()

    def __Params(self, author, number):
        self.author = author
        self.number = number

        #capturing the cookies
        try:
            cj = CookieJar()
            self.opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
        except:
            print "An error has ocurred capturing the cookies"
        #params
        self.data = {'al':1064, 'SendFrom':self.author, 'SendTo':self.number,
                'Msg':'Probando sms app - Sanko', 'submit':'Send'}


SMS_Sender()



Imágen :

Sigueme en Twitter : @Sankosk
Estos nuevos staff no tienen puta idea XD

tengo pensado hacer algo asi en perl o delphi pero queria preguntarte si ese servicio no te jode con publicidad despues de mandar el mensaje , porque habia visto servicios similares que despues jodian con publicidad al celular al que le habias mandado el mensaje.

Ya te digo nose que haran con los numbers pero a mi por el momento publi no me llega.
Al enviar unos cuantos te lanzara un recaptcha, cambia el param al por 1065 y evitaras el recaptcha.
Sigueme en Twitter : @Sankosk
Estos nuevos staff no tienen puta idea XD