CLIX Scripts


This is the documentation for the scripts packaged with CLIX.

asciitable

asciitable is a script which demonstrates the use of the command line tool printf - which in turn is a one-on-one interface with the C runtime function of the same name.

The syntax of printf is complex but sophisticated; the command can be used for all sorts of formatted output. asciitable is a single line (single call to printf) - study it along with the manual page for printf to better understand how this command can be used.

leakd

leakd is a simple script. It doesn't change anything on disk - it just looks for possible 'leaks', ie places where your security may have been compromised.

leakd does nine searches on your system for file systems in the kernel and in the system, empty directories and files, SGID, SUID and SUID root files, world-writable files, and who is running (looking both in utmp and wtmp).

The script must be run as root to be effective (use sudo). Where you place it on your drive is up to you, but access it in CLIX with a tilde path once you've put it there.

Especially interesting are the empty directories and files scans, but don't go jumping to conclusions just because the output is lugubrious (which it is). Most of what you see is supposed to be there, and Unix won't pick up on resource forks, and so a lot of the output is about files that aren't really empty anyway.

SGID and SUID files are dangerous, but again don't jump to conclusions: most of what you see is supposed to be marked with a 'set ID'; it's the few that sometimes creep in that are not supposed to be there that are crucial. All in all the Apple setup is fairly secure.

You should get absolutely zip back on the world-writable file scan. If you don't - something may be very wrong.

Again, if anyone you're not aware of is logged in...

tree

tree is a cute little script that prints out your directory contents as a 'tree'. Try it! Give it one command line argument - the path to the directory you want it to paint a tree of. It only prints out subdirectories but it is recursive - so watch out!

% ./tree ..
   |-CLIX.app
   |---Contents
   |-----MacOS
   |-----Resources
   |-------CLIX.nib
   |-------CLIXdata.nib
   |-------CLIXfind.nib
   |-------CLIXmenu.nib
   |-------CLIXsudo.nib
   |-etc

CLIX
http://rixstep.com/clix

Copyright © Rixstep. All rights reserved.