<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>binpoint.com &#187; Programming</title>
	<atom:link href="http://binpoint.com/category/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://binpoint.com</link>
	<description>A Security Blog (Stirred with Geek Life)</description>
	<lastBuildDate>Wed, 09 Jun 2010 02:02:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>User Interfaces In Film, and the Man Who Designs Them</title>
		<link>http://binpoint.com/2009/12/user-interfaces-in-film-and-the-man-who-designs-them/</link>
		<comments>http://binpoint.com/2009/12/user-interfaces-in-film-and-the-man-who-designs-them/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 19:59:30 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Worth Watching]]></category>

		<guid isPermaLink="false">http://binpoint.com/?p=516</guid>
		<description><![CDATA[Mark Coleran designs User Interfaces that are used in film. One of my recent favorites was Tony Stark&#8217;s computers in Iron Man, however apparently he can&#8217;t take credit for that one. Still, this is a pretty cool job, similar, but less challenging than that of a video game UI designer job in the real world. [...]


Related posts:<ol><li><a href='http://binpoint.com/2009/12/barnes-noble-nook-review-pretty-good/' rel='bookmark' title='Permanent Link: Barnes &#038; Noble Nook Review: Pretty Good'>Barnes &#038; Noble Nook Review: Pretty Good</a></li>
<li><a href='http://binpoint.com/2009/12/a-romance-flowchart-when-is-it-inappropriate-to-use-your-iphone/' rel='bookmark' title='Permanent Link: A Romance Flowchart: When Is It Inappropriate to Use Your iPhone?'>A Romance Flowchart: When Is It Inappropriate to Use Your iPhone?</a></li>
<li><a href='http://binpoint.com/2009/11/strong-contender-for-worst-idea-of-the-year-adobe-flash-10-1-add-hardware-video-acceleration/' rel='bookmark' title='Permanent Link: Strong Contender for Worst Idea of the Year: Adobe Flash 10.1 Adds Hardware Video Acceleration'>Strong Contender for Worst Idea of the Year: Adobe Flash 10.1 Adds Hardware Video Acceleration</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a rel="lytebox" href="http://cache.gawker.com/assets/images/4/2009/12/screencap_2009-12-03_at_4.01.45_pm.jpg"><img src="http://cache.gawker.com/assets/images/4/2009/12/500x_screencap_2009-12-03_at_4.01.45_pm.jpg" alt="" width="500" /></a></p>
<p><a href="http://blog.coleran.com/category/portfolio/screendesign">Mark Coleran</a> designs User Interfaces that are used in film. One of my recent favorites was Tony Stark&#8217;s computers in Iron Man, however apparently he can&#8217;t take credit for that one. Still, this is a pretty cool job, similar, but less challenging than that of a video game UI designer job in the real world.</p>
<p>[<a href="http://blog.coleran.com/mr-mrs-smith">Mark Coleran</a> via <a href="http://www.metafilter.com/87139/Upload-this-to-your-alien-spacecraft">Metafilter</a> and <a href="http://gizmodo.com/5418342/ridiculous-user-interfaces-in-film-and-the-man-who-designs-them">Gizmodo</a>]<span id="more-516"></span></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="500" height="375" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=1563485&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><param name="wmode" value="transparent" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="500" height="375" src="http://vimeo.com/moogaloop.swf?clip_id=1563485&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowfullscreen="true" wmode="transparent"></embed></object><a rel="lytebox" href="http://cache.gawker.com/assets/images/4/2009/12/1563485.jpg"><img src="http://cache.gawker.com/assets/images/4/2009/12/500x_1563485.jpg" alt="" width="500" /></a></p>


<p>Related posts:<ol><li><a href='http://binpoint.com/2009/12/barnes-noble-nook-review-pretty-good/' rel='bookmark' title='Permanent Link: Barnes &#038; Noble Nook Review: Pretty Good'>Barnes &#038; Noble Nook Review: Pretty Good</a></li>
<li><a href='http://binpoint.com/2009/12/a-romance-flowchart-when-is-it-inappropriate-to-use-your-iphone/' rel='bookmark' title='Permanent Link: A Romance Flowchart: When Is It Inappropriate to Use Your iPhone?'>A Romance Flowchart: When Is It Inappropriate to Use Your iPhone?</a></li>
<li><a href='http://binpoint.com/2009/11/strong-contender-for-worst-idea-of-the-year-adobe-flash-10-1-add-hardware-video-acceleration/' rel='bookmark' title='Permanent Link: Strong Contender for Worst Idea of the Year: Adobe Flash 10.1 Adds Hardware Video Acceleration'>Strong Contender for Worst Idea of the Year: Adobe Flash 10.1 Adds Hardware Video Acceleration</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://binpoint.com/2009/12/user-interfaces-in-film-and-the-man-who-designs-them/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing a DNS sniffer</title>
		<link>http://binpoint.com/2008/06/writing-a-dns-sniffer/</link>
		<comments>http://binpoint.com/2008/06/writing-a-dns-sniffer/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 23:37:50 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[My Ideas]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[libpcap]]></category>
		<category><![CDATA[sniffer]]></category>

		<guid isPermaLink="false">http://binpoint.com/?p=42</guid>
		<description><![CDATA[Programming project: construct a program that can listen to perimeter traffic and construct http proxy-like logs. The weapon of choice? libpcap! The app will need to listen for both DNS (udp port 53) and HTTP (tcp port 80) traffic to accomplish this. First up is determining where all the interesting bits in each layer of [...]


Related posts:<ol><li><a href='http://binpoint.com/2008/06/thousands-of-sacrificial-lambs/' rel='bookmark' title='Permanent Link: Thousands of Sacrificial Lambs'>Thousands of Sacrificial Lambs</a></li>
<li><a href='http://binpoint.com/2010/04/network-scanning-with-nmap/' rel='bookmark' title='Permanent Link: Network Scanning with nmap'>Network Scanning with nmap</a></li>
<li><a href='http://binpoint.com/2008/06/detectin-bad-tcp-sessions/' rel='bookmark' title='Permanent Link: Detecting bad TCP sessions'>Detecting bad TCP sessions</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Programming project: construct a program that can listen to perimeter traffic and construct http proxy-like logs. The weapon of choice? <a href="http://www.tcpdump.org/">libpcap</a>! The app will need to listen for both DNS (udp port 53) and HTTP (tcp port 80) traffic to accomplish this.</p>
<p>First up is determining where all the interesting bits in each layer of the OSI stack are located within each packet. In logical order:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Ethernet#Ethernet_frame_types_and_the_EtherType_field">Ethernet Headers &amp; Packet Structure</a></li>
</ul>
<ul>
<li><a href="http://en.wikipedia.org/wiki/IPv4#Packet_structure">IP Headers &amp; Packet Structure</a></li>
</ul>
<ul>
<li><a href="http://en.wikipedia.org/wiki/User_Datagram_Protocol#Packet_structure">UDP Headers &amp; Packet Structure</a></li>
</ul>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Domain_Name_System#Types_of_DNS_records">DNS Records</a> and <a href="http://www.faqs.org/rfcs/rfc1035.html">DNS Headers</a> (about half way down)</li>
</ul>
<p><img class="size-medium wp-image-43" title="tcpdump-source" src="http://binpoint.com/wp-content/uploads/2008/06/tcpdump-source-300x170.png" alt="" width="300" height="170" /></p>
<p>With all that reference material, you might think this is a lot of reading! Okay, fine how about a copy and paste job? <a href="http://sourceforge.net/projects/tcpdump/">Tcpdump</a> is the perfect place to exercise your mouse wheel click skillz to get all the data structures and defines you&#8217;ll need.</p>
<p><img class="alignnone size-medium wp-image-44" title="wireshark" src="http://binpoint.com/wp-content/uploads/2008/06/wireshark.png" alt="" width="232" height="177" /></p>
<p>One last useful tool that should be in every network programmers tool belt is of course, Wiershark (aka ethereal). In this case, it comes in handy to double check your program is disassembling the packets the same as Wireshark.</p>
<p>A BPF is used to speed up the filtering of interesting packets from useless ones and is passed in to the program as follows:</p>
<blockquote><p>dns_sniffer &#8220;udp port 53&#8243;</p></blockquote>
<p>When writing any network aware application, the best place to start for documentation is always going to be the <a href="http://www.faqs.org/rfcs/rfc1035.html">applicable RFC</a> for whatever protocol you plan to speak.</p>
<p>When figuring out what bitmasks were needed to mask out specific bits (namely the first two bits for parsing DNS compression) <a href="http://www.ascii.cl/conversion.htm">Conversion Table</a> came in handy. I also found this <a href="http://www.cprogramming.com/tutorial/bitwise_operators.html">handy page</a> if you need to brush up on bitwise operations (I sure did, since I hardly use them.) And don&#8217;t forget your <a href="http://www.asciitable.com/">ASCII-Table</a>!</p>
<p>Have you ever wondered how your lonely little-endian wintel laptop / desktop is able to communicate over the same IP network to a big-endian speaking SPARC system? It certainly kept me up at night! See for yourself <a href="http://beej.us/guide/bgnet/output/html/multipage/htonsman.html">how it is able to work</a>.</p>
<p>More to follow&#8230; (you know, like source code)</p>


<p>Related posts:<ol><li><a href='http://binpoint.com/2008/06/thousands-of-sacrificial-lambs/' rel='bookmark' title='Permanent Link: Thousands of Sacrificial Lambs'>Thousands of Sacrificial Lambs</a></li>
<li><a href='http://binpoint.com/2010/04/network-scanning-with-nmap/' rel='bookmark' title='Permanent Link: Network Scanning with nmap'>Network Scanning with nmap</a></li>
<li><a href='http://binpoint.com/2008/06/detectin-bad-tcp-sessions/' rel='bookmark' title='Permanent Link: Detecting bad TCP sessions'>Detecting bad TCP sessions</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://binpoint.com/2008/06/writing-a-dns-sniffer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
