Log Viewer Script Perl CGI
Search Engine Optimization Techniques
|
Search Engine Optimization for dynamic pages
|
Free Perl CGI scripts
|
Online Test Engine
#!/usr/bin/perl ##################################################### # Script by M.P.Prakash R.Lewis@bestnetcraft.com # # http://www.bestnetcraft.com # # Inclusion of this copyright message is mandatory # # for using this script. # # # # # This script is offered in the same terms as Perl. # # Comments and suggestions may be sent through # # http://www.bestnetcraft.com/contact.html # # No liability or damage will be accepted by the # # author under any circumstances. # ##################################################### # Reads the Guide log and displays the content # # Configuration my $diro= 'user/'; # User directory my $log= $diro.'guide.log'; my $pasf='password'; # change this password in the production server # parse the form read(STDIN,$temp,$ENV{'CONTENT_LENGTH'}); @pairs=split(/&/,$temp); foreach $item(@pairs) { ($key,$content)=split(/=/,$item,2); $content=~tr/+/ /; $content=~s/%(..)/pack("c",hex($1))/ge; $content =~ s///g; $fields{$key}=$content; $i++; $item{$i}=$key; $response{$i}=$content; } # Display the start page asking for authentication &start unless ($fields{'auth'}); &nyet('Illegal User') unless ($fields{'auth'} eq $ENV{'SERVER_ADDR'}); &authenticate; sub authenticate { my $pass=$fields{'user_p'}; my $name=$fields{'nama'};# A little more security through obscurity &nyet('Identification Required!') unless ($name); &nyet('Authentication Required!') unless ($pass); if ($pass eq $pasf) { &reportage; } else {&nyet('Wrong User!');} } sub start { print "Content-type: text/html\n\n"; print <
Bestnetcraft - User Tracking Report
Bestnetcraft
User Tracking Report
Name:
Password:
©2000-2002. All rights reserved !