Automate DVD Ripping for Mac

I like to rip my DVD’s and put them in iTunes to sync with my phone or iPad. I’m sure I’m not alone and over time I’ve slowly added movies here and there as needed. You know the process rip the dvd, encode, add to iTunes, add the images, blah, blah. Its a long process if you do it right. So while searching for a better way to rip some of my TV show DVDs, I came across the best tutorial I’ve ever seen. Its all wrapped up in automater and I can’t save thank enough for how much time I think this will save me in the future. So if you been looking like I have check out: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Tagging) for Mac OS X 10.6

Status Messages in screen

In the February 2011 issue of Linux Journal Kyle Rankin wrote an article called Status Messages in Screen. I’ve been using screen for years but never thought much about what it could do beside keep my shell open on a remote server. Well this article opened my eyes. I quickly dug in and start working on my .screenrc on my macbook. I was able to write a couple of applescripts to pull inbox counts from entourage and Cool stuff i look forward to seeing what other useful info I can get in there since i do like to work at the cli a lot. Thanks Kyle.

Checking the snort process from nagios

I’m checking the snort basically like i’m checking most processes, if you’ve been following allong then you’ll already have a check_procs setup.

So I simply edit my localhost.cfg and add:
define service{
use generic-service
host_name localhost
service_description Snort
check_command check_snort_procs!1:1!snort

Edit the commands.cfg and add:
define command{
command_name check_snort_procs
command_line $USER1$/check_procs -c $ARG1$ -C $ARG2$

reload nagios and thats it.

My BASE (for Snort) Install Notes for OSX

To get base up and going with snort already installed I did the following.
1. Downlaod ADOdb (database abstraction library for PHP) :
The version I got was adodb510.tgz

2. Unzip and untar the file
tar -xvzf adodb510.tgz

3. Move the folder
I did:
cp -R adodb5/ /Library/WebServer/Documents/adodb5/

4. Download base: The version I got was: base-1.4.4.tar.gz

5. Unzip and tar the file
tar -xvzf base-1.4.4.tar.gz

6. You should now have a folder: base-1.4.4/
cd base-1.4.4/

7. Copy the base folder to your webserver folder
cp base-1.4.4/ /Library/WebServer/Documents/base/
change the owner on the folder
sudo chown -R _www:_www /Library/WebServer/Documents/base/
With this version there was a known problem with the file: on some setups, mine included.
So I had to download the fixed version from CVS
You can also download it from the website, follow the link from here:
it goes in your /base/templates/

8. Now install the needed pear extensions for graphs to work in base
On my system it was as follows:
First I had to update pear to the rest of the packages would work:
sudo /usr/local/php5/bin/pear install PEAR-1.9.0

Then the following packages:
sudo /usr/local/php5/bin/pear install Image_Color
sudo /usr/local/php5/bin/pear install Image_Canvas-0.3.2
sudo /usr/local/php5/bin/pear install Image_Graph-0.7.2

9. Open up base in your browser:
You should get the page up with the settings, if you have any errors you need to fix them first with their suggestions.
Once you answer all the setup questions you should have a working base install.

My Snort on OSX Install Notes

1 Download Snort2 Download pcre
3 Untar pcre
4 Cd to pcre
5 ./configure
make install
(NOTE: Install prefix ……………… : /usr/local)
6 Untar Snort
7 CD to snort
8 ./configure -enable-dynamicplugin –with-mysql –with-mysql-includes=/opt/local/include/mysql5/ –with-mysql-libraries=/opt/local/lib/mysql5/mysql/
9 make
10 sudo make install
/usr/bin/install -c -m 644 ‘./snort.8’ ‘/usr/local/man/man8/snort.8’
test -z “/usr/local/lib/pkgconfig” || /bin/sh ./mkinstalldirs “/usr/local/lib/pkgconfig”
/usr/bin/install -c -m 644 ‘snort.pc’ ‘/usr/local/lib/pkgconfig/snort.pc’

11. Get the rules from the snort site and untar them
I used snorttemp as the folder
12. Make a folder for the rules
mkdir /opt/local/etc/snort/
mkdir /opt/local/etc/snort/rules/
13. Copy the rules over
cd ~/snorttemp/rules/
cp * /opt/local/etc/snort/rules/
I also copied over the etc folder
cd ~/snorttemp/etc/
cp * /opt/local/etc/snort/
14. Edit the Snort configuration
vi /opt/local/etc/snort/snort.cfg
change “var HOME_NET any” to “var HOME_NET” or whatever your home network is
change “var EXTERNAL_NET any” to “var EXTERNAL_NET !$HOME_NET” This is everything except your home network
change “var RULE_PATH ../rules” to “var RULE_PATH /opt/local/etc/snort/rules”
goto the line that starts with “# output database: log, mysql, user=” and remove the # from the begining of the line
enter your user password and db name
15. mysql setup
log in to mysql as root
mysql -u root -p

create a snort database
mysql> create database snort;

create a user and password to match your mysql setup in the snort config:
mysql> CREATE USER ‘snort’@’localhost’ IDENTIFIED BY ‘somepassword’;

give that user access to the database
mysql> GRANT ALL PRIVILEGES ON snort.* TO ‘snort’@’localhost’;
mysql> exit

Import the snort schema into the database.
mysql -D snort -u root -p < /schemas/create_mysql

16. Start it up
snort -c /opt/local/etc/snort/snort.conf

If it works it should look something like:
–== Initialization Complete ==–

,,_ -*> Snort! <*-
o” )~ Version (Build 114)
”” By Martin Roesch & The Snort Team:

You can use ctrl+c to stop it.