Codebox Software

Script Gallery

This is a selection of Windows batch files, and UNIX shell scripts - nothing ground-breaking here, but they have all served me well at one time or another. Writing this kind of thing, especially in the Windows world, is becoming a bit of a lost art and there really is a lot you can do with them.

Run any command as the System userWindows Logo

Devious use of the Windows scheduler can grant you System privileges. more...

Backup and encrypt important files, then FTP them to another machineLinux Logo

Use this script to make regular system backups, and store them off site in a secure encrypted archive. more...

Automate FTP Transfers Windows Logo

This batch file will automatically connect to an FTP server and download a file of your choice more...

Auto-Register/Unregister COM components Windows Logo

This batch file will run regsrv32.exe against all .ocx and .dll files in a given directory, and can be used to register/unregister COM components en-masse more...

List shares on a Windows host using a null session Windows Logo

This script establishes a null session with a Windows host, before running the standard net view command to list out the available shares. This technique will sometimes yield information that would be normally be denied without authentication. more...

Locate classes within a JAR file Windows Logo Linux Logo

Searches through all Java .jar files in the current directory, and in any sub-directories, looking for the class file that you specify. This can be very handy if you need to use a class in a Java programme, but aren't sure which .jar file contains it. more...

Reboot firewall/server when internet connection is dropped Linux Logo

This script attempts to ping a list of well-known internet hosts, and if it fails to contact any of them will reboot the system. I have used this with great success on my IPCop firewall, which occasionally drops its internet connection and will reconnect if rebooted. Schedule this using cron to perform a connectivity check every 15 minutes. more...