yowsup icon indicating copy to clipboard operation
yowsup copied to clipboard

old version problem please help me

Open manojrao opened this issue 9 years ago • 14 comments

my number is 9887613096. i can not registred please help me. 'status': u'fail', 'kind': None, 'code': None, 'pw': None, 'price': None, 'price_expiration': None, 'retry_after': None, 'currency': None, 'length': None, 'cost': None, 'param': None, 'reason': u'old_version', 'login': u'919887613096', 'type': None, 'method': None, 'expiration': None

manojrao avatar Aug 01 '17 11:08 manojrao

i have already used S40 i file below as: class S40YowsupEnv(YowsupEnv): _VERSION = "2.16.11" _OS_NAME= "S40" _OS_VERSION = "14.26" _DEVICE_NAME = "302" _MANUFACTURER = "Nokia" _TOKEN_STRING = "PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk1478194306452{phone}" _AXOLOTL = True

manojrao avatar Aug 01 '17 11:08 manojrao

hello @Fuzz1e, my env.py below as:- import abc import logging from six import with_metaclass

logger = logging.getLogger(name)

DEFAULT = "s40"

DEFAULT = "-E s40"

class YowsupEnvType(abc.ABCMeta): def init(cls, name, bases, dct): if name != "YowsupEnv": YowsupEnv.registerEnv(cls) super(YowsupEnvType, cls).init(name, bases, dct)

class YowsupEnv(with_metaclass(YowsupEnvType, object)): metaclass = YowsupEnvType __ENVS = {} __CURR = None

_USERAGENT_STRING = "WhatsApp/{WHATSAPP_VERSION} {OS_NAME}/{OS_VERSION} Device/{MANUFACTURER}-{DEVICE_NAME}"

@classmethod
def registerEnv(cls, envCls):
    envName = envCls.__name__.lower().replace("yowsupenv", "")
    cls.__ENVS[envName] = envCls
    logger.debug("registered env %s => %s" % (envName, envCls))

@classmethod
def setEnv(cls, envName):
    if not envName in cls.__ENVS:
        raise ValueError("%s env does not exist" % envName)
    logger.debug("Current env changed to %s " % envName)
    cls.__CURR = cls.__ENVS[envName]()

@classmethod
def getEnv(cls, envName):
    if not envName in cls.__ENVS:
        raise ValueError("%s env does not exist" % envName)

    return cls.__ENVS[envName]()

@classmethod
def getRegisteredEnvs(cls):
    return list(cls.__ENVS.keys())

@classmethod
def getCurrent(cls):
    if cls.__CURR is None:
        env = DEFAULT
        envs = cls.getRegisteredEnvs()
        if env not in envs:
            env = envs[0]
        logger.debug("Env not set, setting it to %s" % env)
        cls.setEnv(env)
    return cls.__CURR

@abc.abstractmethod
def getToken(self, phoneNumber):
    pass

@abc.abstractmethod
def getVersion(self):
    pass

@abc.abstractmethod
def getOSVersion(self):
    pass

@abc.abstractmethod
def getOSName(self):
    pass

@abc.abstractmethod
def getDeviceName(self):
    pass

@abc.abstractmethod
def getManufacturer(self):
    pass

@abc.abstractmethod
def isAxolotlEnabled(self):
    pass

def getBuildVersion(self):
    return ""

def getResource(self):
    return self.getOSName() + "-" + self.getVersion()

def getUserAgent(self):
    return self.__class__._USERAGENT_STRING.format(
        WHATSAPP_VERSION = self.getVersion(),
        OS_NAME = self.getOSName(),
        OS_VERSION = self.getOSVersion(),
        MANUFACTURER = self.getManufacturer(),
        DEVICE_NAME = self.getDeviceName()
    )

my env_androide.py as:- from .env import YowsupEnv import base64 import hashlib

class AndroidYowsupEnv(YowsupEnv): _SIGNATURE = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNV"
"BAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJ"
"pYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5"
"pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEg"
"YDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEm"
"aUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCN"
"VQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jr"
"qgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO"
"8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaS"
"HBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRW"
"YHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXd"
"KtOrNTQcc0e+t"

_MD5_CLASSES = "ry9Xz6kVioQctwA3G9z62Q=="
_VERSION = "2.12.556"


# _MD5_CLASSES = "ETAnhWrz/tGEeDZScjEyIA=="
# _VERSION = "2.17.285"

_KEY = "eQV5aq/Cg63Gsq1sshN9T3gh+UUp0wIw0xgHYT1bnCjEqOJQKCRrWxdAe2yvsDeCJL+Y4G3PRD2HUF7oUgiGo8vGlNJOaux26k+A2F3hj8A="
_OS_NAME = "Android"
_OS_VERSION = "4.3"
_DEVICE_NAME = "armani"
_MANUFACTURER = "Xiaomi"
_BUILD_VERSION = "JLS36C"
_AXOLOTL = True

