Results 1 to 12 of 12
Like Tree3Likes
  • 1 Post By Tolls
  • 2 Post By kjkrum

Thread: little help needed over here.

  1. #1
    OtNePx is offline Member
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    0

    Default little help needed over here.

    Hello. I want to change IP from local to external(public) in this "shield" project, problem is i'm total newbie in java. Maybe anyone knows how to do that?

    InetSocketAddress("127.0.0.1", 15778)); this is for game launcher connection.



    HackShield.class

    PHP Code:
    import java.io.PrintStream;
    import java.net.*;
    import java.nio.channels.ServerSocketChannel;
    import java.nio.channels.SocketChannel;
    
    public class Hackshield
    {
    
        public Hackshield()
        {
            a_int_fld = 0;
            c = null;
            counter = 0;
            a_java_lang_String_fld = "121.128.133.28";
            b_int_fld = 15777;
            a_java_lang_String_fld = "121.128.133.28";
            b_int_fld = 15777;
        }
    
        private Hackshield(String s)
        {
            a_int_fld = 0;
            c = null;
            counter = 0;
            a_java_lang_String_fld = "121.128.133.28";
            b_int_fld = 15777;
            try
            {
                a_java_lang_String_fld = s;
                return;
            }
            // Misplaced declaration of an exception variable
            catch(String s)
            {
                System.out.println((new StringBuilder("Critical Error - ")).append(s.getMessage()).toString());
            }
        }
    
        private Hackshield(String s, String s1)
        {
            a_int_fld = 0;
            c = null;
            counter = 0;
            a_java_lang_String_fld = "121.128.133.28";
            b_int_fld = 15777;
            try
            {
                a_java_lang_String_fld = s;
            }
            // Misplaced declaration of an exception variable
            catch(String s)
            {
                System.out.println((new StringBuilder("Critical Error - ")).append(s.getMessage()).toString());
            }
            try
            {
                b_int_fld = Integer.parseInt(s1);
                return;
            }
            // Misplaced declaration of an exception variable
            catch(String s)
            {
                System.out.println((new StringBuilder("Critical Error - ")).append(s.getMessage()).toString());
            }
        }
    
        private void begin()
        {
            try
            {
                a_java_nio_channels_ServerSocketChannel_fld = ServerSocketChannel.open();
                a_java_nio_channels_ServerSocketChannel_fld.socket().bind(new InetSocketAddress("127.0.0.1", 15778));
                System.out.println("#############################################");
                System.out.println("####");
                System.out.println((new StringBuilder("####        IPHS: ")).append(InetAddress.getLocalHost().getHostAddress()).append(":").append(b_int_fld).toString());
                System.out.println("####");
                System.out.println("#############################################");
                System.out.println();
                System.out.println("****** Launch silkroad.exe to begin... ******");
                do
                {
                    System.out.println((new StringBuilder("Waiting for client... ")).append(a_java_nio_channels_ServerSocketChannel_fld.socket().getLocalSocketAddress()).toString());
                    a_java_nio_channels_SocketChannel_fld = a_java_nio_channels_ServerSocketChannel_fld.accept();
                    System.out.println("Client accepted...");
                    b_java_nio_channels_SocketChannel_fld = SocketChannel.open();
                    b_java_nio_channels_SocketChannel_fld.connect(new InetSocketAddress(a_java_lang_String_fld, 15779));
                    System.out.println("Connecting to server...");
                    d d1 = new d(this);
                    c c1 = new c(this);
                    d1.start();
                    c1.start();
                    c1.join();
                } while(true);
            }
            catch(Exception exception)
            {
                System.out.println((new StringBuilder("Critical Error - ")).append(exception.getMessage()).toString());
            }
        }
    
        public final synchronized boolean a(SocketChannel socketchannel)
        {
            boolean flag = false;
            if(c == null)
            {
                c = socketchannel;
                flag = true;
            }
            return flag;
        }
    
        public static void main(String args[])
        {
            try
            {
                if(args.length == 1)
                {
                    (args = new Hackshield(args[0])).begin();
                    return;
                }
                if(args.length == 2)
                {
                    (args = new Hackshield(args[0], args[1])).begin();
                    return;
                } else
                {
                    (args = new Hackshield()).begin();
                    return;
                }
            }
            // Misplaced declaration of an exception variable
            catch(String args[])
            {
                System.out.println((new StringBuilder("Critical Error - ")).append(args.getMessage()).toString());
            }
        }
    
        private ServerSocketChannel a_java_nio_channels_ServerSocketChannel_fld;
        public ServerSocketChannel b_java_nio_channels_ServerSocketChannel_fld;
        public SocketChannel a_java_nio_channels_SocketChannel_fld;
        public SocketChannel b_java_nio_channels_SocketChannel_fld;
        public int a_int_fld;
        public SocketChannel c;
        public int counter;
        public boolean a_boolean_fld;
        private String a_java_lang_String_fld;
        public int b_int_fld;
    }
    Attached Files Attached Files
    Last edited by OtNePx; 01-31-2012 at 09:58 PM.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default Re: little help needed over here.

    Your posted code has a lot of compile errors.
    For example many catch() statements are wrong.

  3. #3
    OtNePx is offline Member
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    0

    Default Re: little help needed over here.

    bump

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default Re: little help needed over here.

    If you want help with the compiler errors, you need to post them.

  5. #5
    OtNePx is offline Member
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    0

    Default Re: little help needed over here.

    Quote Originally Posted by Norm View Post
    If you want help with the compiler errors, you need to post them.
    I don't need help with errors. This project working fine, i don't care if there is any compile errors. I would like to if someone could help me change ip from local to external.
    2 your posts didn't answer my question, and not helped at all, i don't want to offend you but your posts more spamm than help.
    Last edited by OtNePx; 02-01-2012 at 03:55 PM.

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default Re: little help needed over here.

    Strange that you don't get the compiler errors I get.
    For example does this compile on your computer?
    catch(String args[])


    i don't care if there is any compile errors
    You can't execute a program unless you can compile it.

  7. #7
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default Re: little help needed over here.

    That looks like decompiled code to me...at least going by the appalling naming style.
    Norm likes this.

  8. #8
    OtNePx is offline Member
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    0

    Default Re: little help needed over here.

    Quote Originally Posted by Tolls View Post
    That looks like decompiled code to me...at least going by the appalling naming style.
    Yes it's.

  9. #9
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default Re: little help needed over here.

    You need to do some work on it to get it to compile before you will be able to make changes to it.

  10. #10
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,458
    Rep Power
    20

    Default Re: little help needed over here.

    Do you have legal permission to decompile that program?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  11. #11
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: little help needed over here.

    The name of this class, Hackshield, is also the name of some software that's supposed to hinder cheating in MMOs. And the program the OP is running, Silk Road, is the name of a MMO.

    IMO, the OP can get bent.
    Norm and Tolls like this.
    Get in the habit of using standard Java naming conventions!

  12. #12
    OtNePx is offline Member
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    0

Similar Threads

  1. Help needed
    By kenson02 in forum New To Java
    Replies: 6
    Last Post: 12-07-2011, 10:37 PM
  2. Help Needed
    By sandrajohn in forum Java Certification
    Replies: 0
    Last Post: 12-15-2010, 11:27 AM
  3. Help needed
    By S-NESH in forum New To Java
    Replies: 2
    Last Post: 12-13-2010, 02:32 PM
  4. Help needed.
    By necro-1000 in forum AWT / Swing
    Replies: 2
    Last Post: 01-12-2008, 12:37 PM
  5. Help Needed
    By pks in forum New To Java
    Replies: 1
    Last Post: 01-09-2008, 01:07 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
  •