Sunday, October 20, 2013

Duplicate output with Tee

Quite frequently I'll run across a previously unknown gem that keeps my head from getting too big.  It doesn't matter how long you've been doing this type of work, there are things that everyone can learn.  I had a situation the other day where I needed to direct the output from a process to both a file and std out.  Now there are several ways one can accomplish this, whether with named pipes or a bit of creative redirects.  I did a bit of research and found that there is a tool just for such an occasion - tee.

Think of a T-fitting used in plumbing and you get the idea.  By piping output to tee, you can still get the output via std out but also send it to a file.  It's a standard *nix command, so check out the man page for more info.

Tuesday, August 27, 2013

How to edit multiple files automatically with vim

From time to time I may have a slew of files that I need to make bulk changes to but don't want to edit each one by hand.  A quick and easy way to do this is by using vim's -c option.  For those of you who are thinking "what about sed?" just hold on to your seat.  The sed command is also a favorite of mine, but the mood just struck me today to talk about vim.

Almost everyone who uses Unix or Linux agrees that vim (or vi for the super-hardcore folks) is the editor of choice.  Pico and nano are for sissies.  Emacs, you say?  I believe the old joke goes "Emacs is a great operating system but lacks a good editor."  I give you a +1 if you get the joke.  Kidding aside, let me get to the point of the post.

Monday, August 26, 2013

Noah must have forgotten these

Still cleaning today.  The Windows admin found these and left them on my desk.  As the WAN guy said, "you never know when you'll have to break out some 10base-T or coax!"

Friday, August 23, 2013

Unix beard?

Cleaning my desk today and found a Dilbert cartoon that a co-worker had left for me some months ago.  Probably a statement as to the ridiculous beard and handlebar mustache that I was growing at the time, but funny nonetheless.

Dilbert.com

Thursday, August 22, 2013

BuzzFeed "features" Backtrack Linux 5 in article detailing Jigsaw exploit

There is an interesting article on BuzzFeed today about spear-phishing Jigsaw via a Ruby based exploit.  While it doesn't specifically name Backtrack, all of the screenshots feature it prominently.

Image courtesy of BuzzFeed

At first glance, one might assume that Backtrack is the demon-spawn tool of the nefarious Chinese or Russian hacker, hunched over their laptop in some dimly lit, musty room.  Backtrack can be used that way, but it is actually recognized as one of the most well-known pen-testing and forensics suites out there today.  You can look at it in the same way that one would look at a hammer - you can choose to use it as a useful tool or a murder weapon.  Backtrack Linux is the same way.  If you need a tool to determine where your vulnerabilities are, then give it a try.


You can find the article here:  The Simple Tool That Allows Anyone To Be A Hacker

Backtrack Linux is available at www.backtrack-linux.org.

Wednesday, August 21, 2013

A good job is hard to find

I know we have a lot of folks looking for work here in the US, but apparently things are really bad in Bangladesh.  A co-worker forwarded a copy of a cover letter received by a friend of his back home in Bangladesh and it is nothing less than hilarious.


I suppose the take away from this is to always consult the obituaries along with job postings when looking for work.

Monitor.us - Great free off-site monitoring

Picture this - your ISP just went down, taking your web sites with it.  Not to worry!  You have monitoring in place on your network to let you know when one of your servers or sites is offline, but...

Your monitoring solution sends its notifications via the very same internet connection.

How will you ever know that your sites are down?  If you have the resources you can set up monitoring from an external source as well, but what if that's not an option?  If this scenario keeps you awake at night, then perhaps you should look into Monitor.us.  Monitor.us allows you to monitor not only HTTP and HTTPS, but other services such as FTP, SSH and MySQL.  The service is easy to setup and the free version offers many options.  Here is the dialog that you get when creating a new monitor:


Several options are available and the interface is very easy to understand.  In addition to external monitoring,  you can also install agents on hosts to report back to Monitor.us on various system attributes.   I haven't tried this option, but I am sure that there are those who might find this useful.

Monitoring intervals for the free version are 30 minutes, but more frequent checks as well as increased monitoring sources are available for a charge.  With the free version you also get a weekly email report giving you a summary of uptime and SLA's.

I use Monitor.us in conjunction with Opsview so that if my ISP circuit goes down I still have a failsafe.  Between the two, it makes a pretty complete monitoring setup.