Results 1 to 12 of 12
Thread: little help needed over here.
- 01-31-2012, 07:45 PM #1
Member
- Join Date
- Jan 2012
- Posts
- 5
- Rep Power
- 0
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; }
Last edited by OtNePx; 01-31-2012 at 08:58 PM.
- 01-31-2012, 09:41 PM #2
Re: little help needed over here.
Your posted code has a lot of compile errors.
For example many catch() statements are wrong.
- 02-01-2012, 01:41 PM #3
Member
- Join Date
- Jan 2012
- Posts
- 5
- Rep Power
- 0
Re: little help needed over here.
bump
- 02-01-2012, 01:44 PM #4
Re: little help needed over here.
If you want help with the compiler errors, you need to post them.
- 02-01-2012, 02:52 PM #5
Member
- Join Date
- Jan 2012
- Posts
- 5
- Rep Power
- 0
Re: little help needed over here.
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 02:55 PM.
- 02-01-2012, 02:54 PM #6
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[])
You can't execute a program unless you can compile it.i don't care if there is any compile errors
- 02-01-2012, 03:22 PM #7
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Re: little help needed over here.
That looks like decompiled code to me...at least going by the appalling naming style.
- 02-01-2012, 03:52 PM #8
Member
- Join Date
- Jan 2012
- Posts
- 5
- Rep Power
- 0
- 02-01-2012, 04:12 PM #9
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.
- 02-01-2012, 08:57 PM #10
Re: little help needed over here.
Do you have legal permission to decompile that program?
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 02-01-2012, 10:05 PM #11
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.Get in the habit of using standard Java naming conventions!
- 02-02-2012, 12:32 PM #12
Member
- Join Date
- Jan 2012
- Posts
- 5
- Rep Power
- 0
Similar Threads
-
Help needed
By kenson02 in forum New To JavaReplies: 6Last Post: 12-07-2011, 09:37 PM -
Help Needed
By sandrajohn in forum Java CertificationReplies: 0Last Post: 12-15-2010, 10:27 AM -
Help needed
By S-NESH in forum New To JavaReplies: 2Last Post: 12-13-2010, 01:32 PM -
Help needed.
By necro-1000 in forum AWT / SwingReplies: 2Last Post: 01-12-2008, 11:37 AM -
Help Needed
By pks in forum New To JavaReplies: 1Last Post: 01-09-2008, 12:07 AM


3Likes
LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks