about img
blogger img

Corys posts image

buchos posts img

UnderPaidLoveMonkis posts img

scotts posts image

Scott's Archive

Software Security Can Threaten Physical Security Systems

Scott Rippee @ 10:43 pm Thursday, September 27th, 2007

Software security is and will become much more important in the security industry especially as security systems begin spanning public networks. Cisco seems to be taking a proactive approach to identifying and notifying customers about software security vulnerabilities. From Security Dreamer:

Cisco uses the error reporting policy to improve its products and boost its reputation. Cisco looks for problems in its products, encourages users to report new problems through a public forum, promptly notifies customers, then fixes the problem. Now that’s a company with the welfare of its customers and its brand in mind

This provides insight into a different area of customer service than the traditional.

Don’t mess with the U S B

Scott Rippee @ 12:08 am Wednesday, September 19th, 2007

maxima-stereo-out-261.jpgI learned an important lesson this weekend while equipping the mobile transportation unit with a hook up for the iPod. Don’t cut a USB cable and plan to reconnect the wires. They are very small and a good portion of life could be spent on this task. Amazingly enough everything worked after the procedure. A wire stripper that works with small wires would have been nice though. Thanks Angad and Maks for the useful car / stereo links.

A Fence for Concern

Scott Rippee @ 10:33 am Saturday, September 8th, 2007

slippery_fence.jpg

I found this on Security Dreamer with many comments on Schneier on Security

Beware of the lube!

Fresno Dome / Central Camp Adventures

Scott Rippee @ 11:32 pm Tuesday, September 4th, 2007

I made it up to the mountains with some friends last weekend. We stayed at my grandfather’s cabin in Central Camp (a couple thousand feet above Bass Lake) and got some rock climbing in at Fresno Dome.

View of Bass Lake from side of the road

dsc_0179.jpg

dsc_0199.jpg

Driving from Central Camp to Fresno Dome

dsc_0015.jpg

My friend let me cruse around on his beautiful quad. I naturally found the largest puddle I could and blasted through it.

dsc_0038.jpg

dsc_0039.jpg

The hike to the rock

dsc_0060.jpg

dsc_0074.jpg

Base of our route

dsc_0085.jpg

dsc_0103.jpg

Top of the first of four pitches

dsc_0099.jpg

dsc_0119.jpg

dsc_0164.jpg

We didn’t make it to the top. Short on daylight and out of practice. We had to descend to the bottom and hike back out the way we came. Making it to the top has the added bonus of getting an easier hike back.

Jeremy descends to set up a lower rappelling station

dsc_0139.jpg

Overall very relaxing and a wonderful break.

Google Test Automation Conference 2007 Videos

Scott Rippee @ 9:46 pm Tuesday, August 28th, 2007

Holy Cow! 27 Videos from the Google test automation conference 2007 with so much important information that my head is spinning (and I only watched a small portion =). Automation, testing strategies, mocking, continuous integration, UI automation, complex distributed system, and many different levels and types of testing explained. These really drive the importance of quality automated testing in many different forms that really push software and systems from many different angles.

The keynote gives a good overview of overall stratagies and the importance of processes like quick build / test turnarounds and developer testing.

OS X Default App for File Types

Scott Rippee @ 4:14 pm Saturday, August 25th, 2007

I found this nice little app, RCDefaultApp that makes it convent to control which applications start for events and file extensions.

allows a user to set the default application used for various URL schemes, file extensions, file types, MIME types, and Uniform Type Identifiers

Finally, someone said it

Scott Rippee @ 8:27 pm Monday, August 20th, 2007

and it is taw in reference to his new Mac

There’s no good music player. iTunes is a stinky pile of donkey shit compared to the most awesome Amarok.

Coffee intake enhanced

Scott Rippee @ 1:21 am Saturday, August 4th, 2007

Nothing like the afternoon beer bong of coffee. Their only shortcoming, not enough coffee per beerbonging. Plus I’d like to see maybe a coffee rockstar mixture happen…….. yeah

Opensolaris on OS X

Scott Rippee @ 11:17 pm Sunday, July 22nd, 2007

Due to influence from the love moneky I got up and running with Opensolaris on OS X (in parallels) this weekend. I was originally going to install it with VMServer on Gentoo, but realized that it would be much more accessible on my primary unit de computation.

opensolarisinstall.jpgI simply downloaded the 3 Opensolaris files (Nevada release), used cat to concatenate them into a single file, selected Solaris 10 in parallels, selected the image, and it installed without any hang-ups. Ahh yes, and I had to go back and change the memory allocated as it has a 768mb minimum requirement.

My motivation, hack around with zfs (screencasts) and the much talked about DTrace (Video: interview with developers).

Here are some videos with Sun talking about Solaris, zfs, dtrace, and OpenSource: video 1, video 2. I completely agree with the part about the roll of “urban planning” in complex software systems. This seems to hold true for Apple also and is evident in the high quality and user centric software/systems they produce.

DTrace will also be available on OS X Leopard and with a fancy GUI, Xray.

iPhone 1st published hack

Scott Rippee @ 9:54 pm Sunday, July 22nd, 2007

eyes1.png

A team of computer security consultants say they have found a flaw in Apple’s wildly popular iPhone that allows them to take control of the device.

The researchers, working for Independent Security Evaluators, a company that tests its clients’ computer security by hacking it, said that they could take control of iPhones through a WiFi connection or by tricking users into going to a Web site that contains malicious code. The hack, the first reported, allowed them to tap the wealth of personal information the phones contain.

