ProgramsSomeone (I'm gonna attribute it to JWZ, but I'm probably wrong) said that software isn't released, it escapes. In my case, I can't attribute the low number of items here to any superlative security on my part -- to be brutally honest, the vast majority of my software is just too plain dumb to escape. |
| 20020523(Programs):watchdog |
Watchdog was written to monitor large rsync processes. For some reaon, rsync will periodically
hang when transfering large files -- and occasionally will hang at the end of a transfer. This
script watches the target and checks to make sure that it is accumulating cpu time. If the program
does not accumulate cpu time, it assumes that the program has hung, kills it, and re-runs the
program up to some maximum number of attempts.
Be aware that this script was only developed on Solaris -- YMMV.
And depending on what you are watchdogging,
you may also wish to use something like sdps, below, to clean up dangling processes on the remote side.
Here is the code, and a pretty html-version is attached below.
Read More |
| 20020523(Programs):sdps |
This is an accessory for the watchdog script. When the watchdog runs around killing rsync processes that
it believes are hung, it has the unfortunate side effect of leaving a hanging server process on the
remote side. Since I always knew which machines I was syncing from/to, it was a trivial matter to add
this script to the root crontab.
Be warned, though: THIS SCRIPT IS MIND-BOGGLINGLY DANGEROUS because it does a simple name match
on the target process to kill. If you tell it to kill 'sh', it will kill anything with 'sh' in a
ps viewable name. Including 'csh', 'shmop', you name it. The second safest way to run this script is
to run it with -DEBUG and without -SAFETY-OFF for a couple of weeks and then study the output to make
sure it isn't going to accidentally kill the wrong thing.
Also, this script is only being run by me on a Solaris system. YMMV.
Here is a link to the code, and a pretty html version is attached below.
Read More |
| 20010718(Programs):Perltidy |
In my job, I encounter lots of perl scripts which were written by
people who came (and went) before me. Several of them have several
different ideas about the layout of their code -- most notably, the
infamous '{' location problem. So I've been looking for a tool which
I could use to format code into a way that I liked.
I didn't write it, but it's mega-keen: it's
perltidy,
a perl code formatter which does for perl what indent does for
C code. So far I have not hit anything that it mangles into an error
condition. I'm currently using the 2 July 2001 release, and it's
super. It's hosted at Sourceforge.
|
| 20010718(Programs):Perltidy |
In my job, I encounter lots of perl scripts which were written by
people who came (and went) before me. Several of them have several
different ideas about the layout of their code -- most notably, the
infamous '{' location problem. So I've been looking for a tool which
I could use to format code into a way that I liked.
I didn't write it, but it's mega-keen: it's
perltidy,
a perl code formatter which does for perl what indent does for
C code. So far I have not hit anything that it mangles into an error
condition. I'm currently using the 2 July 2001 release, and it's
super. It's hosted at Sourceforge.
|
| 20010116(Programs):'quote' -- command line stock quotes |
A perl script which fetches symbol quotes from the NYSE and NASDAQ using finance.yahoo.com.
This script requires wget.
Update, April 2001:The long awaited decimalization of the NYSE and NASDAQ
has happend, forcing some changes to be made to this script.
If the html code attached fails to please you, the
raw perl code may be more to your liking.
Read More |
| 20010116(Programs):'quote' -- command line stock quotes |
A perl script which fetches symbol quotes from the NYSE and NASDAQ using finance.yahoo.com.
This script requires wget.
Update, April 2001:The long awaited decimalization of the NYSE and NASDAQ
has happend, forcing some changes to be made to this script.
If the html code attached fails to please you, the
raw perl code may be more to your liking.
Read More |
| 20000523(Programs):Sample polymorph run |
Here's an example of what the polymorph program looks after it's been run on itself once.
Read More |
| 20000523(Programs):Sample polymorph run |
Here's an example of what the polymorph program looks after it's been run on itself once.
Read More |
| 20000523(Programs):'polymorph' -- a self-rewriting perl script |
Basically I got to thinking about virus code that modifies itself and wrote a script
which rewrites itself in such a way that would defeat most signature checkers.
Later I discovered that I was not the first to do this trick with perl, nor was
this the best example of the genre. Oh well. Still, I think that working it out
for myself counts for something. Hey, if the community can proudly have fifty four
different PPP monitors, why not another self-altering perl script?
The actual header of the script explains the why and the how much better than I
do here.
Update, February 2001: as seen in the 17:4 issue of 2600.
They didn't mangle it too badly, but there have been a few subtle improvements since the
version that they published.
If the attached html code is not to your liking, you might prefer
the raw perl code.
Read More:The details. |
| 20000523(Programs):'polymorph' -- a self-rewriting perl script |
Basically I got to thinking about virus code that modifies itself and wrote a script
which rewrites itself in such a way that would defeat most signature checkers.
Later I discovered that I was not the first to do this trick with perl, nor was
this the best example of the genre. Oh well. Still, I think that working it out
for myself counts for something. Hey, if the community can proudly have fifty four
different PPP monitors, why not another self-altering perl script?
The actual header of the script explains the why and the how much better than I
do here.
Update, February 2001: as seen in the 17:4 issue of 2600.
They didn't mangle it too badly, but there have been a few subtle improvements since the
version that they published.
If the attached html code is not to your liking, you might prefer
the raw perl code.
Read More:The details. |
| 20000515(Programs):Software Licenses |
Generally, software which I make available here has been wholey written by
me. This software is made available either under the Don't Worry, Be Happy, Now Go Away
license, or the GPL. Each piece of software will specify the license it
is made available under.
Read More |
| 20000515(Programs):Software Licenses |
Generally, software which I make available here has been wholey written by
me. This software is made available either under the Don't Worry, Be Happy, Now Go Away
license, or the GPL. Each piece of software will specify the license it
is made available under.
Read More |