SRL Archive - Java Help and Tutorials

Load a JAR from a URL


Camaro'

2010-12-14 18:28:45

I am trying to load a jar file and run a method, i made a test jar on my server and the link is in the code. Can someone explain to me why I am getting the classNotFound exception even though I have checked the name like a 100 times? :p


URL s = new URL("http://www.aarondawg.comxa.com/eminer/test.jar!");
URL[] us = { s };
URLClassLoader child = new URLClassLoader (us);

Class classToLoad = Class.forName ("theClass", true, child);
Method method = classToLoad.getDeclaredMethod ("method4");
Object instance = classToLoad.newInstance ();
Object result = method.invoke (instance);
System.out.println(result.toString());

Gu3st...

2010-12-14 18:34:46

http://www.aarondawg.comxa.com/eminer/test.jar!
is supposed to be
http://www.aarondawg.comxa.com/eminer/test.jar

:redface:

EDIT: Next time, check the name 101 times :p

Camaro'

2010-12-14 18:36:40

I'd thought this http://download.oracle.com/javase/1.4.2/docs/api/java/net/JarURLConnection.html
would apply?


Edit:

Fixed :)

http://www.aarondawg.comxa.com/eminer/test.jar
to
jar:http://www.aarondawg.comxa.com/eminer/test.jar!/

Reported this thread for a lock, I don't want to delete if someone else gets this problem.

Edit: Got a few replys, so nevermind :p

Frement

2010-12-14 18:40:00

[QUOTE=Camaro';759074]dI thought this [url]http://download.oracle.com/javase/1.4.2/docs/api/java/net/JarURLConnection.html[/url]
would apply?


Edit:

Fixed :)

[url]http://www.aarondawg.comxa.com/eminer/test.jar[/url]
to
jar:[url]http://www.aarondawg.comxa.com/eminer/test.jar!/[/url]

Reported this thread for a lock, I don't want to delete if someone else gets this problem.

Would it be possible to encrypt the .jar file on server-end and then decrypt once you have downloaded it? And decrypting without temporary files would be awesome.

Camaro'

2010-12-14 18:44:56

I don't think thats possible. The most I can do is obfuscate the jar to begin with( I think)

Gu3st...

2010-12-14 18:50:58

[QUOTE=Camaro';759074]I'd thought this http://download.oracle.com/javase/1.4.2/docs/api/java/net/JarURLConnection.html
would apply?


Edit:

Fixed :)

http://www.aarondawg.comxa.com/eminer/test.jar
to
jar:http://www.aarondawg.comxa.com/eminer/test.jar!/

Reported this thread for a lock, I don't want to delete if someone else gets this problem.Ah..
So both of us were wrong in the first place :o

ZaSz

2010-12-14 18:53:32

I got a pretty uncrackable loader that right now, can only be cracked by a url sniffer.

Edit: cookie for crack WITHOUT sniffer

http://zaszmedia.com/class/hosting/aninstance/membersapi.jar

Get to the fileloader jar, and get cookie. BUT DO NOT POST LINK HERE IF DO FIND!

Shuttleu

2010-12-14 18:56:58

so the problem was a missing slash?
just thought i would question because you didnt state the correction

~shut

Camaro'

2010-12-14 19:04:36

From: ZaSz
I got a pretty uncrackable loader that right now, can only be cracked by a url sniffer.

Edit: cookie for crack WITHOUT sniffer

http://zaszmedia.com/class/hosting/aninstance/membersapi.jar

Get to the fileloader jar, and get cookie. BUT DO NOT POST LINK HERE IF DO FIND!


There was no need to post that ?

From: Shuttleu
so the problem was a missing slash?
just thought i would question because you didnt state the correction

~shut


I did post it when I quoted Zyt3x. I didn't state the correction, but it should be visible :p
Edit:

Added a jar: to the beginning and a backslash at the end.

From: Zyt3x
Ah..
So both of us were wrong in the first place :o


:p

Smartzkid

2010-12-14 19:15:36

From: ZaSz
I got a pretty uncrackable loader that right now, can only be cracked by a url sniffer.

Edit: cookie for crack WITHOUT sniffer

http://zaszmedia.com/class/hosting/aninstance/membersapi.jar

Get to the fileloader jar, and get cookie. BUT DO NOT POST LINK HERE IF DO FIND!


Got to lp.class but no motivation to go any further :p

Shuttleu

2010-12-14 19:17:17

by the way, you can close yourself
click on Reply
then somewhere on there you can close the thread

~shut

Sex

2010-12-14 19:29:33

From: Shuttleu
by the way, you can close yourself
click on Reply
then somewhere on there you can close the thread

~shut

That may be only if there are no replies or something like that, I don't remember.

ZaSz

2010-12-14 19:45:52

lp.class = my baby :)

TRiLeZ

2010-12-14 21:06:48

From: ZaSz
I got a pretty uncrackable loader that right now, can only be cracked by a url sniffer.

Edit: cookie for crack WITHOUT sniffer

http://zaszmedia.com/class/hosting/aninstance/membersapi.jar

Get to the fileloader jar, and get cookie. BUT DO NOT POST LINK HERE IF DO FIND!


From: ZaSz
lp.class = my baby :)


Object… tesing… serv… xD
Cracking is going fine. :)

I got to the file loader jar. :)

Smartzkid

2010-12-14 22:16:01

Nice! What tools did you use?

ZaSz

2010-12-14 22:27:27

Smartz, who you talking to? Me for what I use to encrypt? Or TRileZ for what he used to crack?

If Trilez, please don't share how! :D

And grats, how hard was it?

TRiLeZ

2010-12-14 23:52:55

From: Smartzkid
Nice! What tools did you use?


Reflection, and my byte code knowledge. I just had to piece everything together.

From: ZaSz
Smartz, who you talking to? Me for what I use to encrypt? Or TRileZ for what he used to crack?

If Trilez, please don't share how! :D

And grats, how hard was it?


It was pretty easy. :p

Sex

2010-12-15 02:22:55

Haha, that just hurt your self-esteem huh Zasz? You post here thinking you're the shit because you have something you believe is uncrackable however a member cracks it in a small amount of time :p.

Smartzkid

2010-12-15 02:51:12

Zasz, what did you use?

Wizzup?

2010-12-15 06:23:28

From: ZaSz
If Trilez, please don't share how! :D


Personally I would have shared it right away, just because you were bragging and going completely off topic.

Frement

2010-12-15 06:28:28

TRiLeZ, maybe you could show this? Write something here, so I could replicate the procedure? I tried to read the bytecode, but it just wasn't that easy. Maybe tell what of the commands are needed to crack this etc. Just out of curiosity, I'm sure everyone else would love to know also.

Wizzup?

2010-12-15 06:36:01

Closed on request. Continue this over PM.