On Friday 10 June 2005 05:30 am, Tomasz Rola wrote:
> On Sun, 12 Jun 2005, km wrote:
>
> > hi all,
> >
> > can any linux command be invoked/ executed without using shell (bash) ?
> > what abt security concerns ?
>
> Ops, I missed the word "command" when reading your mail for the first
> time, an
Donn Cave wrote:
>> Not according the the docs:
>>
>> Also, for each of these variants, on Unix, cmd may be a
>> sequence, in which case arguments will be passed directly to
>> the program without shell intervention (as with os.spawnv()).
>> If cmd is a string it will be passed to the she
On 2005-06-10, Donn Cave <[EMAIL PROTECTED]> wrote:
>> Also, for each of these variants, on Unix, cmd may be a
>> sequence, in which case arguments will be passed directly to
>> the program without shell intervention (as with os.spawnv()).
>> If cmd is a string it will be passed to the she
In article <[EMAIL PROTECTED]>,
Grant Edwards <[EMAIL PROTECTED]> wrote:
...
> According to the current module reference, that's the behavior
> of the os.popen*() functions:
>
> http://docs.python.org/lib/os-newstreams.html#os-newstreams
>
> > On UNIX, os.popen is posix.popen, is a simple wrappe
Donn Cave <[EMAIL PROTECTED]> writes:
> In article <[EMAIL PROTECTED]>,
> Grant Edwards <[EMAIL PROTECTED]> wrote:
>
>> On 2005-06-10, Mage <[EMAIL PROTECTED]> wrote:
>>
>> >>py> file_list = os.popen("ls").read()
>> >>
>> >>Stores the output of ls into file_list.
>> >>
>> > These commands invoke
On 2005-06-10, Donn Cave <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Grant Edwards <[EMAIL PROTECTED]> wrote:
>
>> On 2005-06-10, Mage <[EMAIL PROTECTED]> wrote:
>>
>> >>py> file_list = os.popen("ls").read()
>> >>
>> >>Stores the output of ls into file_list.
>> >>
>> > These co
KM writes:
> can any linux command be invoked/ executed without using shell (bash) ?
> what abt security concerns ?
Yes.
See: http://docs.python.org/lib/module-subprocess.html
An exerpt:
> On Unix, with shell=False (default): In this case, the Popen class uses
> os.execvp() to execute the child
In article <[EMAIL PROTECTED]>,
Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2005-06-10, Mage <[EMAIL PROTECTED]> wrote:
>
> >>py> file_list = os.popen("ls").read()
> >>
> >>Stores the output of ls into file_list.
> >>
> > These commands invoke shell indeed.
>
> Under Unix, popen will not invo
On Fri, 10 Jun 2005 14:13:05 +, Grant Edwards wrote:
> On 2005-06-10, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>> On Sun, 12 Jun 2005 23:16:35 +0530, km wrote:
>>
>>> hi all,
>>>
>>> can any linux command be invoked/ executed without using shell (bash) ?
>>
>> py> import os
>> py> status =
On 2005-06-10, Mage <[EMAIL PROTECTED]> wrote:
>>py> file_list = os.popen("ls").read()
>>
>>Stores the output of ls into file_list.
>>
> These commands invoke shell indeed.
Under Unix, popen will not invoke a shell if it's passed a
sequence rather than a single string.
--
Grant Edwards
Steven D'Aprano wrote:
>On Sun, 12 Jun 2005 23:16:35 +0530, km wrote:
>
>
>
>>hi all,
>>
>>can any linux command be invoked/ executed without using shell (bash) ?
>>
>>
>
>py> import os
>py> status = os.system("ls")
>
>Prints the output of ls and stores the exit code into status.
>
>py> fil
On 2005-06-10, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> On Sun, 12 Jun 2005 23:16:35 +0530, km wrote:
>
>> hi all,
>>
>> can any linux command be invoked/ executed without using shell (bash) ?
>
> py> import os
> py> status = os.system("ls")
>
> Prints the output of ls and stores the exit cod
On 2005-06-12, km <[EMAIL PROTECTED]> wrote:
> can any linux command be invoked/executed without using shell (bash)?
Yes -- for some values of "linux command". You can execute
anything that's not a bash internal or a bash script without
using bash.
> what abt security concerns?
What about them
On Sun, 12 Jun 2005 23:16:35 +0530, km wrote:
> hi all,
>
> can any linux command be invoked/ executed without using shell (bash) ?
py> import os
py> status = os.system("ls")
Prints the output of ls and stores the exit code into status.
py> file_list = os.popen("ls").read()
Stores the output
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Sun, 12 Jun 2005, km wrote:
> hi all,
>
> can any linux command be invoked/ executed without using shell (bash) ?
> what abt security concerns ?
Ops, I missed the word "command" when reading your mail for the first
time, and this changes some p
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Sun, 12 Jun 2005, km wrote:
> hi all,
>
> can any linux command be invoked/ executed without using shell (bash) ?
> what abt security concerns ?
To answer your question fast, yes it is possible. Just pull every "bad"
block from the OS, and put
16 matches
Mail list logo