article link
video link

Optimus Prime Stands No Chance

Scott Rippee @ 11:21 pm Tuesday, July 17th, 2007

Just wait til the rocket mount for my boe-bot arrives. bot-bots unite!

git git gitti up

Scott Rippee @ 10:51 pm Tuesday, July 17th, 2007

What does git do right?

The important part of a merge is not how it handles conflicts (which need to be verified by a human anyway if they are at all interesting), but that it should meld the history together right so that you have a new solid base for future merges.

Git breaks the mould because it thinks about content, not files. It doesn’t track renames, it tracks content. And it does so at a whole-tree level. This is a radical departure from most version control systems. It doesn’t bother trying to store per-file histories; it instead stores the history at the tree level. When you perform a diff you are comparing two trees, not two files.

Time for me to take the plunge and give it a spin for my self. Darcs is also on my list to try, but I just need to see git in action first.

BTW Linus Torvalds knows your stupid and hates you.

Also see the video linked to in this post for more info on git

The Tune Glue Graph

Scott Rippee @ 7:20 pm Wednesday, July 11th, 2007

tuneglue-screen.jpg

TuneGlue is a visual mashup of info via last.fm and amazon and is quite entertaining. Now they just need to add audio clips and figure out how to use the UI to teach csci students about graphs. =]

Accessors in Object Orientated Design

Scott Rippee @ 2:30 pm Sunday, July 8th, 2007

Don’t ask for the information you need to do the work; ask the object that has the information to do the work for you.

This article does a good job of verbalizing some of my realizations regarding data flow in OO design. link

Pick Your RoR HTML Parsing Poison

Scott Rippee @ 4:07 pm Thursday, July 5th, 2007

Ruby HTML parsing has been keeping me quite entertained frustrated lately, so I thought I'd share some thoughts. There are a couple of instance in your rails app when you'll want to parse HTML

  1. Automated functional/controller testing
  2. Screen scraping

Functional Testing

The standard method of verifying aspects of resulting HTML in your functional test is HTML::Selector. It's simple, powerful, and baked in. Agile Rails 2nd does a great job of explaining how it's used in functional tests.

RUBY:
  1. def test_add_no_name
  2.   post :add, :color => { :name => '', :hex => '#123456' }
  3.   assert_template 'add'
  4.   assert_select "div[id=errorExplanation]" do
  5.     assert_select "ul" do
  6.       assert_select "li", 'Name is not present'
  7.     end
  8.   end
  9. end

 

Scraping

Several options are available, but oh so popular is why's Hpricot. It's fast and enjoyable (although I experienced no joy while learning how to use it =) It also happens to be used in some of the other scraping/navigating libraries (WWW::Mechanize [rdoc] and scRUBYt!).

 

Some Thoughts...

So if your just concerned with testing use HTML::Selector and the built in asserts. If you have to do very basic screen scraping I would also suggest going with HTML::Selector (as long as speed is not an issue and the scraping is basic) with open-uri or curb for fetching the pages.

For more serious screen scraping bust out Hpricot and if you need to navigate pages via automation use WWW::Mechanize (Mechanize also uses Hpricot so all of that Hpricot knowledge you've absorbed is directly applicable. Mechanize is Hpricot with the ability to click). Don't worry about scRUBYt!. It's more of a pain to figure out than it's worth (but maybe I'm wrong about it. Any good examples/write-ups?).

Hpricot with CSS selector

RUBY:
  1. divs = (doc/"div[@style*='font-weight:'][text()*='$'").inner_html
  2. divs.each do |div|
  3.   if div =~ /\$[0-9]?[0-9]\.[0-9][0-9]/
  4.     self.price = div.to_s.sub('$', '')
  5.   end
  6. end

Hpricot search with XPath

RUBY:
  1. require 'hpricot'
  2. require 'open-uri'
  3. doc = Hpricot(URI.parse("http://google.com/").read)
  4.  
  5. doc.search("/html/body//p")
  6. doc.search("//p")
  7. doc.search("//p/a")
  8. doc.search("//a[@src]")
  9. doc.search("//a[@src='google.com']")

Using Mechanize to do a search on google

RUBY:
  1. require 'rubygems'
  2. require 'mechanize'
  3.  
  4. agent = WWW::Mechanize.new
  5. agent.user_agent_alias = 'Mac Safari'
  6. page = agent.get("http://www.google.com/")
  7. search_form = page.forms.with.name("f").first
  8. search_form.q = "Hello"
  9. search_results = agent.submit(search_form)
  10. puts search_results.body

Note that Hpricot lets you use a CSS method of selecting and an XPATH method. Use XPATH if you already have experience otherwise the CSS method is more intuitive.

If you go with XPATH grab the XPather firefox plugin and use it with the DOM Inspector. Also, it works with the firebug firefox plugin. I'm still in awe that it worked when I tried. :) To do this, use firebug to "inspect", choose an element, right click on the page and select "Show in XPather". XPather will open with the selected element locked and loaded.

Finally, if your a Hpricot wiz forget about HTML::Selector and put Hpricot to work for view validation in your functional tests. See this great write up, Testing your Rails views with Hpricot, which demonstrates this elegant solution.

RUBY:
  1. assert_equal "My Funky Website", tag('title')
  2. assert_equal 20, tags('div.boxout').size
  3. assert_equal 'visible', element('div#site_container').attributes['class']