My son asked the other night if hacking computers really worked like on television, and if numbers/words really flashed across the screen. I explained to him a bit, then told him we could make something that looked like he seen on television. Below is a print out I wrote for him. Keep in mind I tried to dumb it down a bit for my 10 year old son. Hacking MD5 Hashes What is a MD5 Hash?
read moreThis has been one of the processes I’ve normally not solved in a clean or readable way. In []: a = [1,2,3,4,5,6,7,8] Taking the top output I want to return something similar to below. Out[]: [(1, 2), (3, 4), (5, 6), (7, 8)] Using a Pythonic approach this task isn’t to difficult, but there is some explaining to do. First lets look at the code: In []: a = iter([1,2,3,4,5,6,7,8]) In []: [ i for i in zip(a, a) ] Out[]: [(1, 2), (3, 4), (5, 6), (7, 8)] First we need to pass our list to the iter function, this turns our list into a iterator object:
read moreSo you may have looked at /proc/net/route before and thought how the heck am I suppose to read this. Well here is the low down. This file uses endianness to store the addresses as hexadecimal, in reverse; for example 192 as hex is C0 : In []: hex(192) Out[]: '0xc0' So lets take a look at our route file: Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT eth0 00087F0A 00000000 0001 0 0 0 00FFFFFF 0 0 0 eth0 0000FEA9 00000000 0001 0 0 1002 0000FFFF 0 0 0 eth0 00000000 01087F0A 0003 0 0 0 00000000 0 0 0 Now the first entry has a destination of 00087F0A , lets go ahead and chunk these in to hex characters:
read moreA dish we normally eat once a week is spaghetti and meat sauce; however, since we have been eating vegan we needed to substitute the meat sauce, as well as egg pasta. The pasta wasn’t difficult at all, our local grocery store carried a brand right next to all the other pasta noodles. As for the meat sauce, we decided to try Seitan (a wheat product). The ground Seitan cooked up quite nicely, and even resembled the ground beef we were accustomed to.
read moreDay 3 of eating vegan and we still have Pizza and Beer, eating vegan isn’t as hard as you may think!
read moreWe are now on the third day of our vegan lifestyle change, and this morning we decided to give vegan waffles a try. We’ve always made our waffles from scratch, but up till this point have used cows milk and eggs. This morning we tweaked that with almond milk to replace the cows milk, and apple sauce to replace the egg. After a few minutes in the waffle iron our breakfast was ready, and you couldn’t tell the difference between the vegan and the non-vegan waffles by look.
read moreI did not get a chance to read George Orwell’s 1984 while in high school, but have heard many times how great a book it is.It has always been on my list of to read books, but never got around to doing so until recently. At time of this writing I’ve finished, and I have to say the book was fantastic! I would highly recommend this book to anyone who enjoys reading fiction or dystopian style novels.
read moreI’ve spent a lot of time working with RPM in the last couple years, and have had the pleasure of maintaining the IUS Community . I wanted to share a small utility we use quite often called repodataParser , repodataParser is a Python class for working with RPM repositories, and used in a few of our Django applications . The idea is all RPM repositories contain a XML file containing details about the package it contains.
read moreUsing Board Game Geek’s API I wanted to create a simple Python tool for randomly picking a game to play. Below is some quick Python code to achieve my goal: from urllib2 import urlopen from lxml import etree from random import choice def get_xml(): req = urlopen('http://www.boardgamegeek.com/xmlapi/collection/flip387') return req def get_items(): xml = etree.parse(get_xml()) return xml.xpath('//item') def get_thumbnail(item): t = item.xpath('thumbnail') if len(t) == 1: return t[0].text def get_name(item): t = item.
read more