|
-
May 10th, 2004, 03:05 PM
#1
Thread Starter
Fanatic Member
Does my applet can't have a Runtime()?
Can't i have this code in a applet?
Code:
public class runMe extends Applet
{
public void init()
{
try
{
Runtime.getRuntime().exec("myProcedures.bat");
}
catch(Exception _ex)
{
System.out.println("ERROR!!!");
}
}
}
-
May 10th, 2004, 05:36 PM
#2
No. Security limitations.
Well, you can have the code, but it will throw an exception.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
May 10th, 2004, 06:56 PM
#3
Thread Starter
Fanatic Member
Hummmm i suposed it was cause of that...
I'v tryed to bypass that but it's not possible, i need to find an other solution for this
I had made once a bypass to the security and i made a applet that
could read some txt files on the server.
Maybe i can fin a solution for this too 
Thanks for your time
-
May 11th, 2004, 01:48 AM
#4
That's not bypassing. Establish network connections to the originating server is explicitely allowed.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
May 11th, 2004, 12:55 PM
#5
Thread Starter
Fanatic Member
but isn't really any way to exec something in the server remotely using java?
I don't want to install anything on my server, i just have a apache
runing on it.
what i'd like to do is to shutdown or reboot the server remotely,
without going home all times i need to restart it.
-
May 11th, 2004, 01:02 PM
#6
Well, you could have a privileged CGI script there that shuts down the server. You need to protect this quite well, though.
Some problems arise:
1) It must be a different server process than your main web server for security reasons: the server that hosts the CGI must stay root (unlike the normal, which binds to port 80 and then gives up root privileges), which is dangerous.
2) It must have its own configuration (obviously).
A better solution than writing an applet like this would be to use an existing remote administration package. There's one written in PHP at sourceforge.net, can't remember its name though. WebMin, I think.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
May 12th, 2004, 05:09 PM
#7
Thread Starter
Fanatic Member
ahh...ok then! the php file should help a lot...as i have a apache server runing...
Run as root is out of chance...no way i will do that.
Thanks so much for your nice help!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|