944,167 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1544
  • Java RSS
Aug 1st, 2005
0

securing code on a webserver

Expand Post »
Ok, it's like this:

I can't have any class file downloaded from my website, for personal reasons.

A user could view the applet like this:

applet.html

then change the url easily to this:

applet.class

and have my program that easy.

Is there way I can secure this somehow???
Similar Threads
Reputation Points: 113
Solved Threads: 19
Postaholic
server_crash is offline Offline
2,108 posts
since Jun 2004
Aug 1st, 2005
0

Re: securing code on a webserver

no. Applets are clientside code, the classfiles will always have to be downloaded to the client.
In fact, your user won't even have to do that, he can just pull the classfile from your browsercache.
You can do things to prevent the classfile from being used from any other location though.
Think about applet restrictions and it becomes obvious

Still doesn't stop someone from decompiling your applet and changing it, but what are the chances of that (iow, how many people will want to go to the trouble? What makes your code so brilliant that people will actually want to decompile and crack it?).

If you don't want that, you'll have to use servlets/JSP and send over the generated html.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Aug 1st, 2005
0

Re: securing code on a webserver

Quote originally posted by jwenting ...
What makes your code so brilliant that people will actually want to decompile and crack it?).
It's not that. This program has great value to ME. I will be selling it, and if I can ever figure this out, I can show it to you and you will understand a bit better. Some fellow is selling the same thing(not quit as good as mine) for 175$, and if I'm going to sell it, I don't want people just to get it for free. Someone told me this:

"you can use the applets getDocumentBase() method to see if a user downloaded the class file....But what then? Is there something you can do to them if they download it? Is that correct about getDocumentBase()?
Reputation Points: 113
Solved Threads: 19
Postaholic
server_crash is offline Offline
2,108 posts
since Jun 2004
Aug 1st, 2005
0

Re: securing code on a webserver

Hi everyone,

The best thing you can do is try to obfuscate your code but then again there are some people that can actually still make sense of obfuscated code.

You could do encryption but people can still get into your code - (I am not going to describe how to get into encrpted code in java here or to anyone as someone could use that information for misuse.)

See even people like Microsoft which most probably have the best encrypted code still get their codes broken.

Don't worry if your program is as good as you say it is then trust me even if charge $200 you will still have buyers. One thing about people they always have nose for quality.

Don't mind me if i ask this but what is your program about. What does it do and what is it about. It seems interesting

Richard West
Reputation Points: 25
Solved Threads: 10
Practically a Master Poster
freesoft_2000 is offline Offline
623 posts
since Jun 2004
Aug 1st, 2005
0

Re: securing code on a webserver

Thanks for the reply Richard. I'll be posting a link as soon as I can get something fixed. It's very nice, but you won't understand untill you see it!

It's like J said, there's really nothing I can do, and it's a lot of trouble to decompile and stuff like that, so I've come up with a new solution:


getDocumentBase() method of the applet class allows you to see where it's placed. So, I was thinking that I could check to make sure it's running from my website, otherwise, it would not run. That still leaves the option of decompilation, but I think that's just a measure that I'll have to not worry about.

I will show it to you guys, but it will be about a day or two.
Reputation Points: 113
Solved Threads: 19
Postaholic
server_crash is offline Offline
2,108 posts
since Jun 2004
Aug 1st, 2005
0

Re: securing code on a webserver

getDocumentBase() is one thing, but I was really thinking of something else (maybe in combination with that).
Let your applet contact your server (which of course is the only one it's allowed to talk with by the sandbox) and get the really sensitive stuff using and RMI or socket connection to a process running there either as a standalone application or as a servlet.

That way the sensitive code is never deployed with the servlet so the thief (if any) will have to write that all himself.

If you then make sure only authorised IP addresses can connect to your server you also have a nice subscription based service in place almost for free.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Aug 1st, 2005
0

Re: securing code on a webserver

Quote originally posted by jwenting ...
getDocumentBase() is one thing, but I was really thinking of something else (maybe in combination with that).
Let your applet contact your server (which of course is the only one it's allowed to talk with by the sandbox) and get the really sensitive stuff using and RMI or socket connection to a process running there either as a standalone application or as a servlet.

That way the sensitive code is never deployed with the servlet so the thief (if any) will have to write that all himself.

If you then make sure only authorised IP addresses can connect to your server you also have a nice subscription based service in place almost for free.
Thanks, that's an excellent idea. I'm looking into getting a new webhost since the one I have doesn't support java. But I can't afford very much. I'm paying for a host that's 1.95$ right now, and that's about all I can afford. I think I just might set everything up before switching.
Reputation Points: 113
Solved Threads: 19
Postaholic
server_crash is offline Offline
2,108 posts
since Jun 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: help with Java
Next Thread in Java Forum Timeline: class rectangle





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC