<?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>/sarc</title>
	<atom:link href="http://slashsarc.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://slashsarc.com</link>
	<description>A how-to blog about technology and sarcasm.</description>
	<lastBuildDate>Mon, 14 Jan 2013 00:31:34 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Install Git 1.8.x on RHEL 5 and 6</title>
		<link>http://slashsarc.com/2013/01/install-git-1-8-x-on-rhel-5-and-6/</link>
		<comments>http://slashsarc.com/2013/01/install-git-1-8-x-on-rhel-5-and-6/#comments</comments>
		<pubDate>Sun, 13 Jan 2013 01:35:05 +0000</pubDate>
		<dc:creator>/sarc</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[1.8]]></category>
		<category><![CDATA[5]]></category>
		<category><![CDATA[6]]></category>
		<category><![CDATA[asciidoc]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[dependencies]]></category>
		<category><![CDATA[docbook]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[Enterprise Linux]]></category>
		<category><![CDATA[EPEL]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[OEL]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[RHEL5]]></category>
		<category><![CDATA[RHEL6]]></category>
		<category><![CDATA[RHN]]></category>
		<category><![CDATA[Scientific Linux]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[stackoverflow]]></category>
		<category><![CDATA[umask]]></category>
		<category><![CDATA[version]]></category>

		<guid isPermaLink="false">http://slashsarc.com/?p=554</guid>
		<description><![CDATA[If you are running RHEL 5, you may already know that Git is not located in the official RHN repositories. You can always install it from EPEL. However, EPEL contains an older version: 1.7.4.1 (at the time of this post). RHEL 6 has Git in the official RHN repositories, but, it&#8217;s based on Git 1.7.1. [...]]]></description>
				<content:encoded><![CDATA[<p>If you are running RHEL 5, you may already know that Git is not located in the official RHN repositories.  You can always install it from <a href="http://fedoraproject.org/wiki/EPEL" title="EPEL">EPEL</a>.  However, EPEL contains an older version: 1.7.4.1 (at the time of this post).  RHEL 6 has Git in the official RHN repositories, but, it&#8217;s based on Git 1.7.1.  For most users, this might be fine, however, if you have a need or want to use the latest and greatest version (or have everyone using the same version), then you will need to build the newer ones from source.</p>
<p><u><strong>The Problem:</strong></u></p>
<p>Installing version 1.8.x might seem as simple as downloading the source and running <code>make</code>. <i>(This post uses Git version 1.8.1 as the example.)</i> Unfortunately, building Git v. 1.8.x isn&#8217;t that simple on RHEL5, and I will explain why below:</p>
<p>After you download and extract the source code, there is an <code>INSTALL</code> file that outlines instructions on how to build Git.  According to that file, you would run the commands:</p>
<pre class="brush: text; gutter: true; first-line: 1; highlight: []; html-script: false">
	$ make prefix=/usr all doc info ;# as yourself
	# make prefix=/usr install install-doc install-html install-info ;# as root
</pre>
<p>Running this command on RHEL 5 will fail&#8230;But not because of the Git binaries.  It will fail when generating the documentation.  The problem is that the documentation needs to be built with <a href="http://www.methods.co.nz/asciidoc/">AsciiDoc</a>.  AsciiDoc is found in EPEL, but the version on EPEL is too old to properly build the Git documentation.  Even if you build the latest version of AsciiDoc, it still won&#8217;t work because it depends on a newer version of DocBook XML files. Unfortunately, the DocBook XML files on RHEL 5 are really, really old (<a href="http://git.661346.n2.nabble.com/Can-t-build-doc-anymore-v1-7-3-2-td5764059.html">Source</a>).</p>
<p>Thus, you cannot (easily) build the documentation on RHEL 5, <strong>BUT</strong>: you can still build Git and get the documentation!</p>
<p><u><strong>The Solution:</strong></u></p>
<p>The Git developers know that the documentation can be hard to install, so they provided a workaround to installing it.  Per the Git installation documentation:</p>
<pre class="brush: text; gutter: true; first-line: 1; highlight: []; html-script: false">
There are also &quot;make quick-install-doc&quot;, &quot;make quick-install-man&quot;
and &quot;make quick-install-html&quot; which install preformatted man pages
and html documentation. To use these build targets, you need to
clone two separate git-htmldocs and git-manpages repositories next
to the clone of git itself.
</pre>
<p>I will explain how to make this work.  But first, we need to build the Git binaries <i>without</i> the documentation packages.  So, run the command below while inside of the Git source directory to build Git:</p>
<pre class="brush: bash; gutter: true; first-line: 1; highlight: []; html-script: false">
$ make prefix=/usr all
$ sudo make prefix=/usr install
</pre>
<p><u><strong>**Notes for the above commands:</strong></u></p>
<ul class="instructions" style="margin-top: -10px">
<li>Do not run the first command as root.  Run this as your non-root user.</li>
<li>Git is cool in that you don&#8217;t need to run the <code>&#47;.configure</code> script, you just make it.</li>
<li>You ALWAYS need the prefix.  Don&#8217;t just run <code>make</code> in this case! (This is also true in the installation.)</li>
</ul>
<p>The above commands will compile and install Git.  As for dependencies, you will obviously need the build tools, <code>openssl</code>, <code>openssl-devel</code>, <code>libcurl</code>, <code>libcurl-devel</code>, <code>expat</code>, and <code>expat-devel</code>.  There may be one or two more, but this seems to work for me.  You can use <code>yum</code> to install them.  This works for both RHEL 5 and 6.</p>
<p>As of this point, you have the <code>git</code> binaries installed.  You can verify this by opening a terminal and running the command: <code>$ git version</code>.  It should return the version number of Git that you downloaded.  You are missing the <code>man</code> pages for Git, as well as the HTML documentation files.  I would highly recommend installing the <code>man</code> pages, but at this point, you can fully use Git.</p>
<p><u><strong>Installing Documentation:</strong></u></p>
<p>Having the <code>man</code> pages are very useful.  We&#8217;ll also install the HTML pages as well.  So, to install them, we are going to fetch the docs that are pre-made.  These are just text and HTML files; there is nothing special about them, but we need to move them into the appropriate directories so that they are useful.  </p>
<p>In the previous section, I pasted in instructions from the <code>INSTALL</code> file on how to do this.  However, if you are like me, you will find that really confusing.  In fact, I submitted a <a href="http://stackoverflow.com/questions/14250505/installing-git-documentation-packages-on-rhel-5">StackOverflow question about this</a>.  Fortunately, I figured it out and answered my own question.  For convenience, I have pasted the instructions below:</p>
<ol class="instructions">
<li>First, open a terminal, and <code>cd</code> to <i>the parent directory</i> of the directory containing the Git source code.  Meaning, if you are inside of the Git directory, simply run the: <code>$ cd ..&#47;</code> command.</li>
<li>Once directly outside of the Git source directory, you need to Git clone the repositories containing the documentation files (remember, we just installed Git!).  Do that by running:
<pre class="brush: bash; gutter: true; first-line: 1; highlight: []; html-script: false">
$ git clone git://git.kernel.org/pub/scm/git/git-manpages.git
$ git clone git://git.kernel.org/pub/scm/git/git-htmldocs.git
</pre>
<p>Now: Here is a REALLY GOOD QUESTION:<i>WHY</i> didn&#8217;t the author(s) of the documentation include these locations?  Seriously, WTF? I&#8217;m not psychic.  But whatever, I eventually found them&#8230;</li>
<li>Once you have the files downloaded, <code>cd</code> back into the Git source code directory, and run the EXACT commands below to install them:
<pre class="brush: bash; gutter: true; first-line: 1; highlight: []; html-script: false">
$ sudo make prefix=/usr quick-install-doc
$ sudo make prefix=/usr quick-install-html
</pre>
</li>
</ol>
<p>At this point, you can test this out by running the command: <code>$ man git</code>, and you should see a <code>man</code> page for Git.  If you can see the <code>man</code> pages, then congratulations!  You are done!</p>
<p><u><strong>!!SPECIAL NOTE TO RESTRICTED <code>umask</code> USERS!!</strong></u><br />
Many environments require the <code>umask</code> setting to be made more restrictive.  This is typical in many secure production environments.  This will cause a bit of a problem when installing the docs.  The problem is that although the files are installed, their permissions are set such that standard users do not have permission to see the <code>man</code> pages.  This can be fixed by running the following commands (as root!):</p>
<pre class="brush: bash; gutter: true; first-line: 1; highlight: []; html-script: false">
$ find /usr/share/man/man1 -type f -iname &quot;git*&quot; -exec chmod 644 {} \;
$ find /usr/share/man/man5 -type f -iname &quot;git*&quot; -exec chmod 644 {} \;
$ find /usr/share/man/man7 -type f -iname &quot;git*&quot; -exec chmod 644 {} \;

## If you installed the HTML docs as well, you need to do:
$ find /usr/share/doc/git-doc -type f -exec chmod 644 {} \;
$ find /usr/share/doc/git-doc -type d -exec chmod 755 {} \;
</pre>
<p>Remember, make sure those commands are run as root! That should fix any permission issues resultant from restrictive <code>umask</code> settings. </p>
]]></content:encoded>
			<wfw:commentRss>http://slashsarc.com/2013/01/install-git-1-8-x-on-rhel-5-and-6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Specify the Virtual NIC Name for KVM Bridged VM&#8217;s</title>
		<link>http://slashsarc.com/2012/12/specify-the-virtual-nic-name-for-kvm-bridged-vms/</link>
		<comments>http://slashsarc.com/2012/12/specify-the-virtual-nic-name-for-kvm-bridged-vms/#comments</comments>
		<pubDate>Sun, 30 Dec 2012 04:01:43 +0000</pubDate>
		<dc:creator>/sarc</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[6]]></category>
		<category><![CDATA[br0]]></category>
		<category><![CDATA[bridge]]></category>
		<category><![CDATA[Bridging]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[KVM]]></category>
		<category><![CDATA[libvirt]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[NIC]]></category>
		<category><![CDATA[qemu]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[Scientific Linux]]></category>
		<category><![CDATA[SL]]></category>
		<category><![CDATA[virsh]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[VM]]></category>
		<category><![CDATA[vnet]]></category>
		<category><![CDATA[vnet0]]></category>

		<guid isPermaLink="false">http://slashsarc.com/?p=527</guid>
		<description><![CDATA[When working with KVM bridged interfaces, KVM will automatically name the virtual NIC that is spawned when the VM is started. This typically follows a naming convention of: vnet0, vnet1, vnet2, ..., vnetN The virtual NIC names are dynamically applied to each VM instance.  Thus, a spawned VM is not guaranteed to receive the same [...]]]></description>
				<content:encoded><![CDATA[<p>When working with KVM bridged interfaces, KVM will automatically name the virtual NIC that is spawned when the VM is started. This typically follows a naming convention of:</p>
<p><code>vnet0, vnet1, vnet2, ..., vnetN</code></p>
<p>The virtual NIC names are dynamically applied to each VM instance.  Thus, a spawned VM is <em>not guaranteed</em> to receive the same virtual NIC when it is restarted.  Generally speaking, this may not be a problem.  However, what if you *need* to have a script, or some function whereby it is important to know which virtual NIC is allocated to a specific VM?  There are ways of scripting this, but to avoid the headaches of scripting, it may be helpful to just specify a fixed, hard-coded name on the generated virtual NIC of the VM.  To do this, you must use the <code>virsh</code> command line utility.</p>
<p>To implement this, follow the steps below as a user that has rights to use the <code>virsh</code> command:</p>
<ol class="instructions">
<li>Run the command: <code>virsh</code></li>
<li>At the <code>virsh</code> console, you need to type the command: <code>edit &lt;domain/VM Name&gt;</code> (substitute the name of your VM in here)</li>
<li>This will open up a <code>vi</code> like interface to edit the XML entries for your VM.  <strong>NOTE:</strong> <i>I am making the assumption that you are using a standard bridged setup.  I have not tested this with non-bridged setups, and especially not on libvirt managed bridged setups.  Thus, your mileage may vary.</i></li>
<li>Locate the XML entry for your network setup.  It should look something like this:
<pre class="brush: xml; gutter: true; first-line: 1; highlight: []; html-script: false">&lt;interface type=&#039;bridge&#039;&gt;
      &lt;mac address=&#039;00:11:22:33:44:55&#039;/&gt;
      &lt;source bridge=&#039;br0&#039;/&gt;
      &lt;model type=&#039;virtio&#039;/&gt;
      &lt;address type=&#039;pci&#039; domain=&#039;0x0000&#039; bus=&#039;0x00&#039; slot=&#039;0x03&#039; function=&#039;0x0&#039;/&gt;
    &lt;/interface&gt;
</pre>
<p>You need to add a line to the <code>interface</code> tag that looks like this:<br />
<code>&lt;target dev='the_name_of_your_nic'/&gt;</code>
<p />Note: the name of the NIC needs to be a valid interface name.  All lowercase and underscores work.  As an example, I named my VM&#8217;s virtual NIC&#8217;s to something like this: <br /> <code>vm1_net, vm2_net, vm3_net, ..., vmN_net</code>
</li>
<li>Once it&#8217;s entered, it should look something like this:
<pre class="brush: xml; gutter: true; first-line: 1; highlight: []; html-script: false">&lt;interface type=&#039;bridge&#039;&gt;
      &lt;mac address=&#039;00:11:22:33:44:55&#039;/&gt;
      &lt;source bridge=&#039;br0&#039;/&gt;
      &lt;target dev=&#039;vm1_net&#039;/&gt;
      &lt;model type=&#039;virtio&#039;/&gt;
      &lt;address type=&#039;pci&#039; domain=&#039;0x0000&#039; bus=&#039;0x00&#039; slot=&#039;0x03&#039; function=&#039;0x0&#039;/&gt;
    &lt;/interface&gt;
</pre>
</li>
<li>Save the changes and start the VM.</li>
</ol>
<p>Once everything is set, you should see something like this if you use the <code>ifconfig</code> command:</p>
<pre class="brush: bash; gutter: true; first-line: 1; highlight: []; html-script: false">
vm1_net   Link encap:Ethernet  HWaddr 00:11:22:33:44:55  
          inet6 addr: fe80::fc54:ff:fec7:11/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:468 (468.0 b)  TX bytes:468 (468.0 b)

vm2_net   Link encap:Ethernet  HWaddr 00:11:22:33:44:56  
          inet6 addr: fe80::fc54:ff:fec7:22/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:0 (0.0 b)  TX bytes:468 (468.0 b)
</pre>
<p>This guarantees that the VM will always start with the virtual NIC name that you specify.  In my case, I have VM1 using <code>vm1_net</code>, and VM2 using <code>vm2_net</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://slashsarc.com/2012/12/specify-the-virtual-nic-name-for-kvm-bridged-vms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable BitLocker Active Directory Dependency</title>
		<link>http://slashsarc.com/2012/05/disable-bitlocker-active-directory-dependency/</link>
		<comments>http://slashsarc.com/2012/05/disable-bitlocker-active-directory-dependency/#comments</comments>
		<pubDate>Sat, 19 May 2012 14:34:46 +0000</pubDate>
		<dc:creator>/sarc</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[7]]></category>
		<category><![CDATA[8]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[AD]]></category>
		<category><![CDATA[AD DS]]></category>
		<category><![CDATA[BitLocker]]></category>
		<category><![CDATA[drive encryption]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[gpedit]]></category>
		<category><![CDATA[group policy]]></category>
		<category><![CDATA[keys]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[R2]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[Server 2008]]></category>
		<category><![CDATA[store recovery information]]></category>
		<category><![CDATA[TPM]]></category>
		<category><![CDATA[Trusted Platform Module]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://slashsarc.com/?p=496</guid>
		<description><![CDATA[Let’s imagine that you have a Windows 7 system that was imaged.  Let’s imagine that the image is designed to easily connect to your infrastructure’s domain.  Let’s also imagine that you don’t want to add this particular system to your domain; you just want to use this system for a separate purpose, but save time [...]]]></description>
				<content:encoded><![CDATA[<p>Let’s imagine that you have a Windows 7 system that was imaged.  Let’s imagine that the image is designed to easily connect to your infrastructure’s domain.  Let’s also imagine that you don’t want to add this particular system to your domain; you just want to use this system for a separate purpose, but save time by using your primary Windows 7 image.  Let’s also imagine that you want this system to have BitLocker enabled.  Your system meet&#8217;s all of Microsoft’s <a href="http://technet.microsoft.com/en-us/library/ee449438(v=ws.10).aspx#BKMK_HSRequirements">BitLocker requirements</a>, but when you try to enable BitLocker, you get a nasty: <code>BitLocker could not contact the domain.  Ensure that you are connected to the network or contact your system administrator</code> error.</p>
<p>At this point, you have done a ton of research on how to turn off the Active Directory dependency for BitLocker, but have yet to find a solution.  Before you jump off the roof of your building, read below as I have your solution:</p>
<ol class="instructions">
<li>Open <code>gpedit.msc</code></li>
<li>Navigate to: <strong>Computer Configuration &gt; Administrative Templates &gt; System &gt; Trusted Platform Module Services</strong>.</li>
<li>Disable the setting: <code>Turn on TPM backup to Active Directory Domain Services</code>.  This is probably the evil setting that is causing you all the problems.  But, just in case, continue on to the steps below anyway.<br />
<img class="aligncenter size-full wp-image-515" style="border: 2px solid black;" title="Turn off TPM backup to Active Directory Domain Services" src="http://slashsarc.com/wp-content/uploads/2012/05/Number3-Selected.png" alt="" width="861" height="591" /></li>
<li>Navigate to: <strong>Computer Configuration &gt; Administrative Templates &gt; Windows Components &gt; BitLocker Drive Encryption</strong>.</li>
<li>Disable the setting: <code>Store BitLocker recovery information in Active Directory Domain Services (Windows Server 2008 and Windows Vista)</code>.<br />
<img class="aligncenter" style="border: 2px solid black;" title="Store BitLocker Info in Active Directory" src="http://slashsarc.com/wp-content/uploads/2012/05/Number4-Selected.png" alt="" width="859" height="544" /></li>
<li>You may need to disable 1 more setting.  Navigate to: <strong>Computer Configuration &gt; Administrative Templates &gt; Windows Components &gt; BitLocker Drive Encryption &gt; Operating System Drives</strong>.</li>
<li>Disable the setting: <code>Choose how BitLocker-protected operating system drives can be recovered</code>.<br />
<img class="aligncenter" style="border: 2px solid black;" title="Choose how BitLocker Protected Drives can be recovered..." src="http://slashsarc.com/wp-content/uploads/2012/05/Number6-Selected.png" alt="" width="863" height="616" /></li>
</ol>
<p>Once all those Group Policy settings are disabled, your non-domain connected PC should have no (AD related) problems setting up BitLocker.</p>
]]></content:encoded>
			<wfw:commentRss>http://slashsarc.com/2012/05/disable-bitlocker-active-directory-dependency/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Beware of gedit</title>
		<link>http://slashsarc.com/2011/10/beware-of-gedit/</link>
		<comments>http://slashsarc.com/2011/10/beware-of-gedit/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 02:19:17 +0000</pubDate>
		<dc:creator>/sarc</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[annoyance]]></category>
		<category><![CDATA[carriage]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[character]]></category>
		<category><![CDATA[characters]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[gedit]]></category>
		<category><![CDATA[kate]]></category>
		<category><![CDATA[kwrite]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[not working]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[return]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[vi]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://slashsarc.com/?p=451</guid>
		<description><![CDATA[I love using gedit to make changes to config files in Linux. However, I have recently encountered some odd issues where config files that I edit using gedit just don&#8217;t work properly. However, making the exact same changes with vi or vim does not have any issues. Looking at both files (one edited with gedit, the [...]]]></description>
				<content:encoded><![CDATA[<p>I love using <code>gedit</code> to make changes to config files in Linux. However, I have recently encountered some odd issues where config files that I edit using <code>gedit</code> just don&#8217;t work properly. However, making the exact same changes with <code>vi</code> or <code>vim</code> does not have any issues.</p>
<p>Looking at both files (one edited with <code>gedit</code>, the other with <code>vim</code>), they look exactly the same&#8230;so I thought. Apparently, <code>gedit</code> likes to add a <code>\r</code> (carriage return) to the end of some lines. This is a hidden character, so if you open the file with <code>gedit</code>, or <code>vi/vim</code>, you won&#8217;t see it. However, this hidden character can cause a very nasty side effect to your config files in that some applications will not properly parse the file. As a result, your application (or OS) will not work (<em>talk about a great way to perform a nasty DoS attack</em>).</p>
<p>This is the type of problem that will make you pull your hair out trying to solve. So, the solution? Either use <code>vi/vim</code> or <code>nano</code>. If you use <code>gedit</code>, make sure you do a find and replace where you want to find &#8220;<code>\r</code>&#8221; and leave the replace textbox blank. This will remove all instances of <code>\r</code>. Your file will &#8220;look&#8221; exactly the same, however, you eliminated that pesky hidden carriage return character causing all the problems.</p>
<p><em>You&#8217;re Welcome!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://slashsarc.com/2011/10/beware-of-gedit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RHEL 6 Login Banners</title>
		<link>http://slashsarc.com/2011/07/rhel-6-login-banners/</link>
		<comments>http://slashsarc.com/2011/07/rhel-6-login-banners/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 00:26:51 +0000</pubDate>
		<dc:creator>/sarc</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[5]]></category>
		<category><![CDATA[6]]></category>
		<category><![CDATA[banner]]></category>
		<category><![CDATA[Cent]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Enterprise]]></category>
		<category><![CDATA[gdm]]></category>
		<category><![CDATA[gtk]]></category>
		<category><![CDATA[kdm]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[RHEL5]]></category>
		<category><![CDATA[RHEL6]]></category>
		<category><![CDATA[Scientific]]></category>
		<category><![CDATA[Scientific Linux]]></category>
		<category><![CDATA[SL]]></category>
		<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[VM]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[warning]]></category>

		<guid isPermaLink="false">http://slashsarc.com/?p=380</guid>
		<description><![CDATA[Login banners are simply a requirement for enterprise and government computer systems. In RHEL 6, modifying the gdm login theme to display the banner is rather difficult, since they removed the GUI to modify the login theme. However, there is a solution: One way to present the login banner is to create a pop-up dialog box with [...]]]></description>
				<content:encoded><![CDATA[<p>Login banners are simply a requirement for enterprise and government computer systems. In RHEL 6, modifying the gdm login theme to display the banner is rather difficult, since they removed the GUI to modify the login theme. However, there is a solution:</p>
<p>One way to present the login banner is to create a pop-up dialog box with the login banner text inside of it. This dialog will appear as soon as the X-Server loads and before the user is prompted to enter in a username and password. Thus, it meets the requirement of the user seeing the dialog before login.</p>
<p><strong>How to do it:</strong></p>
<p>For this, we will make use of <a href="http://en.wikipedia.org/wiki/Zenity">zenity</a>. Zenity is a console command that displays popup messages. However, before we display the popup, we need to create a file with the login banner text.</p>
<ol class="instructions">
<li>Create a text file to hold the login banner text. To demonstrate this, I have created a text file called &#8220;<code>login_banner.txt</code>&#8221; with some sample login banner text:<br />
<img class="aligncenter size-full wp-image-383" style="max-width: 100%;" title="Login_Banner_Text" src="http://slashsarc.com/wp-content/uploads/2011/07/Login_Banner_Text.png" alt="" /></li>
<li>Once you have created your login banner text file, you should move it to some global location where anyone can read the file. I would suggest <code>/opt</code>.</li>
<li>The next step is to tell GDM to show the banner before a user logs in. To do this, you will need to (as <code>root</code>) modify the <code>/etc/gdm/Init/Default</code> file. Towards the bottom of the file (before the <code>exit 0</code>), paste in the command:
<pre class="brush: shell; gutter: true; first-line: 1; highlight: []; html-script: false">## Display a login banner:
zenity --text-info --filename=/PATH/TO/LOGIN_BANNER_FILE.TXT --width=NUM --height=NUM --title=&quot;LOGIN WARNING&quot;</pre>
<p>For example, here is what my <code>/etc/gdm/Init/Default</code> file looks like:<br />
<img class="aligncenter size-full wp-image-406" title="GDM_Default _File" src="http://slashsarc.com/wp-content/uploads/2011/07/GDM_Default-_File.png" alt="" /></li>
<li>Save the file, and you are done!</li>
</ol>
<p>If done properly, you should see something like this when you try to log in:<br />
<img class="aligncenter size-full wp-image-439" title="Login_Banner_Screenshot" src="http://slashsarc.com/wp-content/uploads/2011/07/Login_Banner_Screenshot.png" alt="" /></p>
<p>As a sidenote, if you &#8220;switch user&#8221;, the banner is also properly displayed. There are several other options you can use for the window&#8217;s size, buttons, etc. You can just play around with the zenity command in the Init/Default file to find the options that best suits your needs.</p>
<p>This should really be documented on Red Hat&#8217;s site, since RHEL is an industry standard OS, and login banners <strong>*are*</strong> an industry requirement.</p>
]]></content:encoded>
			<wfw:commentRss>http://slashsarc.com/2011/07/rhel-6-login-banners/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>VirtualBox Bridged Networking Driver Problems</title>
		<link>http://slashsarc.com/2011/07/virtualbox-bridged-networking-driver-problems/</link>
		<comments>http://slashsarc.com/2011/07/virtualbox-bridged-networking-driver-problems/#comments</comments>
		<pubDate>Tue, 05 Jul 2011 22:49:24 +0000</pubDate>
		<dc:creator>/sarc</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[7]]></category>
		<category><![CDATA[Box]]></category>
		<category><![CDATA[bridge]]></category>
		<category><![CDATA[bridged]]></category>
		<category><![CDATA[driver]]></category>
		<category><![CDATA[ethernet]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[NIC]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[Virtual]]></category>
		<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[VM]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://slashsarc.com/?p=365</guid>
		<description><![CDATA[For most people this will not be an issue, however, there are a few individuals who are exhibiting network problems when using the VirtualBox Bridged Networking driver on the *host* machine. The Problem: The problem is that some systems running Windows 7 with the &#8220;VirtualBox Bridged Networking&#8221; driver installed will have network outage issues when [...]]]></description>
				<content:encoded><![CDATA[<p>For most people this will not be an issue, however, there are a few individuals who are exhibiting network problems when using the VirtualBox Bridged Networking driver on the *host* machine.</p>
<p><strong>The Problem:</strong></p>
<p>The problem is that some systems running Windows 7 with the &#8220;VirtualBox Bridged Networking&#8221; driver installed will have network outage issues when resuming the system from hibernation.  The only way to fix this is the either reboot the machine, or disable/enable the NIC.</p>
<p>This bug has been reported here: <a href="http://www.virtualbox.org/ticket/4677">http://www.virtualbox.org/ticket/4677</a>, but it doesn&#8217;t seem like it will ever be fixed <img src='http://slashsarc.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p><strong>The <em>temporary</em> solution:</strong></p>
<p>Until Oracle gets around to fixing this bug, the following instructions below will correct the problem.  <em><strong>Do note</strong></em>, following the steps below will disable the bridged networking feature of VirtualBox.  However, utilizing this method gives you a simple avenue to re-enable it if you need to use it.</p>
<ol class="instructions">
<li>Click the Start Menu / Start Orb.</li>
<li>Type: &#8220;View network connections&#8221;</li>
<li>Press Enter.</li>
<li>A window should appear with a list of all the network devices attached to your system.</li>
<li>Right click the adapter that is giving you a problem &gt; Properties</li>
<li>Uncheck &#8220;VirtualBox Bridged Networking Driver&#8221;<br />
<img class="alignnone size-full wp-image-369" title="VirtualBox Bridged Networking Driver Unchecked" src="http://slashsarc.com/wp-content/uploads/2011/07/VirtualBoxBridgedNetworkingDriverSelected.png" alt="" width="377" height="474" /></li>
<li>Click OK, and you&#8217;re all set.</li>
</ol>
<p>To enable the feature after it is disabled utilizing this method, follow the instructions above in reverse.</p>
<p>Alternatively, you can also just opt out of installing the VirtualBox Bridged Networking driver altogether.  However, doing so will not allow you to easily enable that great feature.</p>
]]></content:encoded>
			<wfw:commentRss>http://slashsarc.com/2011/07/virtualbox-bridged-networking-driver-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stock Android Please&#8230;</title>
		<link>http://slashsarc.com/2011/06/stock-android-please/</link>
		<comments>http://slashsarc.com/2011/06/stock-android-please/#comments</comments>
		<pubDate>Wed, 29 Jun 2011 02:10:34 +0000</pubDate>
		<dc:creator>/sarc</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[HTC]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[launcher]]></category>
		<category><![CDATA[Launcher Pro]]></category>
		<category><![CDATA[LG]]></category>
		<category><![CDATA[motorblur]]></category>
		<category><![CDATA[Motorola]]></category>
		<category><![CDATA[nexus]]></category>
		<category><![CDATA[OEM]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[pro]]></category>
		<category><![CDATA[Samsung]]></category>
		<category><![CDATA[sense]]></category>
		<category><![CDATA[skin]]></category>
		<category><![CDATA[stock]]></category>
		<category><![CDATA[tablet]]></category>
		<category><![CDATA[touchwiz]]></category>

		<guid isPermaLink="false">http://slashsarc.com/?p=347</guid>
		<description><![CDATA[I think I have fully made up my mind that my next Android phone will be a Google Nexus device. The Nexus devices offer something that no other Android phones on the market offer: a clean, stock, the way Google wanted it to be device that receives timely updates as soon as they are available. [...]]]></description>
				<content:encoded><![CDATA[<p>I think I have fully made up my mind that my next Android phone will be a Google Nexus device. The Nexus devices offer something that no other Android phones on the market offer: a clean, stock, <em>the way Google wanted it to be</em> device that receives timely updates as soon as they are available. You don&#8217;t have to worry about terrible pre-loaded skins that completely bog down even the fastest devices on the market, as well as the lack of uninstallable bloatware that has unfortunately reared its ugly head onto these very expensive devices.</p>
<p><strong>Manufacturer Android Skins</strong></p>
<p>Android device manufactures, such as Motorola, HTC, Samsung, and LG (henceforth known as &#8220;the OEM&#8217;s&#8221;) all modify the version of Android that come pre-installed with their phones. They all put their own UI on top of Android to &#8220;enhance the experience of Android&#8221;, &#8220;add more features&#8221;, and lastly (<em>but most importantly</em>), &#8220;differentiate themselves from the competition&#8221;. The OEM&#8217;s all have their own unique skins, such as MotorBlur, Sense, and TouchWiz.</p>
<p><strong>The Problem:</strong></p>
<p>On the surface, these look like simple, flashy skins. However, they have become much more than that. Originally, that&#8217;s all they were, skins/launchers. If you wanted to &#8220;remove&#8221; MotorBlur, or Sense, etc., you would just install a different launcher app (such as Launcher Pro). However, they have since evolved to be more than just a skin. They now deeply embed hidden background processes into Android that consume RAM, CPU, and worse yet &#8211; battery life. Thus, simply installing Launcher Pro will not fix the problem.</p>
<p><strong>But how can they differentiate themselves if they are all running the same OS?</strong></p>
<p>Simple&#8230;by making great hardware. When someone buys a phone, one of the first things they look at is the hardware. They look at the size of the screen, the thickness, the build quality, the presence (or lack of presence) of a physical qwerty keyboard, the weight, the color, the carrier the phone is on, the battery life, the call quality, the screen quality, internal storage, SD card availability, camera quality, presence of front-facing camera, etc. Those are all *incredibly* important factors of a device. 100% of those are areas that the OEM&#8217;s have the complete expertise on innovating and differentiating themselves on. You can pretty much look at any Android phone and immediately tell who makes it by just looking at the way it&#8217;s built. *THIS* is where they should be differentiating themselves on.</p>
<p>The OEM&#8217;s are not software experts. If they were, they wouldn&#8217;t be using Android. They would instead have made their own OS from scratch. Google made a great mobile OS; one that can compete with the iPhone. That is why they are using it. In my very honest opinion, the OEM&#8217;s lost their ability to differentiate themselves in the software space by adopting an external OS. How many people do you know say &#8220;I can&#8217;t wait to get that MotorBlur phone!&#8221;? The answer is 0. People want an <em>Android</em> phone. They want to own a device that is part of the Android ecosystem, not a device that tries to invent its own platform.</p>
<p>The quicker the OEM&#8217;s realize that, the better off they will be.</p>
]]></content:encoded>
			<wfw:commentRss>http://slashsarc.com/2011/06/stock-android-please/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Security+ Certification</title>
		<link>http://slashsarc.com/2011/03/security-certification/</link>
		<comments>http://slashsarc.com/2011/03/security-certification/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 21:36:57 +0000</pubDate>
		<dc:creator>/sarc</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://slashsarc.com/?p=301</guid>
		<description><![CDATA[I recently received my CompTIA Security+ ce certification (SY0-201), and like my A+ certification post, below is my experience with the Security+ exam: Study Materials: To study for the Security+ exam, I used the following three resources: CompTIA Security+: Get Certified Get Ahead: SY0-201 Study Guide Mike Meyers&#8217; CompTIA Security+ Certification Passport, Second Edition (Mike [...]]]></description>
				<content:encoded><![CDATA[<p>I recently received my CompTIA Security+ ce certification (SY0-201), and like my <a href="http://slashsarc.com/2011/02/a-certification-tips/">A+</a> certification post, below is my experience with the Security+ exam:</p>
<p><strong>Study Materials:</strong></p>
<p>To study for the Security+ exam, I used the following three resources:</p>
<ol class="instructions">
<li><a href="http://www.amazon.com/CompTIA-Security-Certified-Ahead-SY0-201/dp/1439236364/ref=sr_1_3?s=books&amp;ie=UTF8&amp;qid=1301085164&amp;sr=1-3">CompTIA Security+: Get Certified Get Ahead: SY0-201 Study Guide</a></li>
<li><a href="http://www.amazon.com/Meyers-CompTIA-Security-Certification-Passport/dp/0071601236/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1301085267&amp;sr=1-1">Mike Meyers&#8217; CompTIA Security+ Certification Passport, Second Edition (Mike Meyers&#8217; Certification Passport)</a></li>
<li><a href="http://www.measureup.com/CompTIA-Security-C228.aspx">MeasureUp Security+ Practice Test Questions</a></li>
</ol>
<p>Unlike my A+ exam, I did take a 1-week bootcamp training course.  I simply read the materials and reviewed all the practice questions.  Really, that was it.</p>
<p>The first book mentioned above is very good.  It covers the primary areas of the exam very nicely.  The language of the book is well written, and very descriptive.  There were a few errors in the text; however, there is an errata page online with the corrected information.  The book also contains a lot of practice questions, which are always very helpful.  Unfortunately, the practice questions are not on an accompanying CD-ROM, so you will be doing a lot of page-flipping back and forth between the answers and the original questions when you do your review.  This is certainly not a deal breaker, but just something to keep in mind.</p>
<p>The Passport book mentioned in item number 2 above was only used as a quick review.  I didn&#8217;t read the whole thing, since the first book covered most of the material very well.  I would recommend doing the practice questions in the book and reviewing any answer you get wrong in the residing chapter.  I found that to be very helpful at reviewing material you may have missed.  This book also contains an accompanying CD-ROM with extra practice questions, and allows you to obtain 50 more free questions if you register on the publisher&#8217;s site.  The questions are pretty good and are helpful in your review.</p>
<p>The last study aid was the MeasureUp test questions.  I also used their practice questions to study for A+, and I found them to be very effective.  The same is also true for Security+.  Generally speaking, practice questions are perhaps the best study tool for taking a certification exam, as they help you get a feel for the type of questions you will encounter.</p>
<p><strong>The Test:</strong></p>
<p>The test itself was quite fair.  Many questions were easy, but many were also tricky.  In the end, I did very well on the exam and the material referenced was of great assistance.</p>
<p>Unfortunately, the one area that the material above did not cover as much as I would have liked it to was Digital Forensics.  Make sure you know the <em>process </em>of responding to a security incident and also inform yourself on some of the tools used.  That is fair game for the test.</p>
<p>Good Luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://slashsarc.com/2011/03/security-certification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A+ Certification Tips</title>
		<link>http://slashsarc.com/2011/02/a-certification-tips/</link>
		<comments>http://slashsarc.com/2011/02/a-certification-tips/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 19:51:52 +0000</pubDate>
		<dc:creator>/sarc</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[A+]]></category>
		<category><![CDATA[certification]]></category>
		<category><![CDATA[CompTIA]]></category>
		<category><![CDATA[Element K]]></category>
		<category><![CDATA[essentials]]></category>
		<category><![CDATA[exam]]></category>
		<category><![CDATA[Kaplan]]></category>
		<category><![CDATA[MeasureUp]]></category>
		<category><![CDATA[Meyers]]></category>
		<category><![CDATA[Passport]]></category>
		<category><![CDATA[practical]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://slashsarc.com/?p=285</guid>
		<description><![CDATA[I received my CompTIA A+ Certification in December of 2010, and I would just like to share some of my experiences with the exam, and some recommendations for study materials.  The CompTIA A+ exam was in two parts: The CompTIA A+ Essentials (220-701), and the CompTIA A+ Practical Application (220-702). Study Materials: I used several [...]]]></description>
				<content:encoded><![CDATA[<p>I received my CompTIA A+ Certification in December of 2010, and I would just like to share some of my experiences with the exam, and some recommendations for study materials.  The CompTIA A+ exam was in two parts: The CompTIA A+ Essentials (220-701), and the CompTIA A+ Practical Application (220-702).</p>
<p><strong>Study Materials:</strong></p>
<p>I used several methods to study for the exam.  Luckily, my employer paid for me to take a 1-week A+ Training Bootcamp course.  This is simply a 1-week classroom course with an instructor who goes over the main areas covered in the A+ exam (you can Google search for the objectives, or purchase a training book which will usually list them).</p>
<p>With the course, we were provided some book materials.  In particular, we were provided with <a href="http://www.elementk.com/products/certification/comptia/aplus-certification">Element K</a> A+ study materials, as well as <a href="http://www.amazon.com/Meyers-Certification-Passport-Third-Certficiation/dp/0072263083/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1296674636&amp;sr=8-1"><em>Mike Meyers&#8217; A+ Certification Passport, Third Edition</em></a> (over time, the editions will change).  In addition to the book materials, we were also provided with access to sample questions.  We had access to both <a href="http://www.kaplan.com/pages/default.aspx">Kaplan</a> and <a href="http://www.measureup.com/">MeasureUp </a>test questions.</p>
<p>In the end, I felt that the classroom course was not needed.  Yes, <em><strong>you can pass the A+ exams without the classroom course!</strong></em></p>
<p><strong>What you need to pass:</strong></p>
<p>Honestly, the book materials and sample test questions are all you really need.  Of the two books, Meyers&#8217;s book was the best.  In fact, for me and my colleagues who also took the exam, the Meyer&#8217;s book was outstanding.  The best part about his book was that it contained exactly what you needed to know.  Everything was nicely explained and to the point.  The accompanying CD with the book also contains very good test practice questions.</p>
<p>The Element K books basically just contain a lot of information.  They will teach you a lot about computers; however, as extensive as those books are, they simply will not help you pass the exam.  They don&#8217;t really help you tackle the questions that are asked on the test.</p>
<p>Passing the exam is more than just knowing a lot about computers.  You need to understand how to answer the questions they ask.  By and large, the questions asked were very straight-forward.  However, there are some questions that can easily throw you off if you are not careful. The only real way to familiarize yourself with the test questions is to do lots of sample questions, over and over again.</p>
<p>With regards to test questions, I highly recommend MeasureUp&#8217;s exam questions.  They were up to date, realistic, plentiful, and mostly accurate (more on this below).  I can&#8217;t say the same for Kaplan.  Kaplan&#8217;s sample questions were unrealistically difficult, very outdated, and worst of all, contained a lot of obviously incorrect answers.  Did I say outdated?  One of the Kaplan questions was in regards to the upgradability of Windows 3.1x!  (You will not get questions older than XP)</p>
<p>Unfortunately, not all sample questions are accurate.  MeasureUp&#8217;s were pretty good, but you may find a small hand few that are wrong.  Kaplan had way too many mistakes to keep track of.  Obviously, if the answers are wrong, you can&#8217;t rely on them for help.</p>
<p><strong>In Short:</strong></p>
<p>Completing practice questions repeatedly along with reading Meyers book for me was enough to successfully pass both exams.</p>
<p>P.S. Make sure you know the full operation of laser printers.  They are fair game on the exams!</p>
]]></content:encoded>
			<wfw:commentRss>http://slashsarc.com/2011/02/a-certification-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solution for Viewing Blocked Media Content on Flash 10.1 Devices?</title>
		<link>http://slashsarc.com/2010/11/solution-for-viewing-blocked-media-content-on-flash-10-1-devices/</link>
		<comments>http://slashsarc.com/2010/11/solution-for-viewing-blocked-media-content-on-flash-10-1-devices/#comments</comments>
		<pubDate>Mon, 29 Nov 2010 16:01:23 +0000</pubDate>
		<dc:creator>/sarc</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Player]]></category>
		<category><![CDATA[Fox]]></category>
		<category><![CDATA[GET]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[Hulu]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[NBC]]></category>
		<category><![CDATA[packet sniffing]]></category>
		<category><![CDATA[Playstation 3]]></category>
		<category><![CDATA[Privoxy]]></category>
		<category><![CDATA[PS3]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[Sony]]></category>
		<category><![CDATA[Squid]]></category>
		<category><![CDATA[TCP]]></category>
		<category><![CDATA[TcpCatcher]]></category>
		<category><![CDATA[Wii]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Wireshark]]></category>

		<guid isPermaLink="false">http://slashsarc.com/?p=236</guid>
		<description><![CDATA[Recently, an increasing number of media companies have been blocking access to Flash 10.1 content on non-PC devices (i.e. Android Phones, Google TV, PS3, etc.).  The reasoning for this makes no sense as I can plug my laptop into my TV and watch sites like Hulu, Fox.com, and NBC.com content without any problems.  However, doing [...]]]></description>
				<content:encoded><![CDATA[<p>Recently, an increasing number of media companies have been blocking access to Flash 10.1 content on non-PC devices (i.e. Android Phones, Google TV, PS3, etc.).  The reasoning for this makes no sense as I can plug my laptop into my TV and watch sites like Hulu, Fox.com, and NBC.com content without any problems.  However, doing so on a game console, Google TV device, or even an Android Phone is somehow different in their view.  It shouldn&#8217;t be a DRM issue either, as that should be handled by the Flash player itself.</p>
<p>Oh well.  In the past, this could be worked around by simply altering the user-agent string on the browser.  In this case, the browser would basically lie to the server and trick it into thinking that it&#8217;s running on a PC web browser.  As a result, the content would play just fine.</p>
<p style="text-align: left;">However, that no longer works.  Instead of simply relying on the user agent string of the browser, they are now also looking at the version of Flash Player running on the device.  A string of the version of Flash you are running is sent to the server to check if you are using a &#8220;supported device.&#8221;  You can find out what your Flash version string is by visiting this page: <a href="http://kb2.adobe.com/cps/155/tn_15507.html">http://kb2.adobe.com/cps/155/tn_15507.html</a>.  Visiting that page should show you something similar to this:</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-273" title="FlashVersion" src="http://slashsarc.com/wp-content/uploads/2010/11/FlashVersion.png" alt="Screenshot of the Flash Player version string" width="636" height="264" /></p>
<p style="text-align: center;">
<p style="text-align: left;">To verify that this string is actually being sent to the server, I opened up Wireshark and sniffed some traffic on Hulu.  While watching an episode of Hells Kitchen on Hulu, I sniffed for <code>HTTP GET</code> requests.  Below is a screenshot of the TCP Stream for the <code>GET</code> request:</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-261" title="TCPStream" src="http://slashsarc.com/wp-content/uploads/2010/11/TCPStream.jpg" alt="TCP Stream of the GET Request" width="827" height="572" /></p>
<p>As you can see from the screenshot above, there are a lot of variables appended to the <code>GET</code> request.  The most interesting one is the: <code>flashPlayer=WIN%2010%2C1%2C103%2C19</code>. This tells the server which version of Flash Player the system is running. If you remove the delimiting characters from the <code>GET</code> request, you would see that the version string matches that of the string in the first screenshot above. If you were running Android, the version string would contain <code>AND</code> instead of <code>WIN</code>.</p>
<p>That is not the only <code>GET</code> request of interest.  Indeed, there are others which contain appended variables declaring the OS, and the browser being used.  All of this information together can identify the device accessing the service.  However, remember that because all of this code is coming from the client, it can be altered.</p>
<p>So, in theory, if we were to replace the Flash Player version (as well as any other string sent to the server that could reveal the identity of the device accessing the service) with known values that work (such as one from an ordinary PC), that device should be able to access the service, since the server <em>thinks</em> the device is just a regular, &#8220;supported&#8221; PC.</p>
<p>Unfortunately, modification of the packet on-the-fly is the problem.  I cannot find any suitable software that is capable of making these changes on-the-fly to the HTTP packets.  A proxy application would be best suitable for this purpose, as it can change the user-agent-string and potentially other variables within the packet before being sent out to the server.  Unfortunately, I cannot locate any software that would easily give me the granular control needed to make this work.</p>
<p>After looking into Squid, and Privoxy, the best application that I have tested so far is TcpCatcher (<a href="http://www.tcpcatcher.org/">http://www.tcpcatcher.org/</a>).  This is a great app that basically combines Wireshark with a proxy server for HTTP connections.  It can even perform find-and-replace functionality within the packet.  Unfortunately, as powerful as the application is, it does not have the ability to find-and-replace more than one variable at one time. For example, to make this work, I would need to change the user-agent string, as well as find-and-replace any instances of <code>flashplayer=</code>, <code>flash=</code>, and even <code>os=</code> with known values that work.  However, this application can only allow one or the other to be changed.  If I change the user-agent string, I cannot perform a find-and-replace on the packet.  Thus, it will not work to fix the problem, as we need to completely mask the identity of the accessing device and trick the server into thinking that it&#8217;s just an ordinary PC.</p>
<p>If anyone is able to locate software that can make this work, please post it in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://slashsarc.com/2010/11/solution-for-viewing-blocked-media-content-on-flash-10-1-devices/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
