Results 1 to 10 of 10
  1. #1
    ccoldfire is offline Member
    Join Date
    Oct 2009
    Posts
    4
    Rep Power
    0

    Default PLZZZZZ hlp me don't know any thing in java and need a favor

    hi u all
    i use this java application called "yamee" as a yahoo messenger in my mobile and recently the application stopped working cause yahoo changed the host that messnger should connect to (i know the new host) so as a newbie i unzipped the .jar file and start to search in the .class files to see which one has the host information and i found it and convert it to .java and made the change but i cant get it back into .class file and that what i need from u plz

    this is the code in the java file that i need to convert into a class file

    import java.io.*;
    import javax.microedition.io.*;

    public final class r
    {

    private r(String s, int i)
    {
    e = false;
    c = s;
    d = i;
    e = true;
    }

    public r()
    {
    this("cn.scs.msg.yahoo.com", 5050);
    e = false;
    }

    public final void a()
    throws IOException, ap
    {
    if(e)
    {
    f = (StreamConnection)Connector.open("socket://" + c + ":" + d);
    } else
    {
    String as[] = {
    "cn.scs.msg.yahoo.com", "cn.scsa.msg.yahoo.com"
    };
    int ai[] = {
    5050, 23, 25, 80
    };
    int i = 0;
    int j = 0;
    while(f == null)
    try
    {
    c = as[j];
    d = ai[i];
    f = (StreamConnection)Connector.open("socket://" + c + ":" + d);
    }
    catch(SecurityException _ex)
    {
    throw new ap("Connection failed!\nPlease check the connection settings");
    }
    catch(Exception _ex)
    {
    f = null;
    if(++i >= ai.length)
    {
    j++;
    i = 0;
    if(j >= as.length)
    throw new ap("Sorry, there was a problem in connecting");
    }
    }
    }
    g = new k(f.openInputStream());
    h = f.openDataOutputStream();
    }

    public final void b()
    throws IOException, InterruptedIOException
    {
    if(f != null)
    f.close();
    f = null;
    }

    public final void a(ab ab1, int i, long l, long l1)
    throws IOException
    {
    byte abyte0[] = ab1.a();
    synchronized(h)
    {
    h.write(a, 0, 4);
    h.write(b, 0, 4);
    h.writeShort(abyte0.length & 0xffff);
    h.writeShort(i & 0xffff);
    h.writeInt((int)(l & -1L));
    h.writeInt((int)(l1 & -1L));
    h.write(abyte0, 0, abyte0.length);
    h.flush();
    }
    }

    public final az c()
    throws IOException, InterruptedIOException
    {
    return g.a();
    }

    public static String[] a(az az1)
    {
    String as[] = new String[3];
    for(int i = 0; i < as.length; i++)
    {
    String s;
    if((s = az1.a("59", i)) == null)
    break;
    if(s.indexOf(";") >= 0)
    s = s.substring(0, s.indexOf(";"));
    switch(s.charAt(0))
    {
    case 89: // 'Y'
    as[0] = "Y=" + s.substring(2);
    break;

    case 84: // 'T'
    as[1] = "T=" + s.substring(2);
    break;

    case 67: // 'C'
    as[2] = "C=" + s.substring(2);
    break;

    default:
    System.err.println("What c: " + s);
    break;
    }
    }

    return as;
    }

    public static final byte a[] = {
    89, 77, 83, 71
    };
    public static final byte b[] = {
    0, 13, 0, 0
    };
    public String c;
    public int d;
    private boolean e;
    private StreamConnection f;
    private k g;
    private DataOutputStream h;

    }
    if u need the orginal .class file or even the whole jar file just tell me

    thank u

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Why go through all this? Besides being difficult, what you are trying to do may not even be legal. Instead why not either reinstall the program (if they have an update) or contact the developer?
    Last edited by Fubarable; 10-04-2009 at 12:30 AM.

  3. #3
    ccoldfire is offline Member
    Join Date
    Oct 2009
    Posts
    4
    Rep Power
    0

    Default

    Quote Originally Posted by Fubarable View Post
    Why go through all this? Besides being difficult, it may not even be legal. Instead why not either reinstall the program or contact the developer?
    i know am hacking the application,but i cant wait until the developer launch a new version,it could be weeks or months how should i know

    anyway , what do u think??is it doable?

  4. #4
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    7

    Default

    ooops the java source is opfuscated

  5. #5
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    I've never done it myself but have heard that reverse engineering a program is difficult for even an experienced programmer. Can it be done? possibly. Would it be easy to do? nope. Is it legal? doubtful.

  6. #6
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by serjant View Post
    ooops the java source is opfuscated
    Hey serjant, long time no see! I hope all is going well on your side of the world.

  7. #7
    ccoldfire is offline Member
    Join Date
    Oct 2009
    Posts
    4
    Rep Power
    0

    Default

    Quote Originally Posted by serjant View Post
    ooops the java source is opfuscated
    i generated the code using "DJ Java Decompiler "

  8. #8
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    7

    Default

    Fubarable:
    Yes I currently working on some huge Java Web projects - one of them is commercial one and two of them are on the sourceforge.net, I hope soon I will post about one very interesting in the Java Announcements section. But thanks that you remember me, it makes feeling good. Thanks
    As for the obfuscation , i corrected some source once while it was obfuscates, but it was really hard and required much debugging.

  9. #9
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    7

    Default

    Quote Originally Posted by ccoldfire View Post
    i generated the code using "DJ Java Decompiler "
    Yes, it is a decompiler, I know it. But the code was obfuscated before reaching your hands, you need to have the real source before the obfuscation and then you can a real problem and how the code was really written
    Last edited by serjant; 10-04-2009 at 12:47 AM.

  10. #10
    ccoldfire is offline Member
    Join Date
    Oct 2009
    Posts
    4
    Rep Power
    0

    Default

    Quote Originally Posted by serjant View Post
    Yes, it is a decompiler, I know it. But the code was obfuscated before reaching your hands, you need to have the real source before the obfuscation and then you can a real problem and how the code was really written
    oh i got it ,sorry new to the term obfuscated,so it's a dead end.
    thanks any way

Similar Threads

  1. A new thing arrives...
    By ewomack in forum Introductions
    Replies: 3
    Last Post: 10-09-2009, 10:16 PM
  2. A bit of a favor
    By Darkyere in forum New To Java
    Replies: 0
    Last Post: 08-19-2009, 03:44 PM
  3. What did i do wrong on thing method?
    By PureAwesomeness in forum New To Java
    Replies: 9
    Last Post: 03-08-2009, 09:37 AM
  4. Replies: 5
    Last Post: 02-25-2009, 08:14 PM
  5. PLz i really need help on this final thing
    By jason27131 in forum New To Java
    Replies: 2
    Last Post: 08-03-2007, 03:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •