Neopets Mobile: Difference between revisions

From Computers Wiki
Jump to navigationJump to search
Line 27: Line 27:
<code>m.java</code> contains one call:
<code>m.java</code> contains one call:
* http://npprod.in-fusio.com/data-np/
* http://npprod.in-fusio.com/data-np/

=== Both ===

In <code>b.java</code> for the 6280 version and <code>m.java</code> for the 6111 version, there is code for the following POST request (taken from the 6280 version):

<syntaxhighlight lang="java">
private static final void a(HttpConnection var0, p var1, boolean var2) throws IOException {
var0.setRequestMethod("POST");
var0.setRequestProperty("content-type", "application/x-www-form-urlencoded");
var0.setRequestProperty("connection", "close");
if (a != null) {
var0.setRequestProperty("x-up-calling-line-id", a);
}

DataOutputStream var3 = var0.openDataOutputStream();
if (var2) {
a(var3, "session=" + b);
a(var3, "&");
}

a(var3, "client=NEOPETS/2.8");
a(var3, "&");
a(var3, "game=" + c);
if (a > 0) {
a(var3, "&");
a(var3, "center=" + a);
}

if (d != null) {
a(var3, "&");
a(var3, "language=" + d);
}

a(var3, "\n");
var3.writeShort(var1.a);
var3.writeInt(8 * var1.a());
var1.a(var3);
var3.writeShort(255);
var3.close();
}
</syntaxhighlight>


[[Category:Neopets]]
[[Category:Neopets]]

Revision as of 03:00, 21 May 2023

Neopets Mobile does not refer to the 2021 interface of the website, but the 2006 flip phone application that has long been discontinued.

Archival

https://www.jellyneo.net/?go=mobile

https://pinkpt.com//neodex/index.php?title=Neopets_Mobile

https://drive.google.com/file/d/1Cj8hqk4VI-O408kgMnKpffPmI-kxKmWR/view

Attempts to reverse engineer the long-defunct API

TODO (The jars are all minified, but perhaps I can extract the API URLs from them and document what the application expects to get back)

The META-INF/MANIFEST.MF for the Nokia 6280 version specifies a Java version of 1.4.2_04.

The decompiler used is quiltflower: https://github.com/QuiltMC/quiltflower and the javax.microedition classes were copied from https://github.com/mcpat/java-microedition-libraries

Nokia 6280 V02.30.00 (en) Singtel

m.java contains two calls:

Nokia 6111

m.java contains one call:

Both

In b.java for the 6280 version and m.java for the 6111 version, there is code for the following POST request (taken from the 6280 version):

   private static final void a(HttpConnection var0, p var1, boolean var2) throws IOException {
      var0.setRequestMethod("POST");
      var0.setRequestProperty("content-type", "application/x-www-form-urlencoded");
      var0.setRequestProperty("connection", "close");
      if (a != null) {
         var0.setRequestProperty("x-up-calling-line-id", a);
      }

      DataOutputStream var3 = var0.openDataOutputStream();
      if (var2) {
         a(var3, "session=" + b);
         a(var3, "&");
      }

      a(var3, "client=NEOPETS/2.8");
      a(var3, "&");
      a(var3, "game=" + c);
      if (a > 0) {
         a(var3, "&");
         a(var3, "center=" + a);
      }

      if (d != null) {
         a(var3, "&");
         a(var3, "language=" + d);
      }

      a(var3, "\n");
      var3.writeShort(var1.a);
      var3.writeInt(8 * var1.a());
      var1.a(var3);
      var3.writeShort(255);
      var3.close();
   }