All these programs are written for Perl >= 5.6.0 or Python 2.2+.
Generate random passwords. Supports several options: only alphanumerics, only base64, length, how many passwords ('count'), whether case matters, and also has a 'help' option.
perl rand-pw.pl --alpha --base64 --length=20 --count=10 --insensitive
Designed to convert an mbox file for the "example" listserv into Marklar.
perl marklar.pl example.mbox > marklar.mbox
While not really software per se, this tarball gives you all the magic you need to have one directory structure per RPM (or set of RPMs) you want to build in user-space. Rather than twiddling ~/.rpmmacros each time when you want a different build area (or only having one build root), the makefile included will help you build one set of RPMs at a time.
tar xzf rpm-proto-dirs.tgz
cd rpm-proto-dirs
cp my-spec-file SPECS/
make
This code creates a class called 'WFULDAP' that gives you some more useful functions like 'search_by_unique_name'. If run rather than imported, it will take a list of names (e.g. 'John Borwick'), one per line, and return the userids for those names.
echo 'John Borwick' | python name_lookup.py
This code pretends to be Net::LDAP... just well enough to get you through most debugging.
mkdir -p lib/Net
export PERL5LIB=lib
wget -O lib/Net/LDAP.pm http://www.wfu.edu/~borwicjh/software/LDAP.pm
perl my-ldap-program
This Python program was a learning experience, and can answer the question
Given that the age of a set of people sums to a constant, their ages are all prime, and you know the age of one person in the set, what are the ages of the other people in the set?
You can probably tell that this is a Mike Rollins question.
python student-ages.py
Give this program a port number as a command-line argument. It will say "Got a connection!" each time someone connects to that port. This program can be useful to test/verify network ACLs. Hit ctrl+c to exit.
perl listen-on-port.pl 443
Some LDAP tools can't deal with "phantom superclasses" (my term). They require that the objectclass "top" exist to add an auxiliary class, and need "person" to exist for "inetOrgPerson" to have all its attributes. After editing this script's globals, you can run it (and give it your manager password) to add the appropriate superclasses.
perl add-superclasses.pl dc=example,dc=com
A script I wrote to convert our iPlanet ldif files to a version
compatible with OpenLDAP's
ldapadd. You Will Need To Modify This Code.
perl iplanet-to-openldap.pl in.ldif > out.ldif
ldapadd -D administrator-dn -x -W -f out.ldif
# watch for errors
Using Date::Calc, this program checks a passed string to see whether it might be a date. This code is mainly an example.
Reads from a GPG-encrypted file, prints out its contents one per line, and allows you to edit or delete from a buffer representing the file. This file is re-written, encrypted, after a backup is made. You don't have to issue the GPG commands yourself, and as long as your memory/swap? is secure, the program doesn't ever *write* data in plaintext.
# to initialize
echo '' | gpg -e -r YOUR_GPG_ID -o keychain.gpg
# edit keychain.pl's '$ID' and '$GPG_PATH' variables
keychain.pl keychain.gpg
Given a directory, log-analysis.pl will recurse through
all files and directories, looking for "message"-type logs. All
the "bad" messages are reported, "good" messages are thrown out,
and the rest is printed out in its own category. Use like
log-analysis.pl /var/log
Please see the pod2html documentation.
A program that looks at an RPM list from one machine to figure out what additional packages an inserted, mounted CD offers that should be installed. Used if you want the host machine to have all the packages from another machine.
Find all the files on your computer that aren't bundled in an RPM
package of some kind. Supports --dir as an array, for a
list of arrays to search, and --link for if you would
like to see symbolic links.
non-rpm.pl --dir /usr/local
Need an eight-character password? Don't mind writing it down somewhere?
Then use this program. I just added a
--length option, good for Internet-based credit card
statements.
rand-pw.pl --length 40
fmn]S?G]6EG!RB4e8KyQu&P!S/c]PI5oz:cZu%)X
Generates MD5 passwords, useful for pasting into MD5-aware /etc/shadow files.