April 24, 2007 in Snippets 1 min read encrypt #!/usr/bin/perl # Shows your encrypted password print "Enter your password: "; chomp($password = ); $salt = sprintf("%02x",($$^time^rand)&0xFF); print "Your encrypted password is: ".crypt($password,$salt)."\n";
April 24, 2007 in Snippets 1 min read xsu #!/bin/sh # Program to run X-programs as root # (when you get the "**WARNING** cannot open display" message) su - -c "exec env DISPLAY='$DISPLAY' XAUTHORITY='${XAUTHORITY-$HOME/.Xauthority}' "'"$SHELL"'" -c '$*'"