|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/abtechsci/cgi-bin/ |
Upload File : |
#!/usr/bin/perl
################################################################################
#
# PathFinder
# (v1.2)
#
# by
#
# pdfScripts.com
#
################################################################################
#
#
# Copyright 2002 All Rights Reserved
# (C) pdfScripts.com
#
#
################################################################################
#
#
# Please read Installation.htm supplied with this file, or visit the
# pdfScripts.com website for further details on this script. Installation
# information can be found at:
#
# http://www.pdfscripts.com/scripts/path_finder.htm
#
# Ensure you read and agree to the licence information which can be found from
# the website link detailed above before you install and run this script.
#
#
################################################################################
################################################################################
################################# Installation #################################
################################################################################
#
# 1. Edit the first line of this file to match your servers path to perl
# (if the above does not work, try editing to '#!/usr/local/bin/perl'.
# If this does not work, contact your host provider for the correct path).
#
# 2. Before uploading this script the variables below MUST be edited to match
# your requirements. These are:
#
# i. Report E-Mail Address
# Enter the e-mail address where the report is to be mailed.
# Do not remove the '\@' within the address (see format below)
#
# ii. Path to 'sendmail'
# If you do not know this, please contact your host provider (another
# common 'sendmail' path is '/bin/sendmail').
#
# 3. Create a directory in your cgi-bin called 'PathFinder'
#
# 4. Upload the edited pathfinder.cgi (this file!) into the PathFinder
# directory that has just been created, using ASCII MODE transfer
#
# 5. CHMOD pathfinder.cgi to 755
#
# 6. Open your browser and type in the following address:
#
# http://www.your site.com/..etc../cgi-bin/PathFinder/pathfinder.cgi
#
# Once you have selected 'Go' or hit 'Return' on your keyboard, the script
# will activate and record all the environmental information available
# from your hosts server.
#
# The information will be displayed in your browser window. In addition to
# this, a copy will be forwarded to the e-mail address you specified.
#
# 7. If the script failed to activate, no e-mail was received or your browser
# displayed an error message after trying to run the script, please check
# the following for errors/spelling:
#
# i. The correct path to Perl
# ii. The e-mail address
# iii. The correct address to the pathfinder.cgi file
# iv. That pathfinder.cgi has been CHOMD to 755
#
# If this fails to erradicate the problem, check our site for any further
# technical information that may be available, and to contact us to
# request assistance.
#
################################################################################
####################### End of installation instructions #######################
################################################################################
################################################################################
#################### Edit the following two Varaibles only #####################
################################################################################
## 1. Enter e-mail where report is to be mailed (keep the "" and \@):
$to = "netfxx\@aol.com";
## 2. Enter your servers' path to 'sendmail':
$mailprog = "/usr/sbin/sendmail";
################################################################################
############################ End of editable variables #########################
################################################################################
#------------------------------------------------------------------------------#
################################################################################
########################** DO NOT EDIT BELOW THIS LINE ** ######################
################################################################################
$sitename = $ENV{'SERVER_NAME'};
open(PATHFINDER, ">>pf.txt") || die "Error Creating Log File\n";
print "Content-type: text/html\n\n";
while (($key, $val) = each %ENV) {
print "<br>";
print $key."\n > ".$val."\n";
print PATHFINDER "$key. \n => .$val. \n";
}
close(PATHFINDER);
$lines = 0;
open(DATA, 'pf.txt') or die "Error Opening Log File";
close DATA;
$file = 'pf.txt';
open(INFO, $file);
@lines = <INFO>;
open(MAIL,"|$mailprog -t");
print MAIL "From: PathFinder\n";
print MAIL "To: $to\n";
print MAIL "Subject: PathFinder Report\n";
print MAIL "PathFinder Site Report for $sitename:-\n";
print MAIL "-----------------------------------------------------\n";
print MAIL "@lines\n\n";
print MAIL "*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*\n";
print MAIL "Report compiled using PathFinder by pdfScripts.com";
close(MAIL);
close(INFO);
open(PATHFINDER, ">pf.txt");