def getVersion(self):
    return self.__class__._VERSION

def getOSName(self):
    return self.__class__._OS_NAME

def getOSVersion(self):
    return self.__class__._OS_VERSION

def getDeviceName(self):
    return self.__class__._DEVICE_NAME

def getBuildVersion(self):
    return self.__class__._BUILD_VERSION

def getManufacturer(self):
    return self.__class__._MANUFACTURER

def isAxolotlEnabled(self):
    return self.__class__._AXOLOTL

def getToken(self, phoneNumber):
    keyDecoded = bytearray(base64.b64decode(self.__class__._KEY))
    sigDecoded = base64.b64decode(self.__class__._SIGNATURE)
    clsDecoded = base64.b64decode(self.__class__._MD5_CLASSES)
    data = sigDecoded + clsDecoded + phoneNumber.encode()

    opad = bytearray()
    ipad = bytearray()
    for i in range(0, 64):
        opad.append(0x5C ^ keyDecoded[i])
        ipad.append(0x36 ^ keyDecoded[i])
    hash = hashlib.sha1()
    subHash = hashlib.sha1()
    try:
        subHash.update(ipad + data)
        hash.update(opad + subHash.digest())
    except TypeError:
        subHash.update(bytes(ipad + data))
        hash.update(bytes(opad + subHash.digest()))
    result = base64.b64encode(hash.digest())
    return result

and my file env_s40.py belwo as:- from .env import YowsupEnv import hashlib class S40YowsupEnv(YowsupEnv): _VERSION = "2.16.11" _OS_NAME= "S40" _OS_VERSION = "14.26" _DEVICE_NAME = "302" _MANUFACTURER = "Nokia" _TOKEN_STRING = "PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk1478194306452{phone}" _AXOLOTL = True

def getVersion(self):
    return self.__class__._VERSION

def getOSName(self):
    return self.__class__._OS_NAME

def getOSVersion(self):
    return self.__class__._OS_VERSION

def getDeviceName(self):
    return self.__class__._DEVICE_NAME

def getManufacturer(self):
    return self.__class__._MANUFACTURER

def isAxolotlEnabled(self):
    return self.__class__._AXOLOTL

def getToken(self, phoneNumber):
    return hashlib.md5(self.__class__._TOKEN_STRING.format(phone = phoneNumber).encode()).hexdigest()

def getUserAgent(self):
    return self.__class__._USERAGENT_STRING.format(
        WHATSAPP_VERSION = self.getVersion(),
        OS_NAME = self.getOSName() + "Version",
        OS_VERSION = self.getOSVersion(),
        DEVICE_NAME = self.getDeviceName(),
        MANUFACTURER = self.getManufacturer()
    )

and last my registration code below as:- from yowsup.registration import WACodeRequest method='sms' config={'cc': '91', 'mcc': '404', 'sim_mcc': '000', 'phone': '9887613096', 'sim_mnc': '000', 'mnc': '00'} codeReq = WACodeRequest(config["cc"], config["phone"], config["mcc"], config["mnc"], config["mcc"], config["mnc"], method ) result = codeReq.send() Please guide me. Thanks Manoj Kumar

manojrao avatar Aug 01 '17 11:08 manojrao

please go to yowsup/env/env_android.py change:

_MD5_CLASSES = "3jYxFPSrhqjabEm5b2sXhA==" _VERSION = "2.17.279"

and try to register with -E Android

yowsup-cli registration --requestcode sms --phone 49XXXXXXX--cc 49 -E android

sealabr avatar Aug 01 '17 12:08 sealabr

Thank a ton @sealabr

manojrao avatar Aug 01 '17 12:08 manojrao

Anyone know something?

Saludos, Pablo

On Tue, Aug 1, 2017 at 9:26 AM, manojrao [email protected] wrote:

Thank a ton @sealabr https://github.com/sealabr

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tgalal/yowsup/issues/2180#issuecomment-319355352, or mute the thread https://github.com/notifications/unsubscribe-auth/AEymzYwVpfo4-2XKRbDMzsbOjzFpgRWgks5sTxlvgaJpZM4OplXl .

pablokere avatar Aug 02 '17 03:08 pablokere

@sealabr hello my code run successfully but re register than below as problem:- {'status': u'fail', 'kind': None, 'pw': None, 'sms_length': None, 'price': None, 'price_expiration': None, 'param': None, 'currency': None, 'reason': u'blocked', 'cost': None, 'result': None, 'voice_length': None, 'login': u'918955644414', 'type': None, 'expiration': None} Please help me.

