Dan Harkless' Old Software

This page contains software that was retired from my main Software page, but might feasibly still have some measurable value to someone.

DNS

mail_all_our_NSI_DNS_customers    Useful if you're an ISP and you want to send email to all your DNS customers who're registered through Network Solutions. For instance, to inform them of the huge security risk of that company's default "MAIL-FROM" security policy.

whois_nameserver_users    Given a domain name registered through Network Solutions, checks what nameservers serve that domain, and then for each of those nameservers, finds up to 50 other domains also served by it. For each domain, also does an nslookup -querytype=MX domain and a traceroute www.domain. Can output results to browser or send them via email, in HTML or plain text format. Apparently Network Solutions turned off the functionality this script depended on in May 2002.

Emacs

e    A wrapper around gnuclient that works even when you're logged into remote machines that don't have gnuclient installed or when editing files on those machines that aren't NFS-mounted onto your emacs host.

Email: Anti-spam

authorize_email    This script, along with request_re-send, implements a "caller-ID"-like policy for a spam-tainted email account. When someone emails you with the magic word "re-send" in the Subject, this script is called from your MH/nmh .maildelivery file (assuming your .forward file is set up to pass your mail to slocal_wrapper, which passes it to MH/nmh's slocal) to add the sender to a list of people allowed to email you directly. Requires email_address.

monthly_alias    Adds an alias of the form account_mmmyy (e.g. dan_aug97) to the bottom of the /etc/aliases file. Useful when posting to Usenet expecting replies. People can email you without having to go through any anti-spam contortions, yet you can shut off the address at the end of the month or once you've gotten all the replies you need.

monthly_mh_profile_and_sig    A companion to monthly_alias -- updates the account_mmmyy email address in your signature file (based on a sed template) and on the Alternate-Mailboxes line of your .mh_profile.

request_re-send    This script, along with authorize_email, implements a "caller-ID"-like policy for a spam-tainted email account. When someone you don't know emails you, this script will be called from your MH/nmh .maildelivery file to bounce their mail back to them with a Subject of "You need to re-send your message!" The bounced mail will contain a request to forward the mail back to you. If they do this, the mail will contain the magic word "re-send" and authorize_email will be called. The beauty is that spammers almost never check their incoming email, so they won't re-send their spam and you'll never see it! [Note that in today's world of most spam being sent from spoofed addresses, this approach can result in "backscatter" / "blowback", thus the retirement to my "Old Software" page. I have a mostly implemented replacement that informs the (real) sender via passive SMTP return codes rather than separate bounce emails, but need to get time to finish it.]

General commandline utilities

changein    Calls sed to change a regexp to a replacement string in-place in one or more files. Only useful where you don't have Perl, as perl -e 's/pattern/replacement/g' -i -p files (or -i.orig to save a backup) is a more elegant solution.

rlogin    A wrapper around the rlogin executable that automatically xhosts your destination machine, makes sure $DISPLAY is set up properly once you're there, and de-xhosts it when you log back out (like a cryptographically-challenged version of ssh's X11 forwarding). You must have a special line in your .login for full functionality.

rsh_status    rsh/remsh is not as useful as one would like in a script, since the status returned is not the status from the remote command, but from rsh itself. rsh_status behaves like rsh but returns the exit status from the command on the other end.

text.c    Rather than using grep pattern *, use grep pattern `text *` and grep will only look for pattern in text files, preventing the output of garbage characters, bells, and terminal freezes due to grepping in binary files. (Proper modern greps like GNU grep don't suffer from this problem.)

System administrator utilities

rh_advisory_update    Takes a Red Hat Security Advisory or Bug Fix Advisory email (as delivered to redhat-watch-list and Bugtraq) on stdin and automatically downloads, verifies, and installs the RPMs specified therein. Needs some updating to reflect Red Hat's current email format.

softlink_mvprog    I currently install software I've compiled from source using GNU Stow, but in the past I used to do something similar manually. If I extracted a package tarball into /usr/local/package, I'd do configure --prefix=/usr/local/package. This scheme wasn't workable with a few packages, including gcc, though, without using this script in place of the system mv command.

wrap_setid_progs_with_envar_clearer    Interactively finds all system set[gu]id programs on the machine and wraps them with programs that clear one or more environment variables of your choice then execute the real program. This was written in response to the custom $NLSPATH and message files + format string root exploit.

Timestamps

timecopy.c    Copies the access and modification timestamps from a source file to one or more destination files.

timeset.c    Sets the modification time of one or more files to the given integer (interpreted as seconds past the epoch).

timestamp.c    Prints out the modification time of one or more files in seconds past the epoch. If no files are specified, gives the current time in that format.

timestamp++.c    Increments the modification time on one or more files by 1 second. Can be useful for "uncaching" a file when you want to make a small change to it but don't want to lose the last (meaningful) modification date.

Up
Dan Harkless
Page created: October 9, 2003
Validated HTML 5 + CSS
Last modified: June 26, 2025