• Favorite Desktop Environment 
    • KDE
    • Gnome
    • Fluxbox
    • XFCE
    • Enlightenment
    • I live life in the console
    • Other


Read more...   created: Apr 20, 2010

Under construction...



  created: Apr 19, 2010

Never edit /boot/grub/grub.cfg directly! You have to make changes in a special file under /etc/grub.d so that your changes will not get overwritten every time you update kernels, etc.

I am using my disk device name here. Make sure you use the one that fits your system.

  • hd0       hard drive number
  • 3           partition of FreeBSD partition (indexed from 1)
  • a           slice of /boot partition
  1. # vi /etc/grub.d/40_custom
  2. #!/bin/sh
  3. exec tail -n +3 $0
  4.  
  5. menuentry "FreeBSD 8.0-RELEASE" {
  6.     insmod ufs2
  7.     set root=(hd0,3,a)
  8.     chainloader +1
  9. }

Run update-grub2 to merge the changes in /etc/grub.d/40_custom. You should also be able to verify that the new entry will be seen next time grub2 is loaded.

  1. # update-grub2
  2. # cat /boot/grub/grub.cfg | grep FreeBSD

Reboot and give it a try!



  created: Apr 18, 2010

First, see what stray packages are on the system so you know what is about to get deleted.

  1. $ dpkg -l | grep ^rc | cut -d ' ' -f3 | less

What just happened there? We listed the packages that are installed with dpkg -l, filtered out results to only show lines starting with rc, then further trimmed the output to the third column which contains only the package names. less just allows us to easily scroll through the output in the terminal.

Now that you have verified what packages are going to be deleted and taken care of any loose ends, you should then be able to append a simple command to purge the packages in question.

  1. # dpkg -l | grep ^rc | cut -d ' ' -f3 | xargs dpkg -P

You can use sudo on the xargs command if you are a user and need priviledges.

xargs is a handy command that allows you to pipe output delimited by tab, space, etc and do an action on each value. In this case, we have a list of packages that we need to purge, so we run dpkg -P one each package name that we extract.



Read more...   created: Apr 06, 2010

I was on the hunt for an expect library for PHP and finally found one in PECL, a repository for PHP Extensions. I was surprised this was not a PHP module more easily accessible like php-session, php-mysql, etc... but it works just as well.



Read more...   created: Apr 04, 2010

Since Metasploit is so dynamic and still changing frequently with full time employees, it is best to just sync a local file tree to the latest code branch when you plan to use it. You can use the /usr/ports/security/metasploit port, but you will find it lagged far behind the latest SVN tree.

Anyways, we need to install subversion to download the Metasploit Framework.

  1. # cd /usr/ports/devel/subversion
  2. # make install clean distclean

Now make room for Metasploit and download the tree.

  1. $ mkdir ~/.msf3
  2. $ cd ~/.msf3
  3. $ svn co https://www.metasploit.com/svn/framework3/trunk framework

Finally, drag in Ruby and a few supporting modules.

  1. # cd /usr/ports/databases/rubygem-activerecord
  2. # make install clean distclean
  3. # cd /usr/ports/devel/ruby-rreadline
  4. # make install


Read more...   created: Apr 01, 2010
tomcat logo

Coming soon...