<?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>Ranok&#039;s Ramblings &#187; Technical</title>
	<atom:link href="http://www.r4n0k.com/category/technical/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.r4n0k.com</link>
	<description>A peek into my life, and the projects I never complete</description>
	<lastBuildDate>Sat, 04 Feb 2012 16:36:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>libAnomaly GCC4 Update</title>
		<link>http://www.r4n0k.com/2012/02/04/libanomaly-gcc4-update/</link>
		<comments>http://www.r4n0k.com/2012/02/04/libanomaly-gcc4-update/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 16:36:19 +0000</pubDate>
		<dc:creator>ranok</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[libanomaly]]></category>
		<category><![CDATA[machine learning]]></category>
		<category><![CDATA[thesis]]></category>

		<guid isPermaLink="false">http://www.r4n0k.com/?p=288</guid>
		<description><![CDATA[During my thesis research, I came across a very useful library for machine learning and anomaly detection: libAnomaly. While it hasn&#8217;t been updated in years, the papers published (see site for list) are of interest to me. When I attempted to compile the library to play around with, the build failed due to GCC4 being [...]]]></description>
			<content:encoded><![CDATA[<p>During my thesis research, I came across a very useful library for machine learning and anomaly detection: <a title="libAnomaly" href="http://www.cs.ucsb.edu/~seclab/projects/libanomaly/index.html">libAnomaly</a>. While it hasn&#8217;t been updated in years, the papers published (see site for list) are of interest to me. When I attempted to compile the library to play around with, the build failed due to GCC4 being more strict than previous versions, I found a number of other posts from people trying to build the library with similar problems, so I thought I&#8217;d fix the errors (there are still plenty of warnings) and upload it so others wouldn&#8217;t have to duplicate the effort. You can download the source from <a href="http://code.jitunleashed.com/libanomaly-0.1-gcc4.tar.gz">here</a>.</p>
<p>&nbsp;</p>
<p>Peace and chow,</p>
<p>Jacob</p>
]]></content:encoded>
			<wfw:commentRss>http://www.r4n0k.com/2012/02/04/libanomaly-gcc4-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to Mnesia I</title>
		<link>http://www.r4n0k.com/2009/10/14/introduction-to-mnesia-i/</link>
		<comments>http://www.r4n0k.com/2009/10/14/introduction-to-mnesia-i/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 18:56:31 +0000</pubDate>
		<dc:creator>ranok</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[dbms]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[mnesia]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.r4n0k.com/?p=203</guid>
		<description><![CDATA[Today in my Advanced Concepts in Operating Systems class I led the discussion on the Mnesia paper from PADL&#8217;99, while this paper has numerous typos it does do an excellent job highlighting the features and advantages of Mnesia. For those of you who are unaware, Mnesia is a distributed, fault-tolerant object DBMS written in Erlang. [...]]]></description>
			<content:encoded><![CDATA[<p>Today in my Advanced Concepts in Operating Systems class I led the discussion on the <a href="http://www.erlang.se/publications/mnesia_overview.pdf">Mnesia paper</a> from PADL&#8217;99, while this paper has numerous typos it does do an excellent job highlighting the features and advantages of Mnesia. For those of you who are unaware, Mnesia is a distributed, fault-tolerant object DBMS written in Erlang. One thing about Mnesia that I have found to be lacking is a tutorial written for the lay person from the ground up, this gap I intend to try and fill. This multi-segment tutorial assumes you have knowledge of Erlang, and the basic  concepts of manipulating data with DBMSes, other than that, I hope to provide enough information and code to demystify a fairly complex system. However, I still am on the road to mastery, so if I make any errors, or you have any tips for improvement, I&#8217;d be happy to add them in.</p>
<p>To get started, start up the Erlang shell (erl) with a name, I will use -sname foo in the following examples. Below is a transcript of starting up and creating a disk-based</p>
<div class="hl-container">
<div class="hl-main">
<pre><span class="hl-code">ranok@orion:~/Desktop$ erl -sname foo
Erlang R13B01 (erts-5.7.2) [source] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.7.2  (abort with ^G)
(foo@orion)1&gt; mnesia:create_schema([node()]).
ok
(foo@orion)2&gt; mnesia:start().
ok</span></pre>
</div>
</div>
<p>The most important call made here, create_schema, takes a list of nodes to replicate the schema table to on disk. You can add additional disk-based nodes or ram-based copies later (we&#8217;ll get to the details later). After you&#8217;ve created the schema (this will make a folder for all the Mnesia table data), you can start the application with the start function.</p>
<p>Now that we have the database running, we need at least one table to store the data in, we will start with a very simple record to just store simple key/value data. The nice thing about Mnesia, is that the data we store can be pretty much anything, from a simple atom to a function. We will start learning the basics from the mnesia_test module, which I have <a href="http://code.jitunleashed.com/mnesia/mnesia_test.erl">uploaded here</a>.</p>
<p>The first few lines of the module start off like any Erlang code, a module declaration, what functions to export, including the QLC (Query List Comprehensions) include file (you may need to find it for your system) and a record definition:</p>
<div class="hl-container">
<div class="hl-main">
<pre><span class="hl-code">-record(data, {key, value}).</span></pre>
</div>
</div>
<p>Which will define our record for the table also named data. In the function setup_and_start/0, we tie in what we already went over with the create_table function, which in our case looks like</p>
<div class="hl-container">
<div class="hl-main">
<pre><span class="hl-code">mnesia:create_table(data, [{disc_copies, [node()]}, {attributes, record_info(fields, data)}])</span></pre>
</div>
</div>
<p>The <a href="http://erlang.org/doc/man/mnesia.html#create_table-2">create_table</a> function has a number of options, the most basic of which we will deal with at the moment: the name of the new table, where and how the table will be stored and what fields the table has (this code used the record_info() function to pull those out of the data record for us). Now that we have our table, we need a way to get the data in and out of it.</p>
<p>Many databases provide the ability for multiple queries to be joined into one transaction to be executed atomically. Mnesia is no different, but for the most part, all queries are executed through the transaction manager (there is a dirty interface which will be discussed later), this makes working in a distributed environment much easier. The way to perform a transaction in Mnesia is to pass a fun to the mnesia:transaction() function that will atomically run.</p>
<p>The actual function to enter data (both insert and update) is write(Record). We wrap this into the mnesia_test:insert(Key, Val) function displayed below:</p>
<div class="hl-container">
<div class="hl-main">
<pre><span class="hl-code">insert(Key, Val) -&gt;
Record = #data{key = Key, value = Val},
F = fun() -&gt;
mnesia:write(Record)
end,
mnesia:transaction(F).</span></pre>
</div>
</div>
<p>To now retrieve this data back from the database, the read function is now used, the read function takes two arguments: the table name (in this case, data) and the key to retrieve. The mnesia_test retrieve function wraps this nicely for us, and is shown below:</p>
<div class="hl-container">
<div class="hl-main">
<pre><span class="hl-code">retrieve(Key) -&gt;
F = fun() -&gt;
mnesia:read({data, Key})
end,
{atomic, Data} = mnesia:transaction(F),
Data.</span></pre>
</div>
</div>
<p>mnesia:transaction will either return {aborted, Reason} or {atomic, Rows}, where Rows is a list of all the retrieved data. If the key we tried to retrieve could not be found, then it will return an empty list.</p>
<p>Say however, we want to search the table for certain values that are not the index of the table. For that there is the matching functions, the simplest of them is the match_object whose usage can be seen here:</p>
<div class="hl-container">
<div class="hl-main">
<pre><span class="hl-code">search(Val) -&gt;
F = fun() -&gt;
mnesia:match_object(#data{key = '_', value = Val})
end,
{atomic, Data} = mnesia:transaction(F),
Data.</span></pre>
</div>
</div>
<p>As you can see, simply fill in all the values that are known and that you want to search for, and use the &#8216;_&#8217; unmatched value for all the other values. This transaction will return the same forms as the read transaction.</p>
<p>There is another method for filtering through Mnesia tables, which is very similar to the list comprehensions builtin to Erlang which is called QLC. The QLC version of the above function is below:</p>
<div class="hl-container">
<div class="hl-main">
<pre><span class="hl-code">search_qlc(Val) -&gt;
F = fun() -&gt;
qlc:eval(
qlc:q(
[X || X &lt;- mnesia:table(data), X#data.value == Val]
))
end,
{atomic, Data} = mnesia:transaction(F),
Data.</span></pre>
</div>
</div>
<p>What the query here is doing is is returning a list of Xs where every possible X comes from our data table, and X#data.value == Val. This should be very intuitive for those of you who are familiar with list comprehensions. What qlc:q() does is form a query handle (much like a function object) which gets evaluated by qlc:eval() inside of our transaction object. Again, this will return the same values from mnesia:transaction.</p>
<p>Well, that about covers the basics of Mnesia, you now should be able to setup Mnesia on your computer, create a table and insert/retrieve data from it. In the next installment, we will look at distributed Mnesia and the dirty interface, which provides faster queries by bypassing the transaction manager. After that we will put all of what we&#8217;ve learned into creating a system that will take advantage of Mnesia and give a pseudo real-world problem a fitting solution. Please check back soon for the next installment!</p>
<p>Peace and chow,</p>
<p>Ranok</p>
]]></content:encoded>
			<wfw:commentRss>http://www.r4n0k.com/2009/10/14/introduction-to-mnesia-i/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Computers Like Rectangles</title>
		<link>http://www.r4n0k.com/2009/05/24/computers-like-rectangles/</link>
		<comments>http://www.r4n0k.com/2009/05/24/computers-like-rectangles/#comments</comments>
		<pubDate>Sun, 24 May 2009 12:59:32 +0000</pubDate>
		<dc:creator>ranok</dc:creator>
				<category><![CDATA[For Fun]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[quandry]]></category>
		<category><![CDATA[rectangles]]></category>
		<category><![CDATA[triangles]]></category>

		<guid isPermaLink="false">http://www.r4n0k.com/?p=192</guid>
		<description><![CDATA[The other day I was at a friend&#8217;s house, and while waiting for the oven to preheat, I stumbled across a game I once played as a child, a triangular peg board where the goal is to remove pegs such that there is only one peg remaining. I was thinking of devising a program to [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I was at a friend&#8217;s house, and while waiting for the oven to preheat, I stumbled across a game I once played as a child, a triangular peg board where the goal is to remove pegs such that there is only one peg remaining. I was thinking of devising a program to attempt to solve the puzzle, much like my programming languages assignment last year to solve a slide puzzle. However, the more I thought about it, the more I realized how attached the conventional computer science paradigm is to rectangular data. It is almost too easy to write a program to play checkers (or at least manipulate the pieces on a board), but it is certainly non-trivial to write a simple and efficient algorithm the maintain the board state. I think it&#8217;s rather interesting how the problems we generally have to solve fit rather nicely into their little rectangles, and how few problems require other shapes.</p>
<p>For a solution to the peg board problem, I found <a href="http://www.danobrien.ws/PegBoard.html">this site</a> that documents the author&#8217;s process and a code listing. If you&#8217;re interested in the game as much (or more) than that the programmatic solution, there are also a number of statistics for possible solutions on the site.</p>
<p>Peace and chow,</p>
<p>Ranok</p>
]]></content:encoded>
			<wfw:commentRss>http://www.r4n0k.com/2009/05/24/computers-like-rectangles/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Off on a Tangent: Calling Conventions</title>
		<link>http://www.r4n0k.com/2009/05/07/off-on-a-tangent-calling-conventions/</link>
		<comments>http://www.r4n0k.com/2009/05/07/off-on-a-tangent-calling-conventions/#comments</comments>
		<pubDate>Thu, 07 May 2009 16:17:50 +0000</pubDate>
		<dc:creator>ranok</dc:creator>
				<category><![CDATA[For Fun]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[assembler]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tangent]]></category>

		<guid isPermaLink="false">http://www.r4n0k.com/?p=190</guid>
		<description><![CDATA[There are many things that we take for granted when using a computer: the operating system, hard ware drivers, and graphical interfaces. By learning about these tools, it gives a new awareness into how much work it takes to get even a simple system working. Computer programmers also take advantage of a number of software [...]]]></description>
			<content:encoded><![CDATA[<p>There are many things that we take for granted when using a computer: the operating system, hard ware drivers, and graphical interfaces. By learning about these tools, it gives a new awareness into how much work it takes to get even a simple system working. Computer programmers also take advantage of a number of software components: compiler, linker, operating system, memory management functions and debuggers. There is quite a bit of behind the scenes that goes on even in a simple program like:</p>
<div class="hl-container">
<div class="hl-main">
<pre><span class="hl-code">int foo(int a, int b) {
return a + b;
}</span></pre>
</div>
</div>
<div class="hl-container">
<div class="hl-main">
<pre><span class="hl-code">int main() {
return foo(3, 4);
}</span></pre>
</div>
</div>
<p>Still has many layers underneath the obvious, the one I want to mention briefly today is the calling conventions. I was curious what happens when you call a function, and looking on wikipedia, I found an article that very nicely shows how many possible things could happen.</p>
<p>Normally in with gcc, when you call a function, the generated code pushes the arguments to the function onto the stack in reverse order, that is, last argument first, and then pushes the address of the next instruction to execute and jumps to the function. That function then can access the arguments and put it&#8217;s return value in EAX and jump back to the pushed instruction address. The caller must then clear the stack and use the EAX return value.</p>
<p>However, a way to optimize your code with gcc is the -mregparm=N command, which will put the N &lt; 4 first arguments in registers EAX, EDX, and ECX respectively and push the rest onto the stack. This is much quicker since it requires less memory access. However, you must make sure to compile all your code this way, otherwise you&#8217;ll have some strange interactions when the conventions are mixed.</p>
<p>Peace and chow,</p>
<p>Ranok</p>
]]></content:encoded>
			<wfw:commentRss>http://www.r4n0k.com/2009/05/07/off-on-a-tangent-calling-conventions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Inets &#8211; Erlang&#8217;s Builtin Web Daemon</title>
		<link>http://www.r4n0k.com/2009/05/02/using-inets-erlangs-builtin-web-daemon/</link>
		<comments>http://www.r4n0k.com/2009/05/02/using-inets-erlangs-builtin-web-daemon/#comments</comments>
		<pubDate>Sat, 02 May 2009 21:31:03 +0000</pubDate>
		<dc:creator>ranok</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[inets]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[osp]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.r4n0k.com/?p=183</guid>
		<description><![CDATA[A feature I&#8217;ve been meaning to add to Open Server Platform for a while is a web management system, where an administrator can login and manage the cluster and the servlets running on it. I&#8217;d like there to be a user friendly interface for administrators to start, stop and migrate servlets across the different nodes [...]]]></description>
			<content:encoded><![CDATA[<p>A feature I&#8217;ve been meaning to add to <a href="http://www.openserverplatform.com">Open Server Platform</a> for a while is a web management system, where an administrator can login and manage the cluster and the servlets running on it. I&#8217;d like there to be a user friendly interface for administrators to start, stop and migrate servlets across the different nodes of the system and a way to upload a servlet file and have it compiled and distributed across the cluster.</p>
<p>The simplest way to start serving web content with Erlang is to use the inets server and the httpd service. This is a HTTP/1.1 server built into the Erlang distribution that supports some more advanced features, most interesting of all, the ability to use Erlang to dynamically generate content. It is however very poorly documented, and there are a few very annoying things I came across that I&#8217;m posting to hopefully help anyone else trying to get it working.</p>
<ol>
<li>The order of modules in the <code>{modules, []}</code> directive matters, if you want to have mod_dir work, it needs to be specified *AFTER* the mod_alias.</li>
<li>The logging is rather horrid, the transfer.log will not log anything except for HTTP 200 for every request, even if it failed.</li>
<li>You must specify <code>{bind_address, any}</code> in the configuration to use the <code>httpd:reload_config</code> function, otherwise it will return <code>{error, not_started}</code></li>
<li>If you just want to server static content, you will need at a minimum the following modules: mod_get, mod_head, mod_log, mod_actions and mod_range. However, adding mod_alias is recommended along with the <code>{directory_index, ["index.html"]}</code> directive to stop it from failing (HTTP 500) on a directory request.</li>
<li>To use dynamic content, create a module that exports callbacks of the form: <code>function(SessionID, _Env, _Input)</code>. To write Str back to the client, use the <code>mod_esi:deliver(SessionID, Str)</code> function.</li>
</ol>
<p>I hope that this helps out!</p>
<p>Peace and chow,</p>
<p>Ranok</p>
]]></content:encoded>
			<wfw:commentRss>http://www.r4n0k.com/2009/05/02/using-inets-erlangs-builtin-web-daemon/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Open Server Platform Version 0.3 Released!</title>
		<link>http://www.r4n0k.com/2009/04/21/osp-version-03-released/</link>
		<comments>http://www.r4n0k.com/2009/04/21/osp-version-03-released/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 23:14:27 +0000</pubDate>
		<dc:creator>ranok</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[mnesia]]></category>
		<category><![CDATA[osp]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://www.r4n0k.com/?p=179</guid>
		<description><![CDATA[Today I finally got around to going through and testing the RC for version 0.3 of Open Server Platform. Everything seemed to work as planned, except for a few known issues that will be fixed in the next release, which should be coming down the pipe soon. Improvements: Added replication nodes to increase fail-safe reliability [...]]]></description>
			<content:encoded><![CDATA[<p>Today I finally got around to going through and testing the RC for <a href="http://groups.google.com/group/openserverplatform/browse_thread/thread/101e2a449b87e648">version 0.3</a> of <a href="http://openserverplatform.com/">Open Server Platform</a>. Everything seemed to work as planned, except for a few known issues that will be fixed in the next release, which should be coming down the pipe soon.</p>
<p>Improvements:</p>
<ul>
<li>Added replication nodes to increase fail-safe reliability</li>
<li>Added commands to the administration console to stop and live migrate applications</li>
<li>Can use configuration files to assist in the start up of OSP</li>
<li>Many bug fixes and documentation updates</li>
<li>The HTTPd servlet example now supports large files and the HEAD command</li>
</ul>
<p>So, please check it out and let me know what you think!</p>
<p>Peace and chow,</p>
<p>Ranok</p>
]]></content:encoded>
			<wfw:commentRss>http://www.r4n0k.com/2009/04/21/osp-version-03-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back in the Groove</title>
		<link>http://www.r4n0k.com/2009/04/07/back-in-the-groove/</link>
		<comments>http://www.r4n0k.com/2009/04/07/back-in-the-groove/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 04:23:12 +0000</pubDate>
		<dc:creator>ranok</dc:creator>
				<category><![CDATA[For Fun]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[osp]]></category>

		<guid isPermaLink="false">http://www.r4n0k.com/?p=176</guid>
		<description><![CDATA[After taking off the afternoon due to a migraine, and napping for a few hours until it passed, I was looking over some old projects, and decided to get motivated to work on my various Erlang hackery projects. I checked out a fresh copy of Open Server Platform on my new computer, and decided to [...]]]></description>
			<content:encoded><![CDATA[<p>After taking off the afternoon due to a migraine, and napping for a few hours until it passed, I was looking over some old projects, and decided to get motivated to work on my various Erlang hackery projects. I checked out a fresh copy of <a href="http://openserverplatform.com/">Open Server Platform</a> on my <a href="http://www.flickr.com/photos/ranok/3309567067/">new</a> <a href="http://www.flickr.com/photos/ranok/3310396142/">computer</a>, and decided to hack on it some more. There are a number of loose ends I&#8217;d like to tie up before the 0.3 release, but, before I could get down to coding, SVN get my so frustrated that I could no longer deal with it and switched to git, creating a <a href="http://github.com/ranok/open-server-platform/tree/master">new repository on Github</a>. I will keep the <a href="http://code.google.com/p/openserverplatform/">Google Code repository</a> the &#8216;defacto&#8217; repository, where the safer code gets committed, but use Github for the more bleeding edge development due to it&#8217;s simplified branching and merging (among other things).</p>
<p>In the new git setup, I have two branches (aside from master, which follows the SVN repository): otp and no-otp. The no-otp version is currently the stable code that runs just fine, but doesn&#8217;t take advantage of Erlang&#8217;s OTP framework. The otp branch is the more cutting edge OTP aware version, which I hope to fully migrate to soon. With full support for OTP, I should be able to use an already existing distribution platform, and more battle tested redundancy.</p>
<p>This evening, I fixed a long standing bug in the example HTTPd where the server would crash when opening large files due to a shortcut I took with first implementing the server. Originally, the server would read the entire file into a string and then send that to the client, as you can probably see, there is a problem when the server tries to read in a 3.9 GB file (my test file). Now, my servlet takes a much more sane approach, read in the file 1 kilobyte at time, sending that to the client before reading more. This new approach works perfectly, though I had to add some messiness for handling CGI/PHP files and different MIME types. I also added support for the HTTP HEAD command.</p>
<p>Peace and chow,</p>
<p>Ranok</p>
]]></content:encoded>
			<wfw:commentRss>http://www.r4n0k.com/2009/04/07/back-in-the-groove/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git and Wiki Wide Web</title>
		<link>http://www.r4n0k.com/2009/03/24/git-and-wiki-wide-web/</link>
		<comments>http://www.r4n0k.com/2009/03/24/git-and-wiki-wide-web/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 02:50:32 +0000</pubDate>
		<dc:creator>ranok</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[wiki wide web]]></category>

		<guid isPermaLink="false">http://www.r4n0k.com/?p=174</guid>
		<description><![CDATA[I admit it, I&#8217;ve finally jumped on the Git bandwagon. After toying with SVN and Darcs, I was convinced when I saw a screen-cast about branching and merging and how it makes the kind of random, skitzo programming that I do very easy and very maintainable. I started using it at work to keep track [...]]]></description>
			<content:encoded><![CDATA[<p>I admit it, I&#8217;ve finally jumped on the <a href="http://git-scm.com/">Git </a>bandwagon. After toying with SVN and Darcs, I was convinced when I saw a screen-cast about branching and merging and how it makes the kind of random, skitzo programming that I do very easy and very maintainable. I started using it at work to keep track of some files as a test and finally bit the bullet and signed up for a <a href="http://github.com/ranok">GitHub account</a>. Once I had gotten setup, I made a few repositories to upload some code I had made for my high school senior project, code that I haven&#8217;t looked at in years and probably never will again. Then I decided to share something a bit more exciting, <a href="http://wikiwideweb.net/">Wiki Wide Web</a>&#8216;s bleeding edge source code. After some quick review to ensure I cleared the code of any hard coded passwords, I committed the source.</p>
<p>One thing I like about putting your code on a site like GitHub is that it guilts you into cleaning it up. If you hope that people are going to see it, then you feel slightly pushed to make an effort to clean it up. That pressure lead me to add some installation instructions and a make file for the Firefox extension, and clean up some code.</p>
<p>Peace and chow,</p>
<p>Ranok</p>
]]></content:encoded>
			<wfw:commentRss>http://www.r4n0k.com/2009/03/24/git-and-wiki-wide-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Black Hat DC Day 2</title>
		<link>http://www.r4n0k.com/2009/02/19/black-hat-dc-day-2/</link>
		<comments>http://www.r4n0k.com/2009/02/19/black-hat-dc-day-2/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 03:42:47 +0000</pubDate>
		<dc:creator>ranok</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[biometrics]]></category>
		<category><![CDATA[blackhat]]></category>
		<category><![CDATA[data mining]]></category>
		<category><![CDATA[dc]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[smartcards]]></category>
		<category><![CDATA[tor]]></category>

		<guid isPermaLink="false">http://www.r4n0k.com/?p=168</guid>
		<description><![CDATA[Now that I knew what I was in for, the second day of Black Hat DC took quite a bit less adjusting to, I felt more okay to skip parts of a presentation to chat was presenters, which I did after the Tor presentation. In the morning, Dan Kaminsky gave a brief review of the [...]]]></description>
			<content:encoded><![CDATA[<p>Now that I knew what I was in for, the second day of Black Hat DC took quite a bit less adjusting to, I felt more okay to skip parts of a presentation to chat was presenters, which I did after the Tor presentation.</p>
<p>In the morning, Dan Kaminsky gave a brief review of the DNS exploit he found last year, and the current status of the source port randomization patch. The estimate for patch coverage was about 60% of DNS servers, though the unpatched servers are being pretty actively exploited. He also clarified his stance on DNSSEC, that he&#8217;s neutral to the technology, but feels that it can provide end to end trust, something that DNSCurve cannot do, and has a higher chance of being accepted on the root since it doesn&#8217;t require pre-operation cryptography. A big implementation hurdle that he sees is for the deployment of DNSSEC servers to be turn-key and not require extra maintenance or knowledge to use.</p>
<p>The following presentation was an interesting one that provided a technical solution to a political problem, how to share data without compromising the data privacy, and without letting the data sharing knowing what is being searched for.</p>
<p>After that, a researcher from Vietnam showed how to break the facial recognition software built into laptops. Simply by taking a photo of the user, and editing it for proper lighting and tones. I got to be the lovely assistant in this presentation, enrolling my face into one of his laptops, then having him take my picture through a Skype chat, then using that picture to unlock the computer. This got the crowd laughing and very impressed with how this technology can actually sell.</p>
<p>The presentation on Tor did very little for me, the research was of marginal value, but the talk after with the presenter and the creator of Tor was eye opening. The most important thing I brought back from that talk was that <strong>Tor is not meant to protect you from big brother, but to keep you anonymous from the sites you are browsing, and your ISP</strong>. After I saw that shift, I was able to accept the many attacks that have come out of the woodwork over the past few years, and finally put Tor in the proper place in my cyber tool chest.</p>
<p>Finally, the memory snorting presentation was very slick, it seemed to be a very clever way to reuse the signature data already in existence, and be able to both analyze a saved memory dump, and also potentially find malicious code before it hits the wire.</p>
<p>Overall, the show was a blast, and I hope to have the privilege of attending sometime in the future.</p>
<p>Peace and chow,</p>
<p>Ranok</p>
]]></content:encoded>
			<wfw:commentRss>http://www.r4n0k.com/2009/02/19/black-hat-dc-day-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Black Hat DC Day 1</title>
		<link>http://www.r4n0k.com/2009/02/18/black-hat-day-1/</link>
		<comments>http://www.r4n0k.com/2009/02/18/black-hat-day-1/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 03:34:47 +0000</pubDate>
		<dc:creator>ranok</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[blackhat]]></category>
		<category><![CDATA[dc]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[intel txt]]></category>
		<category><![CDATA[satellite]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://www.r4n0k.com/?p=165</guid>
		<description><![CDATA[My first day at Black Hat was pretty neat, I learned quite a bit, and I had my expectations shifted around. Originally, I was expecting the presentations to be the core aspect of the conference, and everything else on the sidelines. I quickly learned that the presentations are just a small part of the greater [...]]]></description>
			<content:encoded><![CDATA[<p>My first day at Black Hat was pretty neat, I learned quite a bit, and I had my expectations shifted around. Originally, I was expecting the presentations to be the core aspect of the conference, and everything else on the sidelines. I quickly learned that the presentations are just a small part of the greater networking and information exchange going on.</p>
<p>The keynote was very interesting as it wasn&#8217;t technical in the least, but more a call for discourse about the tough questions that the country needs to ask about how the government and private sector need to work together to protect the country&#8217;s cyber resources. It also brought to light a question regarding cyber weapons, and who is responsible to clean up the online equivalent of a Katrina.</p>
<p>Moxie&#8217;s presentation on defeating HTTPS was interesting, but was more leveraging holes in other aspects of the network to gain control of an SSL tunnel. Why clever and very neat to see in action, it didn&#8217;t blow me away nor was it particularly ground breaking.</p>
<p>After Moxie&#8217;s talk, I spent a while chatting with <a href="http://www.doxpara.com/">Dan</a> about the advantages of DNSSEC versus DNSCurve and how take the strengths of each to find a happy medium. I hope to implement his suggestions into LadieBug (which he thought was a bad name to have &#8216;bug&#8217; in the name).</p>
<p>I left half way through the Mac OSX presentation since it was pretty useless. The presenter assumes you have access to a Mac and can run arbitrary code/modify binaries. From my perspective, one you&#8217;ve got that, the game is pretty much over.</p>
<p>After lunch I made my way to the packed room where the gang from the Invisible Things Lab talked about their TXT exploit. This was a highly anticipated talk, and I must say I personally was slightly disappointed. While their findings were interesting, due to their deal with Intel, they basically gave an overview of TXT and then talking about the Q35 hack in more detail, which is old news. Esentially, the summary of their findings were that TXT doesn&#8217;t check the SMM handler, and they disassembled the handler and found a number of bugs. The need for Dual Monitor Mode or an STM as they called it seems needed, but perhaps more eyes on the SMM handler code to help find bugs.</p>
<p>Hailing from AFIT, the speaker for the SecureQEMU project gave an overview of using emulation to encrypt and sign code that can&#8217;t be modified from the guest. While impressive that they managed to get it working on an unmodified OS, it was slow, and not a very complex concept.</p>
<p>Last, but not least was a just for fun talk on satellite hacking. This one had the room laughing for much of the hour while the speaker showed us a live demo of decoding a stream from a satellite over Africa. He then showed us how laughable the security in the RFID passports is, easily cloning and modifing his son&#8217;s passport to have Osama Bin Laden&#8217;s face, and doing a MitM attack using two $15 RFID readers/emulators.</p>
<p>That&#8217;s all for today, check back tomorrow for a review of the next set of briefings, and as always I&#8217;ll be updating regularly on <a href="http://twitter.com/ranok">Twitter</a>.</p>
<p>Peace and chow,</p>
<p>Ranok</p>
]]></content:encoded>
			<wfw:commentRss>http://www.r4n0k.com/2009/02/18/black-hat-day-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

