Search code examples
linuxauthenticationyowsup

Yowsup - old_version error


i've got yowsup on my linux and when I trying to execute yowsup-cli registration -C <CountryCode> -r sms -p <Phone Number with Country Code> I'm getting

INFO:yowsup.common.http.warequest:{"status":"fail","reason":"old_version"}

status: fail

reason: old_version

Is there any way to fix this?


Solution

  • Note that there are two YowsupEnv implementations at: yowsup/env, specifically: env_android.py and env_s40.py.

    First, change the values of the following attributes at env_android.py: _MD5_CLASSES = "7UDPOXwpiLBvEjT8uNwsuA=="

    _KEY = "eQV5aq/Cg63Gsq1sshN9T3gh+UUp0wIw0xgHYT1bnCjEqOJQKCRrWxdAe2yvsDeCJL+Y4G3PRD2HUF7oUgiGo8vGlNJOaux26k+A2F3hj8A="

    _VERSION = "2.12.440"

    Then, you'll have to tell Yowsup to use the Android environment instead of the default S40 environment. To do so, modify the files:

    yowsup/registration/coderequest.py

    yowsup/common/http/warequest.py

    In both of them, replace the variable: CURRENT_ENV = S40YowsupEnv()

    With: CURRENT_ENV = AndroidYowsupEnv()

    Don't forget to also change the corresponding import statement as: from yowsup.env import AndroidYowsupEnv

    That should do the trick.