|
|
|
|
|
|
![]() |
#1 |
Asleep at the switch? I wasn't asleep, I was drunk
Join Date: Nov 2005
Location: London UK in a house share with three 28 yr old girls...perv perv
Posts: 215
|
Something that may be of use to you guys
With many perl and other scripts it is necessary to know the FULL system path to your programs. Often Aliased paths do not work for calls in perl like Exec and System. One of my clients got an account with a host whose tech support was CRAP and after a week they still hadnt mailed me with the system path so I got annoyed and found out how to
write a perl script that searched their entire server from the root directory down for my executable files. As a utility its useful to people who dont code themselves but just install/ mod others scripts so I have tarted it up slightly and present it here. When I get time I will host it on my webmasters resource page at http://kwikfire.com .... Please note that on a huge distributed server network it might take a good few minutes to run ![]() ==========Cut below here ======================= #!/usr/bin/perl use CGI::Carp qw(fatalsToBrowser); ############################################ $myfile="sa231er45.pl"; ############################################################## #Simply change shebang line to suit your server if needed....# # then change $myfile to be the *unique* filename of a file in # # your script directory - make one named with random text # # run this script by typing in its url in your browser...wait# ############################################################## print "Content-type: text/html\n\n"; print "Pathfinder by Mattinblack.... Searching for $myfile<p>"; print "Please wait this may take a few minutes!<br>"; require "find.pl" or die "No find.pl on this system"; &find('/'); print"<P>Above are either fully qualified paths or nothing!....DONE"; exit; sub wanted { /^$myfile$/ && print("$name\n<P>"); } ===============Cut above here================== Dont send me mails asking why the sub wanted is never called.... or where $name is defined or.... just read the documentation about the find utility....lol Course if your server does not have find installed you are stuffed but it has been part of the standard perl distribution for Ages now.
__________________
Mattinblack - <a href="http://pornlinks.kwikfire.com">PornLinks</a> - <a href="http://strange-attractor.kwikfire.com">Strange Attractor</a> - <a href="pnav.kwikfire.com">PORNavigator</a> - <a href="http://ukescort.kwikfire.com/">Fem Escorts</a> - <a href="http://kwikfire.com/">Hosting</a> |
![]() |
![]() |
![]() |
|
|