n00dles has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; my $setuidtoday = "/var/log/setuid.today"; my $setuidyest = "/var/log/setuid.yesterday"; my $DIFF = "/usr/bin/diff"; print "Content-type: text/html\n\n"; print "<HTML><TITLE>SET SUID FILE CHECK</TITLE>\n"; print "<BODY BGCOLOR=#000000 Text=#008000 link=#00c000\n"; print "<H1>SET SUID FILE CHECK</H1>\n"; if(-e $setuidtoday && $setuidyest) { print "<H6>Setuid lists exist!</H6>\n"; print `$DIFF $setuidtoday $setuidyest`; } print "</BODY></HTML>";
It works fine at the CLI but the output from diff is not displayed in the webpage, I can see why that is but dont know how to fix the issue... Also if anyone has any improvements please say. The reason I have not used any modules for HTML prasing etc... is because I haven't got that far in my study and i'd like to see what I can code with base perl before I branch out.print `$DIFF $setuidtoday $setuidyest`;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SUID check
by Tanktalus (Canon) on Aug 04, 2006 at 14:37 UTC | |
|
Re: SUID check
by jhourcle (Prior) on Aug 04, 2006 at 16:23 UTC | |
by Argel (Prior) on Aug 04, 2006 at 22:33 UTC | |
|
Re: SUID check
by n00dles (Novice) on Aug 04, 2006 at 23:14 UTC | |
|
Re: SUID check
by n00dles (Novice) on Aug 04, 2006 at 22:00 UTC | |
by Argel (Prior) on Aug 04, 2006 at 22:39 UTC | |
|
Re: SUID check
by Argel (Prior) on Aug 04, 2006 at 22:49 UTC |