Re: Can Perl redirect STDOUT to file AND to command window?
- From: "Purl Gurl" <purlgurl@xxxxxxxxxxxx>
- Date: Wed, 30 Nov 2005 00:37:40 GMT
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
.
- References:
- Prev by Date: Re: cASE sWITCHING?
- Next by Date: FAQ 8.33 Is there a way to hide perl's command line from programs such as "ps"?
- Previous by thread: Re: Can Perl redirect STDOUT to file AND to command window?
- Next by thread: FAQ 5.36 Why does Perl let me delete read-only files? Why does "-i" clobber protected files? Isn't this a bug in Perl?
- Index(es):
Relevant Pages
|