<?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>unstdio.org</title>
	<atom:link href="http://unstdio.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://unstdio.org</link>
	<description>Not your standard io.</description>
	<lastBuildDate>Fri, 10 Feb 2012 02:40:44 +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>keg.io V2 Development Begins&#8230;</title>
		<link>http://unstdio.org/hacking/keg-io-v2-development-begins/</link>
		<comments>http://unstdio.org/hacking/keg-io-v2-development-begins/#comments</comments>
		<pubDate>Fri, 10 Feb 2012 02:40:44 +0000</pubDate>
		<dc:creator>C4</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Kegerator]]></category>

		<guid isPermaLink="false">http://unstdio.org/?p=531</guid>
		<description><![CDATA[Well, It&#8217;s been a little while since I&#8217;ve worked on any projects that I could put up on unstdio.org. But the wait is over! I am officially starting a new project and it&#8217;s keg.io v2. When we built the hardware for keg.io last year it was a great achievement because I&#8217;d never done anything that [...]]]></description>
			<content:encoded><![CDATA[<p>Well, It&#8217;s been a little while since I&#8217;ve worked on any projects that I could put up on unstdio.org. But the wait is over! I am officially starting a new project and it&#8217;s keg.io v2. When we built the hardware for keg.io last year it was a great achievement because I&#8217;d never done anything that would be used by so many people. (Everyone at the Vivaki Nerve Center Seattle Office) But we haven&#8217;t really been able to put the time in the project that it deserves. So now we are going to do two projects at once. We got a sweet older pop machine that we also want to &#8220;technoligify&#8221;, so this will kill two birds with one stone.</p>
<p>The first couple posts of this project will be all hardware based. There is a bunch of new things to figure out since we have new ideas in mind for this. First we want to ditch the lame computer that the Arduino is connected to and move it &#8220;To the Cloud&#8221;! So we&#8217;re going wireless with the connection using <a href="http://www.sparkfun.com/products/9954" target="_blank">sparkfun&#8217;s wifly shield</a>. I haven&#8217;t played with this yet but <a href="http://twitter.com/crc" target="_blank">CRC</a> (aka &#8220;checksum&#8221;) bought a bunch of new stuff and the wifly shield was in there. The other thing we are going to do with this project is actually get real (badass) PCB&#8217;s made. We definitely need some cool branding of our own.</p>
<p><a href="http://unstdio.org/wp-content/uploads/2012/02/photo-4.jpg"><img class="aligncenter size-full wp-image-532" title="Arduino and Wifly" src="http://unstdio.org/wp-content/uploads/2012/02/photo-4.jpg" alt="" width="550" height="411" /></a></p>
<p>So the first thing I&#8217;m going to do is get this shield soldered up and start writing some code. So stay tuned and there will be some updates in the next couple days.</p>
<p>-C4</p>
]]></content:encoded>
			<wfw:commentRss>http://unstdio.org/hacking/keg-io-v2-development-begins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Friday.</title>
		<link>http://unstdio.org/uncategorized/friday/</link>
		<comments>http://unstdio.org/uncategorized/friday/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 23:02:40 +0000</pubDate>
		<dc:creator>C4</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://unstdio.org/?p=527</guid>
		<description><![CDATA[What&#8217;s a Friday with out Rebecca&#8230;http://www.youtube.com/watch?v=kfVsfOSbJY0 &#160; And and nice beer from keg.io &#160; &#160; &#160; &#160;]]></description>
			<content:encoded><![CDATA[<p>What&#8217;s a Friday with out Rebecca&#8230;<a href="http://www.youtube.com/watch?v=kfVsfOSbJY0">http://www.youtube.com/watch?v=kfVsfOSbJY0</a></p>
<p>&nbsp;</p>
<p>And and nice beer from keg.io</p>
<p><a href="http://unstdio.org/wp-content/uploads/2011/10/photo-2.jpg"><img class="aligncenter size-large wp-image-528" title="photo (2)" src="http://unstdio.org/wp-content/uploads/2011/10/photo-2-742x1024.jpg" alt="" width="580" height="800" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://unstdio.org/uncategorized/friday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>keg.io</title>
		<link>http://unstdio.org/hacking/keg-io/</link>
		<comments>http://unstdio.org/hacking/keg-io/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 17:46:35 +0000</pubDate>
		<dc:creator>C4</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://unstdio.org/?p=489</guid>
		<description><![CDATA[A few months ago (in March) a few guys from work and I thought it would be a great idea to get a kegerator for our office. It started out with brainstorming some pretty cool ideas. Being technology geeks we immediately decided that the kegerator needed and RFID reader to track who is drinking the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://unstdio.org/wp-content/uploads/2011/09/keg-io-logo.jpg"><img class="aligncenter size-full wp-image-493" title="keg-io-logo" src="http://unstdio.org/wp-content/uploads/2011/09/keg-io-logo.jpg" alt="" width="348" height="138" /></a></p>
<p>A few months ago (in March) a few guys from work and I thought it would be a great idea to get a kegerator for our office. It started out with brainstorming some pretty cool ideas. Being technology geeks we immediately decided that the kegerator needed and RFID reader to track who is drinking the keg. We did get some inspiration from the guys at yelp. (<a href="http://http://www.youtube.com/watch?v=BwVoir5HSo4">http://www.youtube.com/watch?v=BwVoir5HSo4</a>)</p>
<p>After we decided on the auth method we then moved to the question “Should people be allowed to pour beer if they don’t have a card?” of course we came to an unanimous “No!” decision. So the next thing that was decided on was putting in a (closed by default) solenoid. Third, we had the issue of trying to figure out how much beer was poured and how much was left. The way we saw it there were two main ways to accomplish this. One being we could measure the weight of the keg / kegerator and calculate the difference after each pour. The other was to measure the flow going through the line during a pour. We decided on the latter. We then got a hall-effect flow sensor to measure flow. Lastly, We also wanted to know the temp of the beer / kegerator so we decided to get a temp sensor and put it in there as well.</p>
<p>Here is some coding in the kitchen. (Yeah, that&#8217;s a shot.)</p>
<p><a href="http://unstdio.org/wp-content/uploads/2011/09/IMG_1322.jpg"><img class="aligncenter size-large wp-image-503" title="IMG_1322" src="http://unstdio.org/wp-content/uploads/2011/09/IMG_1322-e1315594117648-1007x1024.jpg" alt="" width="580" height="589" /></a></p>
<p>After everyone decided all of the things that we wanted to see on this thing, we needed to put it all together. I decided the easiest and fastest way was creating an Arduino shield and using an Arduino Duemilanove. I worked on most of the hardware stuff and getting it all working. Two of the other guys(Dylan and Chris) decided to use Node.js to write the application, which turned out to be pretty nice besides a few serial library issues.</p>
<p>Here is a little description of the hardware:</p>
<p><em>&#8220;Starting from the top, the Arduino is powered by a usb cable plugged into the source computer it is running with. The Arduino has a custom made &#8220;shield&#8221; that allows the Arduino talk to the other components in the system. The shield was made out of a RadioShack pcb that was cut to fit into an arduino  shield. The shield has 3 io &#8220;ports&#8221; on it. The first is the 12v power source input. This is needed to run the 12v solenoid that allows flow access through the line. The second ports communicates with the UART based Parallax RFID Reader. This is a basic 125Khz RFID reader talking at 2400 baud. The third port allows communication with the temp sensor, solenoid, and flow rate sensor. I used Cat5 cable for the connection between these components and the Arduino shield.&#8221;</em></p>
<p>Here is a list of the hardware components:</p>
<ul>
<li><strong>Nostalgia KRS-2100 Keg-O-Rator</strong></li>
<ul>
<li>Source: Amazon</li>
<li><a href="http://www.amazon.com/Nostalgia-KRS-2100-Refrigerated-Beverage-Dispenser/dp/B000HJVYDQ/ref=sr_1_3?ie=UTF8&amp;qid=1306257637&amp;sr=8-3">http://www.amazon.com/Nostalgia-KRS-2100-Refrigerated-Beverage-Dispenser/dp/B000HJVYDQ/ref=sr_1_3?ie=UTF8&amp;qid=1306257637&amp;sr=8-3</a></li>
</ul>
</ul>
<ul>
<li><strong>Parallax RFID Card Reader Serial</strong></li>
<ul>
<li>Source: Ebay</li>
<li><a href="http://www.parallax.com/tabid/768/ProductID/114/Default.aspx">http://www.parallax.com/tabid/768/ProductID/114/Default.aspx</a></li>
</ul>
<li><strong>Arduino Duemilanove</strong></li>
<ul>
<li>Source: Ebay</li>
<li><a href="http://www.arduino.cc/en/Main/ArduinoBoardDuemilanove">http://www.arduino.cc/en/Main/ArduinoBoardDuemilanove</a></li>
</ul>
<li><strong>G1/2 Water Flow sensor</strong></li>
<ul>
<li>Source: Seeedstudio</li>
<li><a href="http://www.seeedstudio.com/depot/g12-water-flow-sensor-p-635.html">http://www.seeedstudio.com/depot/g12-water-flow-sensor-p-635.html</a></li>
</ul>
<li><strong>1/4&#8243; Electric Solenoid Valve 12-volt</strong></li>
<ul>
<li>Source: Ebay</li>
</ul>
<li><strong>One Wire Digital Temperature Sensor – DS18B20</strong></li>
<ul>
<li>Source: Sparkfun</li>
<li><a href="http://www.sparkfun.com/products/245">http://www.sparkfun.com/products/245</a></li>
</ul>
</ul>
<div>Some Hardware pictures&#8230;</div>
<div><a href="http://unstdio.org/wp-content/uploads/2011/09/IMG_1367.jpg"><img class="aligncenter size-large wp-image-507" title="IMG_1367" src="http://unstdio.org/wp-content/uploads/2011/09/IMG_1367-1024x764.jpg" alt="" width="580" height="432" /></a></div>
<div> <a href="http://unstdio.org/wp-content/uploads/2011/09/IMG_1365.jpg"><img class="aligncenter size-large wp-image-506" title="IMG_1365" src="http://unstdio.org/wp-content/uploads/2011/09/IMG_1365-1024x764.jpg" alt="" width="580" height="432" /></a></div>
<p><a href="http://unstdio.org/wp-content/uploads/2011/09/IMG_1339-e1315594780817.jpg"><img class="aligncenter size-large wp-image-505" title="IMG_1339" src="http://unstdio.org/wp-content/uploads/2011/09/IMG_1339-e1315933556456-739x1024.jpg" alt="" width="580" height="803" /></a></p>
<p><a href="http://unstdio.org/wp-content/uploads/2011/09/photo6.jpg"><img class="aligncenter size-large wp-image-510" title="photo(6)" src="http://unstdio.org/wp-content/uploads/2011/09/photo6-1024x764.jpg" alt="" width="580" height="432" /></a></p>
<p><a href="http://unstdio.org/wp-content/uploads/2011/09/photo-1.jpg"><img class="aligncenter size-large wp-image-519" title="photo (1)" src="http://unstdio.org/wp-content/uploads/2011/09/photo-1-1024x764.jpg" alt="" width="580" height="432" /></a></p>
<p><strong>Software</strong>:</p>
<p>In the software side, as I mentioned earlier, we are using Node.js. Everything is open source and you can find it on github <a href="https://github.com/vnc/keg.io">https://github.com/vnc/keg.io</a>. Some cool features that we added to keg.io are twitter integration, and some gamification type badges we call &#8220;coasters&#8221;. A member of keg.io can earn these coasters by different drinking habits. One of the first badges a person will receive is the &#8220;Welcome Coaster&#8221; after drinking their first beer poured from the kegerator.</p>
<p><img class="aligncenter size-full wp-image-496" title="keg-io-welcome" src="http://unstdio.org/wp-content/uploads/2011/09/keg-io-welcome.jpg" alt="" width="157" height="218" /></p>
<p>So&#8230;I&#8217;ll explain how everything works. We have come up with a very simple communication protocol for communication between the Arduino and the host computer over serial. When the Arduino is started it initially grabs the temperature of the temp sensor and sends this data to the host computer. It will continue to do this every 10 seconds (adjustable) to allow close to real time temperature of the kegerator. Now we have an RFID card reader that is waiting for input from the user. When a card is scanned it grabs the card ID and sends that to the host computer for validation. If the card is not registered in the database, the application will display a denied message. (Don&#8217;t you even think about drinking from our Keg!)  If the card is registered and the user is valid the host computer sends back a request to the Arduino to open the solenoid and allow the user to pour beer. At this time the web ui displays a welcome message and shows a picture and information about the user pouring beer. Once the user starts to pour the beer, the flow is measured by the flow sensor and the flow rate is sent every second to the host computer which tracks the rates and calculates the amount of beer poured for that session. After 3 seconds of no flow rate the solenoid is closed and the next user can proceed to scan and repeat the process. What would a cool application like this be without twitter integration? After a user finishes his/her pour keg.io tweets about it. Check it out here: <a href="http://twitter.com/#!/keg_io">http://twitter.com/#!/keg_io</a></p>
<p>Here&#8217;s what keg.io looks like (at time of writing):</p>
<p>&nbsp;</p>
<p><a href="http://unstdio.org/wp-content/uploads/2011/09/keg-io.png"><img class="aligncenter size-full wp-image-512" title="keg-io" src="http://unstdio.org/wp-content/uploads/2011/09/keg-io.png" alt="" width="580" height="361" /></a></p>
<p>Thanks to the people that have contributed to the project:</p>
<ul>
<li>Dylan</li>
<li>Carl</li>
<li>Chris</li>
<li>Garrett</li>
</ul>
<div>-C4</div>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://unstdio.org/hacking/keg-io/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>toorcon: Seattle</title>
		<link>http://unstdio.org/uncategorized/toorcon-seattle/</link>
		<comments>http://unstdio.org/uncategorized/toorcon-seattle/#comments</comments>
		<pubDate>Sat, 09 Jul 2011 05:41:40 +0000</pubDate>
		<dc:creator>C4</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://unstdio.org/?p=470</guid>
		<description><![CDATA[I meant to write about this last week but have been pretty busy with some other projects I have been working on. I have to say I had a great time at toorcon Seattle this year. Props to David for getting this event all put together. There were definitely some good talks, which inspired me [...]]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } --><span style="font-family: Arial, sans-serif; color: #000000;">I meant to write about this last week but have been pretty busy with some other projects I have been working on. I have to say I had a great time at toorcon Seattle this year. Props to David for getting this event all put together.</span></p>
<p><a href="http://unstdio.org/wp-content/uploads/2011/06/photo-1.jpg"><img class="aligncenter size-large wp-image-473" title="photo (1)" src="http://unstdio.org/wp-content/uploads/2011/06/photo-1-980x1024.jpg" alt="" width="580" height="606" /></a></p>
<p><span style="font-family: Arial, sans-serif; color: #000000;">There were definitely some good talks, which inspired me to do a bit more poking around. The first one I want to mention was the talk titled “<span style="font-size: small;">Get Off of My Cloud: Cloud Credential Compromise and Exposure” This touched on amazon&#8217;s ec2 public AMI distribution and the security risks involved with using AMI&#8217;s not created by you. It brought up some interesting points and some issues that people may have overlooked. He mentioned that they have written some tools to “clean up” the AMI&#8217;s before sharing them out to the public. They didn&#8217;t release the scripts at the con and he mentioned that they weren&#8217;t publicly available yet so I went ahead an wrote some scripts (in bash) to look for the vulnerabilities when using an ami for the the first time, whether it a be a public ec2 AMI or an AMI that is put out by amazon.</span></span></p>
<p><img class="aligncenter size-large wp-image-474" title="photo (2)" src="http://unstdio.org/wp-content/uploads/2011/06/photo-2-1024x764.jpg" alt="" width="580" height="432" /></p>
<p><a href="http://unstdio.org/wp-content/uploads/2011/07/photo-6.jpg"><img class="aligncenter size-large wp-image-475" title="photo (6)" src="http://unstdio.org/wp-content/uploads/2011/07/photo-6-1024x797.jpg" alt="" width="580" height="451" /></a></p>
<p><span style="font-family: Arial, sans-serif; font-size: small; color: #000000;">The second talk that I found real interesting was the “We Are The Robots: Social Hacking With Bot Swarms” which talked about the connections made by users on twitter. They had a competition with bots on twitter to see what relationships bots can create between two other people and what information links them.</span></p>
<p><a href="http://unstdio.org/wp-content/uploads/2011/07/photo-5.jpg"><img class="aligncenter size-large wp-image-476" title="photo (5)" src="http://unstdio.org/wp-content/uploads/2011/07/photo-5-1024x738.jpg" alt="" width="580" height="418" /></a></p>
<p><a href="http://unstdio.org/wp-content/uploads/2011/07/photo-3.jpg"><img class="aligncenter size-large wp-image-478" title="photo (3)" src="http://unstdio.org/wp-content/uploads/2011/07/photo-3-1024x876.jpg" alt="" width="580" height="496" /></a></p>
<p><span style="font-family: Arial, sans-serif; color: #000000;"><span style="font-size: small;">The last talk I that was interesting </span><span style="font-size: small;">was “Highly concurrent Python for brute forcing and discovery”. I only have just started using python in some projects so this was a bit more advanced that I was used to but seriously great information. He talked about Python coroutines and epoll to build your own high performance brute forcing and discovery tools.</span></span></p>
<p><a href="http://unstdio.org/wp-content/uploads/2011/07/photo-4.jpg"><img class="aligncenter size-large wp-image-477" title="photo (4)" src="http://unstdio.org/wp-content/uploads/2011/07/photo-4-852x1024.jpg" alt="" width="580" height="697" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://unstdio.org/uncategorized/toorcon-seattle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make windows calls from linux.</title>
		<link>http://unstdio.org/os/make-windows-calls-from-linux/</link>
		<comments>http://unstdio.org/os/make-windows-calls-from-linux/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 21:15:27 +0000</pubDate>
		<dc:creator>C4</dc:creator>
				<category><![CDATA[OS]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Remote Access]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://unstdio.org/?p=466</guid>
		<description><![CDATA[I was recently taking a look a making remote calls from linux to a windows server. I found this nice little tool that makes this task pretty simple with winexe.  It&#8217;s basically like psexe but for linux. I was having problems getting version 0.80 working on some environments but v 0.90 seems to work on everything [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently taking a look a making remote calls from linux to a windows server. I found this nice little tool that makes this task pretty simple with <strong>winexe</strong>.  It&#8217;s basically like psexe but for linux. I was having problems getting version 0.80 working on some environments but v 0.90 seems to work on everything I have tried. (complied with a new version of glibc)  Here are the options.</p>
<p>winexe version 0.90This program may be freely redistributed under the terms of the GNU GPLUsage:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">winexe <span style="color: #7a0874; font-weight: bold;">&#91;</span>-?<span style="color: #000000; font-weight: bold;">|</span>--help<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>--usage<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>-d<span style="color: #000000; font-weight: bold;">|</span>--debuglevel DEBUGLEVEL<span style="color: #7a0874; font-weight: bold;">&#93;</span>       <span style="color: #7a0874; font-weight: bold;">&#91;</span>--debug-stderr<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>-s<span style="color: #000000; font-weight: bold;">|</span>--configfile CONFIGFILE<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>--option=<span style="color: #007800;">name</span>=value<span style="color: #7a0874; font-weight: bold;">&#93;</span>        <span style="color: #7a0874; font-weight: bold;">&#91;</span>-l<span style="color: #000000; font-weight: bold;">|</span>--log-basename LOGFILEBASE<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>--leak-report<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>--leak-report-full<span style="color: #7a0874; font-weight: bold;">&#93;</span>        <span style="color: #7a0874; font-weight: bold;">&#91;</span>-R<span style="color: #000000; font-weight: bold;">|</span>--name-resolve NAME-RESOLVE-ORDER<span style="color: #7a0874; font-weight: bold;">&#93;</span>        <span style="color: #7a0874; font-weight: bold;">&#91;</span>-O<span style="color: #000000; font-weight: bold;">|</span>--socket-options SOCKETOPTIONS<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>-n<span style="color: #000000; font-weight: bold;">|</span>--netbiosname NETBIOSNAME<span style="color: #7a0874; font-weight: bold;">&#93;</span>        <span style="color: #7a0874; font-weight: bold;">&#91;</span>-W<span style="color: #000000; font-weight: bold;">|</span>--workgroup WORKGROUP<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>--realm=REALM<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>-i<span style="color: #000000; font-weight: bold;">|</span>--scope SCOPE<span style="color: #7a0874; font-weight: bold;">&#93;</span>        <span style="color: #7a0874; font-weight: bold;">&#91;</span>-m<span style="color: #000000; font-weight: bold;">|</span>--maxprotocol MAXPROTOCOL<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>-U<span style="color: #000000; font-weight: bold;">|</span>--user <span style="color: #7a0874; font-weight: bold;">&#91;</span>DOMAIN\<span style="color: #7a0874; font-weight: bold;">&#93;</span>USERNAME<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">%</span>PASSWORD<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>        <span style="color: #7a0874; font-weight: bold;">&#91;</span>-N<span style="color: #000000; font-weight: bold;">|</span>--no-pass<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>--password=STRING<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>-A<span style="color: #000000; font-weight: bold;">|</span>--authentication-file FILE<span style="color: #7a0874; font-weight: bold;">&#93;</span>        <span style="color: #7a0874; font-weight: bold;">&#91;</span>-S<span style="color: #000000; font-weight: bold;">|</span>--signing on<span style="color: #000000; font-weight: bold;">|</span>off<span style="color: #000000; font-weight: bold;">|</span>required<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>-P<span style="color: #000000; font-weight: bold;">|</span>--machine-pass<span style="color: #7a0874; font-weight: bold;">&#93;</span>        <span style="color: #7a0874; font-weight: bold;">&#91;</span>--simple-bind-dn=STRING<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>-k<span style="color: #000000; font-weight: bold;">|</span>--kerberos STRING<span style="color: #7a0874; font-weight: bold;">&#93;</span>        <span style="color: #7a0874; font-weight: bold;">&#91;</span>--use-security-mechanisms=STRING<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>-V<span style="color: #000000; font-weight: bold;">|</span>--version<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>--uninstall<span style="color: #7a0874; font-weight: bold;">&#93;</span>        <span style="color: #7a0874; font-weight: bold;">&#91;</span>--reinstall<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>--system<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>--runas=<span style="color: #7a0874; font-weight: bold;">&#91;</span>DOMAIN\<span style="color: #7a0874; font-weight: bold;">&#93;</span>USERNAME<span style="color: #000000; font-weight: bold;">%</span>PASSWORD<span style="color: #7a0874; font-weight: bold;">&#93;</span>        <span style="color: #7a0874; font-weight: bold;">&#91;</span>--interactive=<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>--ostype=<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">//</span>host <span style="color: #7a0874; font-weight: bold;">command</span></pre></div></div>

<p>Apparently it&#8217;s maintained by Stuart Henderson, but it looks somewhat dead? The site link doesn&#8217;t work. (returns blank page) <a href="http://eol.ovh.org/winexe/">http://eol.ovh.org/winexe/</a></p>
<p>Some ways to use it:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">winexe <span style="color: #660033;">-U</span> DOMAIN<span style="color: #000000; font-weight: bold;">/</span>Username<span style="color: #000000; font-weight: bold;">%</span>Passwd <span style="color: #000000; font-weight: bold;">//</span>192.168.1.123 <span style="color: #ff0000;">&quot;ipconfig /all&quot;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">winexe <span style="color: #660033;">-U</span> DOMAIN<span style="color: #000000; font-weight: bold;">/</span>Username<span style="color: #000000; font-weight: bold;">%</span>Passwd <span style="color: #000000; font-weight: bold;">//</span>remote.com \
<span style="color: #ff0000;">'cmd /C net stop SomeService &amp;&amp; net start SomeService &amp;&amp; echo AutoUpdates service restarted'</span></pre></div></div>

<p>or get a shell,</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">winexe <span style="color: #660033;">-U</span> DOMAIN<span style="color: #000000; font-weight: bold;">/</span>Username<span style="color: #000000; font-weight: bold;">%</span>Passwd <span style="color: #000000; font-weight: bold;">//</span>remote.com <span style="color: #ff0000;">'cmd.exe'</span></pre></div></div>

<p>or use it to configure synergy,</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #007800;">OUT</span>=<span style="color: #ff0000;">'winexe -U MAIN/User%Pass --runas MAIN/UserB%Pass //your-other-comp &quot;ipconfig&quot;'</span>
<span style="color: #007800;">IP</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #007800;">$OUT</span> <span style="color: #000000; font-weight: bold;">|</span>  <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;IPv4&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #ff0000;">'print $14'</span><span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">`</span>
synergyc <span style="color: #007800;">$IP</span></pre></div></div>

<p>This site also has some more info on it: <a href="http://opensourceinfo.blogspot.com/2010/01/winexe.html">http://opensourceinfo.blogspot.com/2010/01/winexe.html</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://unstdio.org/os/make-windows-calls-from-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making remote server calls from PHP</title>
		<link>http://unstdio.org/uncategorized/making-remote-server-calls-from-php/</link>
		<comments>http://unstdio.org/uncategorized/making-remote-server-calls-from-php/#comments</comments>
		<pubDate>Wed, 25 May 2011 01:16:03 +0000</pubDate>
		<dc:creator>C4</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://unstdio.org/?p=463</guid>
		<description><![CDATA[I was doing some php scripting today and needed to call a remote server to see if it was running a certain process. It seems like a valid enough request. I spent some time looking into php&#8217;s exec() and system() functions to find a way to call ssh to login and run the command. I [...]]]></description>
			<content:encoded><![CDATA[<p>I was doing some php scripting today and needed to call a remote server to see if it was running a certain process. It seems like a valid enough request. I spent some time looking into php&#8217;s exec() and system() functions to find a way to call ssh to login and run the command. I kept running into the problem of the ssh session needing to be interactive. I started to look around for other options in php to ssh to remote machine and saw the SSH2 Manual. This was great but needed the ssh2 extension to be installed and in my case it wasn&#8217;t and I didn&#8217;t want to have to install additional software. I then found the phpseclib library which worked out great. It&#8217;s easy to use and worked right out of the box without any other software needed. Check it out: <a href="http://phpseclib.sourceforge.net/">http://phpseclib.sourceforge.net/</a></p>
<p>You can read the documentation on the site or use this simple test script to get it working.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Net/SSH2.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$passwd</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'sup3rs3cr3t'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$user</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'username'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$server</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'remoteserver.com'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$ssh</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Net_SSH2<span style="color: #009900;">&#40;</span><span style="color: #000088;">$server</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$ssh</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>login<span style="color: #009900;">&#40;</span><span style="color: #000088;">$user</span><span style="color: #339933;">,</span> <span style="color: #000088;">$passwd</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #990000;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Login Failed'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$who</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ssh</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>exec<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'whoami'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$who</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://unstdio.org/uncategorized/making-remote-server-calls-from-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php-cli awesomeness</title>
		<link>http://unstdio.org/uncategorized/php-cli-awesomeness/</link>
		<comments>http://unstdio.org/uncategorized/php-cli-awesomeness/#comments</comments>
		<pubDate>Mon, 23 May 2011 22:24:50 +0000</pubDate>
		<dc:creator>C4</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://unstdio.org/?p=452</guid>
		<description><![CDATA[I know, command line line php has been forever and it&#8217;s nothing new. I have been coding in php for over 5 years now but not until recently have I needed to use to use it for something more than web application development. In the past couple months I have been using the amazon AWS [...]]]></description>
			<content:encoded><![CDATA[<p><!-- p { margin-bottom: 0.08in; } -->I know, command line line php has been forever and it&#8217;s nothing new. I have been coding in php for over 5 years now but not until recently have I needed to use to use it for something more than web application development. In the past couple months I have been using the amazon AWS environment. There are a ton of tools built for AWS and a very good API but I have found some things that I have needed to do that arn&#8217;t made easy. One example is duplicating or copying an EC2 security group. Do to some infrastructure changes we wanted to duplicate an already existing security group with only minor changes. In our case the security group had a lot of custom firewall rules that would take too long to duplicate. So here is a script to copy EC2 groups:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;#######################<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Copy EC2 Security Group<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;#######################<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Enter security group you want to copy FROM: &quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$handle</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;php://stdin&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;r&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$grp1</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fgets</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$grp1</span> <span style="color: #339933;">=</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$grp1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Enter security group you want to copy TO: &quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$handle</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;php://stdin&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;r&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$grp2</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fgets</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$grp2</span> <span style="color: #339933;">=</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$grp2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;You are going to copy settings from &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$grp1</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; to &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$grp2</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; Is this correct? (y/n):&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$handle</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;php://stdin&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;r&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$response</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fgets</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$response</span> <span style="color: #339933;">=</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$response</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//echo $response;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$response</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'y'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Getting settings from &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$grp1</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;...<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$cmd</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;ec2-describe-group &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$grp1</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cmd</span><span style="color: #339933;">,</span> <span style="color: #000088;">$lines</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Copying group settings...<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$lines</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$line</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//echo $line.&quot;\n&quot;;</span>
&nbsp;
<span style="color: #000088;">$values</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$line</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//foreach($values as $value){</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//echo $value.&quot;\n&quot;;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//}</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">4</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">4</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;icmp&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #000088;">$cmd</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;ec2-authorize &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$grp2</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; -P icmp &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">6</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; -u &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; -o &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">11</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//echo $cmd;</span>
&nbsp;
<span style="color: #990000;">exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cmd</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">4</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;tcp&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">10</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #000088;">$cmd</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;ec2-authorize &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$grp2</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; -P tcp -p &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; -u &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; -o &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">11</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//echo $cmd.&quot;\n&quot;;</span>
&nbsp;
<span style="color: #990000;">exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cmd</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #000088;">$cmd</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;ec2-authorize &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$grp2</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; -P tcp -p &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; -s &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">9</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//echo $cmd.&quot;\n&quot;;</span>
&nbsp;
<span style="color: #990000;">exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cmd</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">4</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;udp&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">10</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #000088;">$cmd</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;ec2-authorize &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$grp2</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; -P udp -p &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; -u &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; -o &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">11</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//echo $cmd.&quot;\n&quot;;</span>
&nbsp;
<span style="color: #990000;">exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cmd</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #000088;">$cmd</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;ec2-authorize &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$grp2</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; -P udp -p &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; -s &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">9</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//echo $cmd.&quot;\n&quot;;</span>
&nbsp;
<span style="color: #990000;">exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cmd</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;quit&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">exit</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://unstdio.org/uncategorized/php-cli-awesomeness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shark Attack!</title>
		<link>http://unstdio.org/networking/shark-attack/</link>
		<comments>http://unstdio.org/networking/shark-attack/#comments</comments>
		<pubDate>Thu, 10 Feb 2011 18:16:41 +0000</pubDate>
		<dc:creator>C4</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Downlading]]></category>
		<category><![CDATA[Grooveshark]]></category>
		<category><![CDATA[Ripping]]></category>
		<category><![CDATA[Wireshark]]></category>

		<guid isPermaLink="false">http://unstdio.org/?p=435</guid>
		<description><![CDATA[First, I want to say that I am a big supporter of Grooveshark. I think it&#8217;s an awesome service and I have purchased merch from them. That being said, yesterday I started looking for a way to rip the songs from Grooveshark. It has been a while since I kept an up-to-date music collection. The [...]]]></description>
			<content:encoded><![CDATA[<p><!-- p { margin-bottom: 0.08in; }a:link {  } -->First, I want to say that I am a big supporter of Grooveshark. I think it&#8217;s an awesome service and I have purchased merch from them. That being said, yesterday I started looking for a way to rip the songs from Grooveshark. It has been a while since I kept an up-to-date music collection.</p>
<p>The files that are streamed to your computer are temporarily stored on your local machine. This means that we can save the packets that are being sent to your computer as an actual audio file. First, we need to use a network protocol analyzer that will allow us to find the packets being sent the to the computer. This is where Wireshark comes in. We can start by downloading Wireshark and installing it. (not going to show you that here) Once we have it running, it should look like this: (May need to run as root)</p>
<p><a href="http://unstdio.org/wp-content/uploads/2011/02/ws1.png"><img class="aligncenter size-full wp-image-436" title="ws1" src="http://unstdio.org/wp-content/uploads/2011/02/ws1.png" alt="" width="551" height="446" /></a></p>
<p>Next we need to configure some settings. Since we know that we are accessing Grooveshark through a web page is a good bet that they are pushing these packets over http. We will limit the filter to only capture port 80 traffic since that&#8217;s all we really care about right now. Set this up in Capture -&gt; Options. See below.</p>
<p><a href="http://unstdio.org/wp-content/uploads/2011/02/ws2.png"><img class="aligncenter size-full wp-image-437" title="ws2" src="http://unstdio.org/wp-content/uploads/2011/02/ws2.png" alt="" width="551" height="454" /></a></p>
<p>Now we can start the capture. Next go the the Grooveshark site and start playing a song. There will be a lot of packets showing up in your list. The main packet that you are looking for is one with a type of “audio/mpeg”.  You can also make this easier if you use this filter: http.content_type == &#8220;audio/mpeg&#8221;</p>
<p>If you use the filter method then you should only see one packet show up. It should look something like this:</p>
<p><a href="http://unstdio.org/wp-content/uploads/2011/02/ws4.png"><img class="aligncenter size-full wp-image-439" title="ws4" src="http://unstdio.org/wp-content/uploads/2011/02/ws4.png" alt="" width="550" height="395" /></a></p>
<p><a href="http://unstdio.org/wp-content/uploads/2011/02/ws3.png"><img class="aligncenter size-full wp-image-438" title="ws3" src="http://unstdio.org/wp-content/uploads/2011/02/ws3.png" alt="" width="550" height="441" /></a></p>
<p>Right click on the packet and choose follow tcp stream. This should assemble all the related packets and bring up a summary asking you what you would like to do with the packets. On the right hand side there will be some options for how you would like to save your stream content. Choose “Raw” and click the “Save As” button. You can now save the file as whateveryouwant.mp3. You can now go to the folder that you saved it in and play the file in your favorite music player. (May need to chmod the file if was downloaded by root.)</p>
<p><a href="http://unstdio.org/wp-content/uploads/2011/02/ws5.png"><img class="aligncenter size-full wp-image-440" title="ws5" src="http://unstdio.org/wp-content/uploads/2011/02/ws5.png" alt="" width="550" height="338" /></a></p>
<p><a href="http://unstdio.org/wp-content/uploads/2011/02/ws6.png"><img class="aligncenter size-full wp-image-441" title="ws6" src="http://unstdio.org/wp-content/uploads/2011/02/ws6.png" alt="" width="550" height="105" /></a></p>
<p>Note: I found someone who has done the same thing when I was looking how to save the stream. So I can not take 100% credit for this.</p>
<p>Also: I looked into writing something to automate this process but there is already another project that is doing this. Check out <a href="http://groovedown.tasteless.us/">http://groovedown.tasteless.us/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://unstdio.org/networking/shark-attack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple TV with Compact Flash</title>
		<link>http://unstdio.org/uncategorized/apple-tv-with-compact-flash/</link>
		<comments>http://unstdio.org/uncategorized/apple-tv-with-compact-flash/#comments</comments>
		<pubDate>Wed, 19 Jan 2011 22:11:01 +0000</pubDate>
		<dc:creator>C4</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://unstdio.org/?p=431</guid>
		<description><![CDATA[I have been pretty busy these past couple months. I got a new job working with the Amazon AWS environment which has kept me pretty busy. I tried this compact flash swap a month ago with poor results. I tried it again last weekend with a faster compact flash card which was a lot better. [...]]]></description>
			<content:encoded><![CDATA[<p><!-- p { margin-bottom: 0.08in; } -->I have been pretty busy these past couple months. I got a new job working with the Amazon AWS environment which has kept me pretty busy. I tried this compact flash swap a month ago with poor results. I tried it again last weekend with a faster compact flash card which was a lot better.</p>
<p>First I ordered a 2.5&#8221; ide 44pin to compact flash adapter and a Transcend 4gb 133 CF card. The read and write speeds on this card are terrible. I would not recommend this card for this purpose. They were listed on ebay as:</p>
<p>- CF Compact flash to 2.5&#8243; IDE 44 pin Adapter SSD ($8.99)</p>
<p>- TRANSCEND 4 GB Compact Flash Card Type 133X NEW ($14.94)</p>
<p>I later bought a “PixelFlash 4gb 400x” card. Although this was a no-name brand (at least to me) it worked pretty well. The read and write speeds were decent and are similar to the internal HDD. I swapped it into the Apple TV and I&#8217;m running a the Beta4 of the Openelec OS<a href="http://unstdio.org/wp-content/uploads/2011/01/photo2-e1295474791444.jpg"><img class="aligncenter size-full wp-image-433" title="photo(2)" src="http://unstdio.org/wp-content/uploads/2011/01/photo2-e1295474791444.jpg" alt="" width="580" height="776" /></a></p>
<p><a href="http://unstdio.org/wp-content/uploads/2011/01/photo2-e1295474791444.jpg"><br />
</a><a href="http://unstdio.org/wp-content/uploads/2011/01/photo.jpg"><img class="aligncenter size-full wp-image-432" title="photo" src="http://unstdio.org/wp-content/uploads/2011/01/photo-e1295475027843.jpg" alt="" width="580" height="776" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://unstdio.org/uncategorized/apple-tv-with-compact-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compact Flash Apple TV (SSD)</title>
		<link>http://unstdio.org/uncategorized/compact-flash-apple-tv-ssd/</link>
		<comments>http://unstdio.org/uncategorized/compact-flash-apple-tv-ssd/#comments</comments>
		<pubDate>Sun, 19 Dec 2010 08:17:44 +0000</pubDate>
		<dc:creator>C4</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://unstdio.org/?p=428</guid>
		<description><![CDATA[I have been recently been working closely with the guys from openelec. I have also been testing the builds on the apple tv and reporting bugs. I replaced the original 40gb apple drive with a spare 30gb dive I had laying around to install openelec on. If you are familiar with the 1st gen apple [...]]]></description>
			<content:encoded><![CDATA[<p>I have been recently been working closely with the guys from openelec. I have also been testing the builds on the apple tv and reporting bugs. I replaced the original 40gb apple drive with a spare 30gb dive I had laying around to install openelec on. If you are familiar with the 1st gen apple tv&#8217;s then you know about the heat they give off during normal use. Since I don&#8217;t store any media locally on the ATV, (stream from NAS) I have decided to try out a SSD setup.</p>
<p>I ordered a 44pin ide (2.5 hdd) to compact flash adapter along with a 4gb compact flash card. The adapter is nice because it has mounting holes in the same place as the 2.5in hdd. This will allow me to mount the the adapter in the same fashion as the original hard drive. I will post with some pictures and results on both heat and speed when I get it setup.</p>
]]></content:encoded>
			<wfw:commentRss>http://unstdio.org/uncategorized/compact-flash-apple-tv-ssd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

