Git Product home page Git Product logo

Comments (10)

 avatar commented on August 26, 2024

Last time we checked with Windows Phone, it was the "DeviceUniqueId" property.

from whatsapi.

MHaendel avatar MHaendel commented on August 26, 2024

This should be similar to the iPhones UDID. Neither IMEI is working there.

from whatsapi.

 avatar commented on August 26, 2024

Are you sure about your username ?
For windows phone it will be reversed , then md5'ed unqiue id obtained by DeviceExtendedProperties.GetValue("DeviceUniqueId")

from whatsapi.

MHaendel avatar MHaendel commented on August 26, 2024

I know my Username is eg 4917600000000.

I extracted the methods out of the Source to get the original behaviour:

string pass = MD5Core.GetHashString(Enumerable.ToArray(Enumerable.Reverse(Enumerable.Cast(StringToByteArray(textBox1.Text)))));

from whatsapi.

MHaendel avatar MHaendel commented on August 26, 2024

private String Authenticate(String Nonce)
{

        string NC = "00000001";
        string CNonce = "e129f27c-5103-5c5c-844b-cdf0a15e160d";

        MemoryStream memoryStream = new MemoryStream();
        memoryStream.Write(this.Md5Digest(Encoding.UTF8.GetBytes(string.Concat(new string[]
            {
                Program.User,
                ":",
                Program.Realm,
                ":",
                Program.Password
            }))), 0, this.Md5Digest(Encoding.UTF8.GetBytes(string.Concat(new string[]
            {
                Program.User,
                ":",
                Program.Realm,
                ":",
                Program.Password
            }))).Length);
        byte[] bytes = Encoding.UTF8.GetBytes(":" + Nonce + ":" + CNonce);
        memoryStream.Write(bytes, 0, bytes.Length);
        string Digest_Uri = "xmpp/" + Program.Realm;
        byte[] array = new byte[memoryStream.Length];
        Array.Copy(memoryStream.GetBuffer(), array, (int)memoryStream.Length);
        string A2 = "AUTHENTICATE:" + Digest_Uri;
        string text5 = string.Concat(new string[]
            {
                this.BytesToHex(this.Md5Digest(array)),
                ":",
                Nonce,
                ":",
                NC,
                ":",
                CNonce,
                ":auth:",
                this.BytesToHex(this.Md5Digest(Encoding.UTF8.GetBytes(A2)))
            });
        string password = this.BytesToHex(this.Md5Digest(Encoding.UTF8.GetBytes(text5)));
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.Append("response=");
        stringBuilder.Append(password);
        stringBuilder.Append(",cnonce=\"");
        stringBuilder.Append(CNonce);
        stringBuilder.Append("\",username=\"");
        stringBuilder.Append(Program.User);
        stringBuilder.Append("\"");
        Console.WriteLine(stringBuilder.ToString());
        return stringBuilder.ToString();
    }

This is the Method I use for building the response.

from whatsapi.

Fl0ri4n avatar Fl0ri4n commented on August 26, 2024

Login doesn't work for me, too.
Not sure if the password is generated in a different way on iOS or if the python script isn't working properly on OSX, or if I'm missing something else...
That's what I do in whatsapi.py:

JID = "49172xxxxxxx"
wa_pass = wa_functions.encryptPassword("xxxxxxxxxxxxxxx")
start(JID, wa_pass)
sendMessage("1", "49xxxxxxxxxx", "Test!!")

At the end of sendMessage() I just get "Last read ===> ''"
How can I tell if the login/password is wrong, or if its a different problem? There are no errors and "s.recv(1024)" doesn't give me anything...

from whatsapi.

xTraXx avatar xTraXx commented on August 26, 2024

Try the PHP script, python wasn't working for me too.

from whatsapi.

MHaendel avatar MHaendel commented on August 26, 2024

Seems the password generation in iOS is a bit different. Not sure what it could be though...

from whatsapi.

onderweg avatar onderweg commented on August 26, 2024

Password should be MD5 of reversed UDID on the iphone, but i can't get it to work either.

from whatsapi.

mobilipia avatar mobilipia commented on August 26, 2024

Can anyone help me with working code for iphone. I did as adviced reversed my udid and did an md5 hash for password but it returns nothing. It does not login.

from whatsapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.