POV-Ray : Newsgroups : povray.advanced-users : WARNING: #exec and safety Server Time
30 Jul 2024 14:24:44 EDT (-0400)
  WARNING: #exec and safety (Message 28 to 37 of 47)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Nieminen Juha
Subject: Re: WARNING: #exec and safety
Date: 21 Oct 1999 05:12:52
Message: <380ed914@news.povray.org>
Remco de Korte <rem### [at] xs4allnl> wrote:
: The way it is now with the filesaving in the Windows version seems like a good
: way. When rendering a file you're prompted whether you want to save the changes
: (while at the same time it will overwrite any file you made changes to at the
: moment you want to change it under another name - but that's another topic). At
: that point you can choose to disable that prompt for the duration of that
: session. I must admit that it is a bit tedious at times but on the other hand
: it's a safety measure. 

  You can't do this with ANSI C (nor C++).

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Nieminen Juha
Subject: Re: WARNING: #exec and safety
Date: 21 Oct 1999 05:16:02
Message: <380ed9d2@news.povray.org>
Mark Wagner <mar### [at] gtenet> wrote:
: I have a virus that will run (almost) in standard POV-Ray.  Should I post
: it?

  I think it's safe. A povray virus can never hide himself since you can
always see your pov-files. On the other hand non-advanced users will be
too frightened to render the infected scene when they see the word "virus",
so there shouldn't be any problem there.
  The code would be extremely interesting.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Simen Kvaal
Subject: Re: WARNING: #exec and safety
Date: 21 Oct 1999 08:54:36
Message: <380f0d0c@news.povray.org>
I don't think it's that difficult to create a #exec functionality that would
be safe. The solution might be:

1. A kind of register in POV of which commands are allowed. When  a scene
file with a binary executable is distributed, one should manually tell
povray that this file is ok to run, for example via an "registered #exec
programs" dialog from the menu, and *not* via an .INI-file.

2. Only allow executables whose filename begin with "pvex_" or similar. Of
course you can create a program that simply formats your hard drive and call
it "pvex_cool_diamond".

3. Never allow system commands.

I think the first solution is the best. What do you think? It shouldn't be
that difficult to include an #exec command in the official?

Bu then comes the problem with different platforms. In my opinion, *all*
povray users should be able to run *any* source file and obtain the *same*
results as everybody. If I create my own c++-compiler for SIMENOS2000 and
compile PovRay, I should be able to run the binary executables included with
the source file... But then, again, I might not create this operating
system.

Simen.


Post a reply to this message

From: Peter Popov
Subject: Re: WARNING: #exec and safety
Date: 21 Oct 1999 11:00:00
Message: <vq8OOCOryczkiqlQUBSnixgJGof+@4ax.com>
On Thu, 21 Oct 1999 00:41:48 -0400, "Mark Wagner"
<mar### [at] gtenet> wrote:

>I have a virus that will run (almost) in standard POV-Ray.  Should I post
>it?
>
>While developing this virus, I found a bug in POV-Ray's string handling
>routines -- sometimes a sequence such as "\"\\\\\",\"\\\"\"," will be
>incorrectly written to a file.
>
>Mark

I encountered a similar bug while I was trying to declare a string
defining a charset (all alphanumerals, punctuation and math symbols).
For some reason the parser choked on the double-quote and backslash,
even though I had a backslash before each of those. I did not explore
the depths of this bug because I used another approach.


Peter Popov
ICQ: 15002700


Post a reply to this message

From: Nieminen Juha
Subject: Re: WARNING: #exec and safety
Date: 21 Oct 1999 13:32:46
Message: <380f4e3e@news.povray.org>
Simen Kvaal <sim### [at] studentmatnatuiono> wrote:
: for example via an "registered #exec
: programs" dialog from the menu

  This can't be done with ANSI C.

: and *not* via an .INI-file.

  Why not?

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Mark Wagner
Subject: Re: WARNING: #exec and safety
Date: 22 Oct 1999 00:43:15
Message: <380feb63@news.povray.org>
Nieminen Juha wrote in message <380ed9d2@news.povray.org>...
>Mark Wagner <mar### [at] gtenet> wrote:
>: I have a virus that will run (almost) in standard POV-Ray.  Should I post
>: it?
>
>  I think it's safe. A povray virus can never hide himself since you can
>always see your pov-files. On the other hand non-advanced users will be
>too frightened to render the infected scene when they see the word "virus",
>so there shouldn't be any problem there.
>  The code would be extremely interesting.


OK, I'll post the virus in p.b.s-f

Mark


Post a reply to this message

From: Simen Kvaal
Subject: Re: WARNING: #exec and safety
Date: 22 Oct 1999 06:53:39
Message: <38104233@news.povray.org>
Nieminen Juha skrev i meldingen <380f4e3e@news.povray.org>...
>Simen Kvaal <sim### [at] studentmatnatuiono> wrote:
>: for example via an "registered #exec
>: programs" dialog from the menu
>
>  This can't be done with ANSI C.
>


Why not? You can specify which .ini files to use, which, include direcroties
to use, why not specify which #exec commands to allow?


>: and *not* via an .INI-file.
>
>  Why not?

Well, I thought maybe it was usual to supply an .ini file with the scene
file. If that ini-file included directives that let povray use a particular
#exec program, then we're back to the problem that the user has less
control. I think.

Simen.


Post a reply to this message

From: Nieminen Juha
Subject: Re: WARNING: #exec and safety
Date: 22 Oct 1999 07:46:56
Message: <38104eb0@news.povray.org>
Simen Kvaal <sim### [at] studentmatnatuiono> wrote:
:>: for example via an "registered #exec
:>: programs" dialog from the menu
:>
:>  This can't be done with ANSI C.

: Why not? You can specify which .ini files to use, which, include direcroties
: to use, why not specify which #exec commands to allow?

  Well, you talked about a dialog in a menu...

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Nieminen Juha
Subject: Re: WARNING: #exec and safety
Date: 22 Oct 1999 08:02:58
Message: <38105272@news.povray.org>
If I understood correctly (after autoindenting with emacs :) ), it tries
all possible character combinations for a file name. That takes years!
  There must be an easier way.

  I was thinking about a codemax macro or similar: When active, each time
you save a .pov-file it will check if it's infected; it not, it infects it
and saves. The macro would be loaded when an infected file is rendered
(perhaps by writing to some codemax ini file first, or something).
  But perhaps this is not possible.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Mark Wagner
Subject: Re: WARNING: #exec and safety
Date: 23 Oct 1999 00:28:55
Message: <38113987@news.povray.org>
Nieminen Juha wrote in message <38105272@news.povray.org>...
>  If I understood correctly (after autoindenting with emacs :) ), it tries
>all possible character combinations for a file name. That takes years!

My estimate is that it will take about 80 years on a resonably fast
computer.

>  There must be an easier way.


I've come up with a few ideas, such as providing a method for ruling out
filenames that probably won't be used.

>  I was thinking about a codemax macro or similar: When active, each time
>you save a .pov-file it will check if it's infected; it not, it infects it
>and saves. The macro would be loaded when an infected file is rendered
>(perhaps by writing to some codemax ini file first, or something).
>  But perhaps this is not possible.


It might be possible.  I'll have to check on that.

Mark


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.