so why script cgi's in sh or bash, why do shell scripting at all? well cuz it's fun is the "why" and you get to maintain full control even if you aren't skilled in perl or C or C++. Of the shell ones, nearly all need proccgi
i do want one thing, if you use any of these scripts, i want a small link back to me somewhere, along the lines of "webbadbot banner by wlofie" where wlofie is a hotlink for this page, thanks( hey you can always stick it in on your links page or something)
here is an example of how i work, it's like a diary that i kept to see the progress of the code
The scripts and html page above constitute "domchk"
domchk has these "dependencies":
example asp fake demo
in that form i mention security...it's not really as bad as all that, but...
it DOES allow someone with bad intent and some html cgi knowhow to make a script or a page that uses up server resources, by for instance using that cgi to forward from their own site
dependencies: linux shell (bash) and commands like mv, rm, echo, grep, sed and touch
-----
crawltrap_pl.zip an ugly perl script to do exactly (even down to logging) the same as the shellscript cgi above. it has been tested on linux and windows98 with active perl, but is written so it should handle windows as well, it's not overly well documented, but it should be easy enough to use
it doesn't have any dependencies outside of perl5, if you got perl, it'll most likely work, it doesn't even use cgi.pm
if you use one of the two above "auto ipban" scripts for xitami i'd appreciate a small link back to me
"this site protected by wlofie's ipban bad bots script" it doesn't have to be on the front page, just somewhere not too obscure
thanks
This is a subroutine to zeropad and correct the date that perl gives. It gives "human readable" numbers all corrected and done, use it at ya own risk
Date_pl.txt It was originally written to be part of my rewrite of "diary" into perl, but has now become part of my perl "lego piece" collection
originally this was a "lego" piece for my diary, then i changed it a bit and now it basically takes 3 switches
htmlmaker2.pl infile templatefile outputfile
htmlmaker2.pl is the command name
infile is a text file (contains the text you want to put into the page)
templatefile is a html file containing the template for the page you want done as well as the special tag ENTRY (it is in there)
and
outputfile is the html file it writes the finished product to
as usual, no warranty or guarantees
it is NOT the one with an example above, this is a perl snippet only
but..it only counts one page (this version at least)
just chmod the script to 755 the dat file to 666 alt 660 alt 600 and the html file to the same
here is an example of it in action
features i'll add when i feel up to it
counterip.zip is the download
example of it in action
these are the ones i made for a friend, both sh and perl versions (couple of em actually)
perhaps this "diary v0.001 alpha" tells a bit about how confident i am in it as yet
ie "wlofie.dyndns" .com .org .net .gov .se .uk .whatevertld
it tries to do a 2 sweep look up on whois servers, ie, it looks up the short record, then tries to filter out the referance to the 'real looking up place' and use that for the second sweep
jadmaker and genscript v1.1
A pair of scripts (bash/sh):
jadmaker...extracts /META-INF/MANIFEST.MF files from jar files. After extraction it checks if it contains size and url "fields" and if they don't exist it creates them and puts them in the jad file too (it also dos2unixes the output so you don't have to).
genscript...uses jad files to make a wml file list for downloads (cards and all).
dependencies:
unzip
(and the usual sed grep cut)
New!
genscript v0.1
Does what the above genscript does, only better and in perl:
This one numbers the index files sequentially and has adjustable "cards per index file" output
needs existing jad files, so jadmaker in the above jad_wmlgen is recommended