manojrao avatar Aug 02 '17 06:08 manojrao

how to login at a time multipal number please guide me

manojrao avatar Aug 02 '17 06:08 manojrao

your number got blocked.

have you activated many different numbers in a short period of time from same ip?

try to change IP too.

sealabr avatar Aug 02 '17 12:08 sealabr

yes i got the problem. thanks

On Wed, Aug 2, 2017 at 5:33 PM, Fábio Mendes Viana <[email protected]

wrote:

your number got blocked.

have you activated many different numbers in a short period of time from same ip?

try to change IP too.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tgalal/yowsup/issues/2180#issuecomment-319652355, or mute the thread https://github.com/notifications/unsubscribe-auth/ADRAsu3KNptQ149ZXsxhqQoiuqwTAA-qks5sUGWrgaJpZM4OplXl .

-- Thanks Regards, Manoj Choudhary 9887613096

manojrao avatar Aug 02 '17 12:08 manojrao

We hace the new version and md5_classes, please share it

Saludos, Pablo

On Wed, Aug 2, 2017 at 9:05 AM, manojrao [email protected] wrote:

yes i got the problem. thanks

On Wed, Aug 2, 2017 at 5:33 PM, Fábio Mendes Viana < [email protected]

wrote:

your number got blocked.

have you activated many different numbers in a short period of time from same ip?

try to change IP too.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tgalal/yowsup/issues/2180#issuecomment-319652355, or mute the thread <https://github.com/notifications/unsubscribe-auth/ ADRAsu3KNptQ149ZXsxhqQoiuqwTAA-qks5sUGWrgaJpZM4OplXl> .

-- Thanks Regards, Manoj Choudhary 9887613096

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tgalal/yowsup/issues/2180#issuecomment-319652710, or mute the thread https://github.com/notifications/unsubscribe-auth/AEymzZQD0Wf7ToCOInbBwNipZeSMkvINks5sUGYcgaJpZM4OplXl .

pablokere avatar Aug 02 '17 12:08 pablokere

hello every one how to download received media message images and videos for received time.

manojrao avatar Aug 03 '17 09:08 manojrao

@sealabr I changed the code for android environment but i still keep getting old_version. Any other suggestions?

DEBUG:yowsup.common.http.warequest:{'Accept': 'text/json', 'User-Agent': 'WhatsApp/2.12.556 Android/4.3 Device/Xiaomi-armani'} DEBUG:yowsup.common.http.warequest:cc=31&in=xxxxxxxxx&lc=GB&lg=en&sim_mcc=000&sim_mnc=000&mcc=000&mnc=000&method=sms&mistyped=6&network_radio_type=1&simnum=1&s=&copiedrc=1&hasinrc=1&rcmatch=1&pid=4118&rchash=8b86a979a61b58a05a2d35dc8c866795951373d06d1513a7347f2acc08b23e1a&anhash=I%CD.%D7%40%24%A9r%11%5E%F8%A7%C8%A8%9E%0E%9A%81%E6%27&extexist=1&extstate=1&token=U7yRciVNjf7%2BHfKtA9SBxQVk2ko%3D&id=%12K%A2%2B%CFn%91%3BN%82%CB%B1%B1%EA49%17%1D%B3%F7 DEBUG:yowsup.common.http.warequest:Opening connection to v.whatsapp.net DEBUG:yowsup.common.http.warequest:Sending GET request to /v2/code?cc=31&in=xxxxxxxx&lc=GB&lg=en&sim_mcc=000&sim_mnc=000&mcc=000&mnc=000&method=sms&mistyped=6&network_radio_type=1&simnum=1&s=&copiedrc=1&hasinrc=1&rcmatch=1&pid=4118&rchash=8b86a979a61b58a05a2d35dc8c866795951373d06d1513a7347f2acc08b23e1a&anhash=I%CD.%D7%40%24%A9r%11%5E%F8%A7%C8%A8%9E%0E%9A%81%E6%27&extexist=1&extstate=1&token=U7yRciVNjf7%2BHfKtA9SBxQVk2ko%3D&id=%12K%A2%2B%CFn%91%3BN%82%CB%B1%B1%EA49%17%1D%B3%F7 INFO:yowsup.common.http.warequest:{"login":"31xxxxxx","status":"fail","reason":"old_version"}

status: fail reason: old_version

baxanidis avatar Aug 19 '17 20:08 baxanidis

didn't worked today. old_version message again.

hgc2002 avatar Aug 24 '17 19:08 hgc2002

@sealabr, your solution works for me, but any reason why the new _MD5_CLASSES and _VERSIONS value have not been checked in?

immanuelnoel avatar Sep 04 '17 03:09 immanuelnoel