Page 12 of 19 FirstFirst ... 27891011121314151617 ... LastLast
Results 221 to 240 of 376
Like Tree173Likes
  1. #221  
    Quote Originally Posted by jcmarcos View Post
    But the several month old Java client is still working, at least messaging. Or your problem is again in registration? I can't check that.
    The problem is not the registration currently, but logging in and messaging.

    So I'm surprised to see that the Java client still works, but Wazapp not.

    I guess the Java client uses a different method to login compared to Wazapp and Whazaa!. I know Eric used quite some bits from Wazapp for Whazaa, so that might explain why it doesn't work anymore.
  2. #222  
    I'll sign up as a beta tester too to see if I can help find the problem. Do I need to send eblade a pm or ...?
  3. #223  
    The Java client doesn't work properly here, could be due to work config. I only have the Alpha2 version here. jcmarcos: You're using the N900, Alpha 1 version?
  4. #224  
    Some code from Peter Bjorn's N900 Java client that might be relevant?

    org\whatsapp\net\wsapi\ServletRequest.class:
    Code:
    package org.peterbjornx.whatsapp.net.wsapi;
    
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.io.PrintStream;
    import java.net.MalformedURLException;
    import java.net.URL;
    import org.peterbjornx.httpsclient.HTTPSClient;
    import org.peterbjornx.whatsapp.Constants;
    import org.peterbjornx.whatsapp.Syncer;
    import org.peterbjornx.whatsapp.Syncer.UTF8URLEncoder;
    
    public abstract class ServletRequest
      implements Runnable
    {
      protected HTTPSClient urlCon;
      private URL url;
      private String urlString;
      private boolean opened = false;
      protected boolean stopped = false;
      private boolean wantsStop = false;
      private int code;
      private ByteArrayOutputStream queryString;
      private boolean isPOSTCall;
      private Thread thread;
    
      @Deprecated
      public void stop()
      {
        this.thread.stop();
      }
    
      public ServletRequest(String url, boolean postCall)
      {
        this.urlString = url;
        this.isPOSTCall = postCall;
        this.queryString = new ByteArrayOutputStream();
      }
    
      public void start() {
        this.thread = new Thread(this);
        this.thread.setName(new StringBuilder().append("[SERVLETREQUEST] ").append(this.urlString).toString());
        this.thread.start();
      }
    
      public void reset() {
        this.queryString.reset();
        this.code = -1;
        this.opened = false;
        this.stopped = false;
        this.wantsStop = false;
      }
    
      private URL getUrl() {
        try {
          if (!this.isPOSTCall) {
            return new URL(new StringBuilder().append(this.urlString).append(this.queryString.size() == 0 ? "" : new StringBuilder().append("?").append(this.queryString).toString()).toString());
          }
          return new URL(this.urlString); } catch (MalformedURLException e) {
        }
        throw new RuntimeException("Bad URL while constructing call");
      }
    
      public void run()
      {
        try {
          this.url = getUrl();
          this.urlCon = new HTTPSClient(this.url);
          this.opened = true;
          onProgress(10);
          OutputStream os;
          if (this.isPOSTCall) {
            this.urlCon.setRequestMethod("POST");
            this.urlCon.setRequestProperty(Constants.HTTP_REQUEST_PROPERTY_USER_AGENT, "WhatsApp/2.3.22 S40Version/04.60 Device/nokiac3-00");
            this.urlCon.setRequestProperty(Constants.HTTP_REQUEST_PROPERTY_CONTENT_TYPE, Constants.HTTP_REQUEST_PROPERTY_CONTENT_TYPE_VALUE_FORM_URL_ENCODED);
            String auth = getAuthorization();
            if (auth != null)
              this.urlCon.setRequestProperty("Authorization", auth);
            this.queryString.flush();
            this.urlCon.setRequestProperty(Constants.HTTP_REQUEST_PROPERTY_CONTENT_LENGTH, Integer.toString(this.queryString.size()));
            this.urlCon.connect();
            OutputStream os = this.urlCon.getOutputStream();
            os.write(this.queryString.toByteArray());
            System.out.println(new String(this.queryString.toByteArray()));
            os.flush();
          } else {
            String auth = getAuthorization();
            if (auth != null)
              this.urlCon.setRequestProperty("Authorization", auth);
            this.urlCon.setRequestProperty(Constants.HTTP_REQUEST_PROPERTY_USER_AGENT, "WhatsApp/2.3.22 S40Version/04.60 Device/nokiac3-00");
            this.urlCon.connect();
            os = this.urlCon.getOutputStream();
          }
          onProgress(20);
          InputStream in = this.urlCon.getInputStream();
          this.code = this.urlCon.getResponseCode();
          onProgress(30);
          switch (this.code) {
          case 200:
            onContentReceived(in);
            if (in == null) break;
            try {
              in.close();
            } catch (Exception e) {
            }
          case 400:
            Syncer.readCRLFLine(in);
          }
    
          if (this.urlCon != null)
            this.urlCon.disconnect();
          onDone();
        } catch (IOException e) {
          e.printStackTrace();
          onError(e);
        }
        this.stopped = true;
      }
    
      protected String getAuthorization() {
        return null;
      }
      protected abstract void onContentReceived(InputStream paramInputStream) throws IOException;
    
      protected void addParam(String name, String value) {
        try {
          Syncer.UTF8URLEncoder.appendPair(name, value, true, this.queryString);
        } catch (Exception e) {
          throw new RuntimeException("whatsapp-http-api: ioexception constructing call");
        }
      }
    
      protected void onProgress(int i) {
      }
    
      protected final void onError() {
        onError(null);
      }
      protected abstract void onDone();
    
      protected abstract void onError(Throwable paramThrowable);
    
      public boolean isStopped() { return this.stopped;
      }
    }
    org\whatsapp\net\wsapi\auth\AuthenticationHeader.class
    Code:
    package org.peterbjornx.whatsapp.net.wsapi.auth;
    
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.util.Random;
    import org.peterbjornx.whatsapp.util.JavaSEMD5MessageDigest;
    
    public class AuthenticationHeader
    {
      private static JavaSEMD5MessageDigest digest = new JavaSEMD5MessageDigest();
      private static final String NONCE = "nonce=\"";
    
      private static byte getHexChar(int value)
      {
        if (value < 10) {
          return (byte)(value + 48);
        }
        return (byte)(value + 97 - 10);
      }
    
      private static byte[] toHexString(byte[] data)
      {
        byte[] string = new byte[data.length << 1];
        int string_ptr = 0;
        for (int data_ptr = 0; data_ptr < data.length; data_ptr++)
        {
          int _data;
          if ((_data = data[data_ptr]) < 0)
            _data += 256;
          string[string_ptr] = getHexChar(_data >> 4);
          string_ptr++;
          string[string_ptr] = getHexChar(_data % 16);
          string_ptr++;
        }
    
        return string;
      }
    
      public static String randomLongString()
      {
        return Long.toString(Math.abs(new Random().nextLong()), 36);
      }
    
      public static String getNonce(String challenge)
        throws IOException
      {
        int startIndex;
        if ((startIndex = challenge.indexOf("nonce=\"")) == -1)
          throw new IOException("no nonce in challenge");
        startIndex += "nonce=\"".length();
        int endIndex;
        if ((endIndex = challenge.indexOf('"', startIndex)) == -1) {
          throw new IOException("bad nonce in challenge");
        }
        return challenge = challenge.substring(startIndex, endIndex);
      }
    
      private static byte[] md5(byte[] data)
      {
        digest.reset();
        digest.update(data);
        return digest.digest();
      }
    
      private static byte[] md5(String data)
      {
        digest.reset();
        digest.update(data.getBytes());
        return digest.digest();
      }
    
      private static String md5H(String data)
      {
        digest.reset();
        digest.update(data.getBytes());
        return new String(toHexString(digest.digest()));
      }
    
      private static String md5H(byte[] data)
      {
        digest.reset();
        digest.update(data);
        return new String(toHexString(digest.digest()));
      }
    
      public static String generateAuthHeader(String nonce, String cnonce, String s3, String username, String domain, String digest_uri, String password)
      {
        try
        {
          ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream();
          bytearrayoutputstream.write(md5(username + ":" + domain + ":" + password));
          bytearrayoutputstream.write(58);
          bytearrayoutputstream.write(nonce.getBytes());
          bytearrayoutputstream.write(58);
          bytearrayoutputstream.write(cnonce.getBytes());
          String inter_1 = new String();
    
          String auth = "AUTHENTICATE:" + digest_uri;
          String response = md5H(bytearrayoutputstream.toByteArray()) + ":" + nonce + ":" + s3 + ":" + cnonce + ":auth:" + md5H(auth);
          String response_md5 = md5H(response);
          StringBuffer result = new StringBuffer();
          result.append("response=");
          result.append(response_md5);
          result.append(",cnonce=\"");
          result.append(cnonce);
          result.append("\",username=\"");
          result.append(username);
          result.append("\",digest-uri=\"");
          result.append(digest_uri);
          result.append("\"");
          return result.toString(); } catch (Exception e) {
        }
        return null;
      }
    }
    org\whatsapp\net\wsapi\auth\AuthenticationRequest.class
    Code:
    package org.peterbjornx.whatsapp.net.wsapi.auth;
    
    import java.io.IOException;
    import java.io.InputStream;
    import org.peterbjornx.httpsclient.HTTPSClient;
    import org.peterbjornx.whatsapp.Syncer;
    import org.peterbjornx.whatsapp.net.wsapi.ServletRequest;
    import org.peterbjornx.whatsapp.storage.WhatsAppIdentity;
    import org.peterbjornx.whatsapp.util.Utilities;
    
    public class AuthenticationRequest extends ServletRequest
    {
      private Throwable error;
      private String authentication;
    
      public AuthenticationRequest()
      {
        super("https://sro.whatsapp.net/v2/sync/auth.php", false);
      }
    
      public String requestAuthenthication() {
        try {
          executeRequest();
          String nonce = AuthenticationHeader.getNonce(this.authentication);
          return "X-WAWA: " + AuthenticationHeader.generateAuthHeader(nonce, AuthenticationHeader.randomLongString(), "00000001", WhatsAppIdentity.getLogin(), "s.whatsapp.net", "WAWA/s.whatsapp.net", Utilities.getChatPassword());
        } catch (IOException e) {
          e.printStackTrace();
        }return null;
      }
    
      public void executeRequest() throws IOException
      {
        start();
        while (!this.stopped)
          try {
            Thread.sleep(100L); } catch (InterruptedException ignored) {
          }
        if (this.error != null)
          throw new IOException("Exception occurred in worker thread!", this.error);
      }
    
      protected String getAuthorization()
      {
        return "X-WAWA: " + AuthenticationHeader.generateAuthHeader("0", AuthenticationHeader.randomLongString(), "00000001", WhatsAppIdentity.getLogin(), "s.whatsapp.net", "WAWA/s.whatsapp.net", Utilities.getChatPassword());
      }
    
      protected void onContentReceived(InputStream in) throws IOException
      {
        this.authentication = this.urlCon.getHeaderField("WWW-Authenticate");
        Syncer.readCRLFLine(in);
      }
    
      protected void onDone()
      {
      }
    
      protected void onError(Throwable throwable) {
        this.error = throwable;
      }
    }
  5. #225  
    Quote Originally Posted by eblade View Post
    Also, your website has no place to comment, and no contact information that I can see. And not much in the way of details on your program either
    Sure it has! It is a blog from blogger (so you can comment) and you can click the tab contact where you can see our e-mail.

    By the way, is there any progress? Does Java version works with log-in and authentication?
  6. #226  
    Quote Originally Posted by Javazkript View Post
    Sure it has! It is a blog from blogger (so you can comment) and you can click the tab contact where you can see our e-mail.

    By the way, is there any progress? Does Java version works with log-in and authentication?
    According to jcmarcos Java version still works with log-in and authentication. I posted the bits that I believe are relevant above.

    Unfortunately I'm at work currently and cannot confirm it myself.
  7. #227  
    Quote Originally Posted by Herrie View Post
    The Java client doesn't work properly here, could be due to work config. I only have the Alpha2 version here. jcmarcos: You're using the N900, Alpha 1 version?
    The Java client made me mad for a while, as it's very picky in the way you configure it, at silly things as the phone number format, for example. I don't remember the details, but the headache. I'm successfully using "alpha 2", that perhaps works because it uses the configuration from the first. Here it's how it looks, in Windows:

    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\Software\JavaSoft\Prefs\org\peterbjornx\whatsapp\storage]
    "/I/M/E/I"="355825040********"
    "/R/E/G/S/T/E/P"="-1"
    "/C/C"="34"
    "/P/H/O/N/E/N/R"="649******"
    "/L/O/G/I/N"="34649******"
    I've removed actual digits with asterisks. Perhaps that gives you ideas, if you are stuck at its configuration.
    Pre 3 on GSM Jazztel: UberKernel, Muffle logging & friends, Mode Switcher, Advanced System Menus & Prefs, and then some more.

    Proudly choosing the loser side since 1982: Commodore VIC-20, C-64, Amiga 1000 & 3000, bPlan Pegasos & MorphOS, Psion Revo, Palm Pre...
  8. #228  
    Quote Originally Posted by pitsop View Post
    Hi Marcos!

    I'm a webOS developer from Barcelona
    Hola! Bona tarda...

    very interested in testing Eric's beta and chat with you, but I'm not Eric's betatester for now.
    So we are exactly in the same sittuation. Perhaps Eric can lend us his alpha version soon. I haven't contacted with him with that exact query.
    Pre 3 on GSM Jazztel: UberKernel, Muffle logging & friends, Mode Switcher, Advanced System Menus & Prefs, and then some more.

    Proudly choosing the loser side since 1982: Commodore VIC-20, C-64, Amiga 1000 & 3000, bPlan Pegasos & MorphOS, Psion Revo, Palm Pre...
  9. #229  
    Quote Originally Posted by jcmarcos View Post
    The Java client made me mad for a while, as it's very picky in the way you configure it, at silly things as the phone number format, for example. I don't remember the details, but the headache. I'm successfully using "alpha 2", that perhaps works because it uses the configuration from the first. Here it's how it looks, in Windows:

    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\Software\JavaSoft\Prefs\org\peterbjornx\whatsapp\storage]
    "/I/M/E/I"="355825040********"
    "/R/E/G/S/T/E/P"="-1"
    "/C/C"="34"
    "/P/H/O/N/E/N/R"="649******"
    "/L/O/G/I/N"="34649******"
    I've removed actual digits with asterisks. Perhaps that gives you ideas, if you are stuck at its configuration.
    Actually I cannot seem to enter my numbers in the Java app, could be due to my Java version or other restrictions at work.

    Quote Originally Posted by jcmarcos View Post
    Hola! Bona tarda...



    So we are exactly in the same sittuation. Perhaps Eric can lend us his alpha version soon. I haven't contacted with him with that exact query.
    That won't work, because the login is not working currently and needs fixing first
  10. #230  
    Java version on OSX seems to be wrong with style and it doesn't display the numbers you type. There is a class named RegisterConsole but I can't register my number with that class.

    -- Sent from my TouchPad using Communities
  11. #231  
  12. #232  
    Problem seems to be identified now:

    WhatsAPI was updated already. It seems only 2 bytes need fixing:

    https://github.com/venomous0x/WhatsA...5f4a467a363745

    Code:
      function Login()
    
    185 	185 	
    
       {
    
    186 	  	
    
    -    $Data = "WA"."\x01\x00\x00\x19\xf8\x05\x01\xa0\x8a\x84\xfc\x11"."iPhone-2.6.9-5222".
    
      	186 	
    
    +    $Data = "WA"."\x00\x04\x00\x19\xf8\x05\x01\xa0\x8a\x84\xfc\x11"."iPhone-2.6.9-5222".
    
    187 	187 	
    
             "\x00\x08\xf8\x02\x96\xf8\x01\xf8\x01\x7e\x00\x07\xf8\x05\x0f\x5a\x2a\xbd\xa7";
    
    188 	188 	
    
         $this->send($Data);
    
    189 	189 	
    
         $Buffer = $this->read();
    jcmarcos likes this.
  13. #233  
    node-wa has been updated for this fix, however, this is probably only a stopgap -- it looks like they are transitioning to a new authorization method, and this may have been part of it.

    Also, node-wa should now accept text messages larger than 200 characters without crashing. Receiving media still blows it up, and it looks like that's going to require some overhauling in the most basic part of it.
    Author:
    Remove Messaging Beeps patch for webOS 3.0.5, Left/Right bezel gestures in LunaCE,
    Whazaa! Messenger and node-wa, SynerGV 1 and 2 - Google Voice integration, XO - Subsonic Commander media streamer, AB:S Launcher
    (1:39:33 PM) halfhalo: Android multitasking is like sticking your fingers into a blender
    GO OPEN WEBOS!
    People asked me for a donate link for my non-catalog work, so here you are:
  14. #234  
    Quote Originally Posted by Herrie View Post
    Problem seems to be identified now: WhatsAPI was updated already. It seems only 2 bytes need fixing.
    Hey, that's brilliant. Also, my apologies, as I was confusing registration with login: Now I realize that registration problem from a couple of days ago was already fixed, and the login problem that popped up just afterwards is now hopefully solved.

    Quote Originally Posted by eblade View Post
    node-wa has been updated for this fix, however, this is probably only a stopgap -- it looks like they are transitioning to a new authorization method, and this may have been part of it.
    That's why I've added "hopefully" to what I said before. This kind of fighting against a changing system is quite tiresome, you deserve all the best!

    Also, node-wa should now accept text messages larger than 200 characters without crashing. Receiving media still blows it up, and it looks like that's going to require some overhauling in the most basic part of it.
    That's good progress. Does it mean that if someone sends me a (silly) photo, your "node-wa" stops working, right? Then, what's needed for it to work again? Restarting the messaging app, or the whole system?
    Pre 3 on GSM Jazztel: UberKernel, Muffle logging & friends, Mode Switcher, Advanced System Menus & Prefs, and then some more.

    Proudly choosing the loser side since 1982: Commodore VIC-20, C-64, Amiga 1000 & 3000, bPlan Pegasos & MorphOS, Psion Revo, Palm Pre...
  15. #235  
    restarting the connection in the whazaa app, currently.

    This weekend's not going to be good for work like this, I have a lot of work time to put in on my "day job", and just received notification of a family medical emergency that may require emergency travel plans.
    Author:
    Remove Messaging Beeps patch for webOS 3.0.5, Left/Right bezel gestures in LunaCE,
    Whazaa! Messenger and node-wa, SynerGV 1 and 2 - Google Voice integration, XO - Subsonic Commander media streamer, AB:S Launcher
    (1:39:33 PM) halfhalo: Android multitasking is like sticking your fingers into a blender
    GO OPEN WEBOS!
    People asked me for a donate link for my non-catalog work, so here you are:
  16. #236  
    Quote Originally Posted by eblade View Post
    restarting the connection in the whazaa app, currently.

    This weekend's not going to be good for work like this, I have a lot of work time to put in on my "day job", and just received notification of a family medical emergency that may require emergency travel plans.
    Take your time.

    strength!


    Inviato dal mio Galaxy Nexus con Tapatalk 2
    - HP Veer --
    Rnp likes this.
  17. #237  
    Quote Originally Posted by eblade View Post
    restarting the connection in the whazaa app, currently.

    This weekend's not going to be good for work like this, I have a lot of work time to put in on my "day job", and just received notification of a family medical emergency that may require emergency travel plans.
    Sorry to hear about the family. Best wishes for their recovery.
    Rnp likes this.
  18. #238  
    I'm sorry to hear that. Hope everything will be alright with your family.
  19. #239  
    eblade, sorry to hear about family! Take all the time you need and I hope the family member will fully recover!
    Rnp likes this.
  20. #240  
    Eric.
    I hope it's nothing major. WebOS fans can wait. We support you.
    Last edited by pitsop; 08/30/2012 at 08:32 AM.
    Rnp and Vistaus like this.

Posting Permissions