Re: Can Perl redirect STDOUT to file AND to command window?



rcm228 wrote:

> PG,

> I don't want to go into too much gory detail, but basically my module
> is for concurrent scripting with a simple IPC interface that works via
> C++, users of the module don't know that I am redirecting their output
> to a file and to the cmd window ;)

Writing a C language executable, for Windows, to duplicate filehandles
is very easy. Look around on Google and you will find many already
compiled and ready. I am not about to ask why you want to conceal
this from users, but will advise be sure your executable does not
have any "plaintext" viewable; convert your Plain English words to
hex, ord, or similar. If your executable is opened with a hex editor,
only hex data will be viewed.

Should you need to truly conceal commands, split up your commands
on different lines in your executable so "curious" people cannot convert
your hex entries to ASCII and make sense of what is there.

However, if a person is so curious to snoop around in your executable,
you are already suspect.

What you want to accomplish cannot be done with Perl nor MSDOS,
and be concealed. Even your C executable can be "read" to a degree.

Nonetheless, if your circumstances are users cannot access the
directory where you stash your program, there is no need to conceal.
My presumption this is the case, otherwise users would notice the
file creation, least I would; I track everything a program does to be
sure that program is not messing up my system.

Use of the IO module is fine, except it requires other modules. Pinging
my memory, I believe IO Tie uses two or three supporting modules.
That method will be resource wasteful.

Check on Google. There are lots of compiled binaries available which
will handle your task with ease and efficiency.

Purl Gurl
.



Relevant Pages

  • Re: OWA Error : -2147023569
    ... Using Windows Calculator in Scientific mode, I enter that code and change to ... hex, and it translates to 8007052F. ... Google that code and you'll get some ...
    (microsoft.public.exchange.admin)
  • Re: Notice: My 2nd crypto book finished :-)
    ... Shut the fuck up ... Do what he says - look at the headers: ... Google for that hex number to see who else hides behind that anonymiser - ...
    (sci.crypt)
  • Re: Ubuntu as a family
    ... I know that Google uses Linux extensively ... If only me, you and dead people understand hex, ... Alan McKinnon ... alan at linuxholdings dot co dot za ...
    (Ubuntu)
  • Re: Ubuntu as a family
    ... I know that Google uses Linux extensively ... If only me, you and dead people understand hex, ... Alan McKinnon ... alan at linuxholdings dot co dot za ...
    (Ubuntu)