#! /usr//bin/perl -w #---------------------------------------------------------------- # Author: c4 # Date: 12.08.2008 # File: echo.cgi # Description: Unknown Shell Echo eRRoR. # #---------------------------------------------------------------- # Bind Modules #---------------------------------------------------------------- use strict; use CGI; use Shell qw(echo); # MyVars #---------------------------------------------------------------- my $userPasswdFile = "/tmp/passwd"; #Hier soll das PW rein # Code #---------------------------------------------------------------- print "Content-Type: Text/html\n\n"; print "\n"; print " Test: Perlscript using Shell echo \n"; print "\n"; print "

Test: Perlscript using Shell echo

\n"; print "
\n"; print "
Diese Seite wurde durch ein Perlprogramm generiert.
\n"; print "
\n"; print "\n"; &writePasswordToFile(); # Subs #---------------------------------------------------------------- sub writePasswordToFile { my $line = ""; my $datei = "/tmp/testfile"; #Hier kommt das PW her if ( -e $datei ) { open(my $FILE,'<',$datei); $line = <$FILE>; close $FILE; } print "
Wert der Var. line: '$line'
\n"; print "
Wert der Var userPasswdFile: '$userPasswdFile'
\n"; echo "$line >> $userPasswdFile"; #<- pLZ fiX me! } # echo.cgi>