Script

Script

Post by Shantan » Sat, 30 Sep 2000 04:00:00



How to write a shell script or perl script to store all the key strokes
pressed by the user in a file.

following doen't work

cat < /dev/stdin >> tmp

It only creates file tmp with of zero length

 
 
 

Script

Post by michael.fengle » Sat, 30 Sep 2000 04:00:00



>How to write a shell script or perl script to store all the key strokes
>pressed by the user in a file.

man script
(no, this is *not* a joke:-)

- mike

 
 
 

Script

Post by Faux_Pseu » Sat, 30 Sep 2000 04:00:00


--(Once apon a time, in alt.os.linux,)--
                --(Shantanu said it like only they can.)--
$How to write a shell script or perl script to store all the key strokes
$pressed by the user in a file.
$
$following doen't work
$
$cat < /dev/stdin >> tmp
$
$It only creates file tmp with of zero length
$
in perl i would look "something" like this
this script will not work

#!/usr/bin/perl -w

open (LOG, '/tmp/keylog.txt') ;
while ( 2 > 1 ) {
print <STDIN> >> LOG;

Quote:}

close(LOG);

then again not like this at all realy
but its something to build on at least

you would execute the script like
keyloger.pl &
so that it stays in the background

--
 ._______.                               ._______.
 | <> <> |     GUI's are for slackers.   | <> <> |
  \-|o|-/   ibpconf.sh on freshmeat.net   \-|o|-/
   /___\   the easiest way to personalize  /___\
   (MMM) the command line.  By Faux_Pseudo (MMM)

 
 
 

Script

Post by John Hayward-Warburto » Sat, 30 Sep 2000 04:00:00



> cat < /dev/stdin >> tmp

> It only creates file tmp with of zero length

Eh? works for me. End the typing with CTRL-D or CTRL-C, both are fine.
Bash-2.04, Linux 2.4 pre something.

JHW

 
 
 

Script

Post by Joe Durusa » Sat, 30 Sep 2000 04:00:00


If copying to a file is ALL you want to do,

cat >>filename

is good enough, since on most systems, cat defaults to stdin as its
input.
You may need to do something with stty in order to disable buffering on
the input.

Speaking only for myself,

Joe Durusau


> --(Once apon a time, in alt.os.linux,)--
>                 --(Shantanu said it like only they can.)--
> $How to write a shell script or perl script to store all the key strokes
> $pressed by the user in a file.
> $
> $following doen't work
> $
> $cat < /dev/stdin >> tmp
> $
> $It only creates file tmp with of zero length
> $
> in perl i would look "something" like this
> this script will not work

> #!/usr/bin/perl -w

> open (LOG, '/tmp/keylog.txt') ;
> while ( 2 > 1 ) {
> print <STDIN> >> LOG;
> }
> close(LOG);

> then again not like this at all realy
> but its something to build on at least

> you would execute the script like
> keyloger.pl &
> so that it stays in the background

> --
>  ._______.                               ._______.
>  | <> <> |     GUI's are for slackers.   | <> <> |
>   \-|o|-/   ibpconf.sh on freshmeat.net   \-|o|-/
>    /___\   the easiest way to personalize  /___\
>    (MMM) the command line.  By Faux_Pseudo (MMM)

 
 
 

Script

Post by Stephen Uitt » Tue, 03 Oct 2000 04:00:00



Quote:> How to write a shell script or perl script to store all the key strokes
> pressed by the user in a file.

> following doen't work

> cat < /dev/stdin >> tmp

> It only creates file tmp with of zero length

cat >> tmp
type stuff
end with ^D in first column.

This is used by some as a trivial editor for
creating short files.  You get within the current
line editing.