Re: Command Line in OSX [Was: Re: AppleScript and UNIX: Together at last!]
Re: Command Line in OSX [Was: Re: AppleScript and UNIX: Together at last!]
- Subject: Re: Command Line in OSX [Was: Re: AppleScript and UNIX: Together at last!]
- From: Timothy Bates <email@hidden>
- Date: Mon, 26 Mar 2001 02:07:01 +1000
someone asked
>
> Will we be able to use the command line from within scripts?
On 3/26/01 1:17 AM, "Greg Strange" <email@hidden> wrote:
>
Giving your script access to the command line is an invitation to
>
exploitation. What if you can do things like:
>
rm /* ?
>
from root within your AppleScript, especially as an ACGI.
a. You can do exactly that in AppleScript anyhow, including ACGI scripts:
why add terminal as a middleman, just say:
tell app "Finder"
set hahah to every folder of every drive whose name is not "System Folder"
repeat with hehe in haha
delete hehe
end
end
b. At least under 10, you have to be root to have that permission (of course
you can get the password by using an app on the CD!!!
And anyone booting your mac into OS9 instantly bypasses security ... so any
stranger with a text editor can hack your .conf files. Then when you
start-up under 10 again, the OS ftps your harddrive to sadam hussain ;-(
c. Let's not worry: We haven't for 20 years, why start now?
What we really want is a decent AppleScript feature set so we don't need to
go to the terminal.
tim