<?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>perpetual beta &#124; release &#187; Command Line</title>
	<atom:link href="http://perpetualbeta.com/release/category/computers/unixlinux/feed/" rel="self" type="application/rss+xml" />
	<link>http://perpetualbeta.com/release</link>
	<description>ready... aim...</description>
	<lastBuildDate>Wed, 02 May 2012 00:49:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Note to Self:  Cleaning up Hacks</title>
		<link>http://perpetualbeta.com/release/2012/04/note-to-self-cleaning-up-hacks/</link>
		<comments>http://perpetualbeta.com/release/2012/04/note-to-self-cleaning-up-hacks/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 03:47:58 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Insecurity]]></category>
		<category><![CDATA[Never Underestimate the Power of Human Stupidity]]></category>
		<category><![CDATA[Perpetual Beta : Release]]></category>
		<category><![CDATA[Spam: Digital Plague or Pure Evil?  Discuss.]]></category>
		<category><![CDATA[The Intarweb]]></category>

		<guid isPermaLink="false">http://perpetualbeta.com/release/?p=1105</guid>
		<description><![CDATA[Sadly, its necessary for me to leave these reminders here: If you get eval(base64 hacked on wordpress/dreamhost I have a shared host on Dreamhost that just got hacked to shit. A fairly standard hack, and nothing particularly inspired, but nevertheless some clients from years ago weren’t too happy. If this happens to anyone else, here’s [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Sadly, its necessary for me to leave these reminders here:</p>
<p><a href="http://danhilltech.tumblr.com/post/18085864093/if-you-get-eval-base64-hacked-on-wordpress-dreamhost">If you get eval(base64 hacked on wordpress/dreamhost</a></p>
<blockquote><p>I have a shared host on Dreamhost that just got hacked to shit. A fairly standard hack, and nothing particularly inspired, but nevertheless some clients from years ago weren’t too happy. If this happens to anyone else, here’s the fix (for now)…</p></blockquote>
<p><a href="http://domesticenthusiast.blogspot.com/2012/03/dyslexic-mayans-want-to-sell-you-cialis.html">Dyslexic Mayans Want to Sell You Cialis</a></p>
<blockquote><p>My shared host account got hacked-TFU last Monday. After looking a little closer it became clear that there had been more than one break in. Apparently my account also got hacked last November, three times in December (twice by the same hacker!) and once in January too, so for the past few months my server has had a back door like Dennis the Menace&#8217;s hanging pajama flap.
</p></blockquote>
<p><a href="http://blog.sucuri.net/2010/05/simple-cleanup-solution-for-the-latest-wordpress-hack.html ">Simple cleanup solution for the latest WordPress hack</a></p>
<blockquote><p>If your site got hacked on the last mass infection of WordPress sites out there, we have a simple solution to clean it up.</p>
<p>Via SSH:</p>
<p>If you have SSH access to your server, run the following commands on your web root:</p>
<pre>$ find ./ -name "*.php" -type f |  xargs sed -i 's#< ?php /\*\*/ eval(base64_decode("aWY.*?>##g' 2>&#038;1
$ find ./ -name "*.php" -type f |  xargs sed -i '/./,$!d' 2>&#038;1
</pre>
</blockquote>
<p>And, oh yes—don&#8217;t forget the spaces-in-filename clusterfrak:</p>
<p><a href="http://notfaq.wordpress.com/2006/07/30/unix-filenames-with-spaces-in-find-xargs/">Unix/Linux — find &#038; xargs — Spaces in filenames</a></p>
<blockquote><p>Spaces in filenames can be a problem when using find | xargs combination.</p>
<p>To solve this, use:</p>
<pre>find . -print0 | xargs -0 <command></command></pre>
<p>This tells find and xargs to use the ASCII NUL character instead of space to end (separate) the filenames.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://perpetualbeta.com/release/2012/04/note-to-self-cleaning-up-hacks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Database Resurrection</title>
		<link>http://perpetualbeta.com/release/2005/11/database-resurrection/</link>
		<comments>http://perpetualbeta.com/release/2005/11/database-resurrection/#comments</comments>
		<pubDate>Tue, 22 Nov 2005 04:45:49 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Command Line]]></category>
		<category><![CDATA[The Joy of Tech]]></category>
		<category><![CDATA[Webloggia]]></category>

		<guid isPermaLink="false">http://www.perpetualbeta.com/release/?p=8</guid>
		<description><![CDATA[Sometime last July, the Movable Type setup that powered every weblog on our various domains went belly up. All logins failed, password retrievals failed&#8230; the database appeared to be empty. But the database was still there, and still flush with all that data. Logging into the web server and running &#8220;strings&#8221; on the database files [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Sometime last July, the Movable Type setup that powered every weblog on our various domains <a href="http://www.wasylik.net/baby/blog/">went belly up</a>.  All logins failed, password retrievals failed&#8230;  the database appeared to be empty.  But the database was still there, and still flush with all that data.  Logging into the web server and running &#8220;strings&#8221; on the database files showed that all the user accounts and blog entries were still there.  So my problem was not that the database was gone &#8211; it was that Movable Type somehow couldn&#8217;t access the data.  I backed up the errant database and went poking around.  </p>
<p>I tried re-installing Movable Type from scratch, using the original install files I had stashed away.  Still no dice:  &#8220;invalid login.&#8221;  I did a new install of a blank Movable Type setup &#8211; worked like a charm.  That told me I definitely had a database problem, not a problem with the install files.   The <a href="http://www.google.com/search?q=movable.type+invalid+login&#038;hl=en&#038;lr=&#038;safe=off&#038;client=safari&#038;rls=en&#038;start=10&#038;sa=N">Oracle of Google</a> told me that others had suffered the same problem:</p>
<ul>
<li><a href="http://www.sixapart.com/movabletype/forums/lofiversion/index.php/t25580.html">http://www.sixapart.com/movabletype/forums/lofiversion/index.php/t25580.html</a></li>
<li><a href="http://www.djchuang.com/b2/blog.php/2004/05/18/">http://www.djchuang.com/b2/blog.php/2004/05/18/</a></li>
<li><a href="http://www.sixapart.com/movabletype/forums/index.php?showtopic=41725">http://www.sixapart.com/movabletype/forums/index.php?showtopic=41725</a></li>
</ul>
<p><a href="http://www.sixapart.com/movabletype/kb/authors/invalid_login.html">One of the posts</a> I ran across recommended the <a href="http://www.nonplus.net/software/mt/MT-Medic.htm">MT-Medic plugin</a>.  Sounded great &#8211; I installed it, then configured and ran it.  Same result:  no authors, no weblogs.  But I knew, having seen the data, that it was all still there. The same post that mentioned MT-Medic also contained the following nuggets of information:</p>
<blockquote><p>This can be fixed by converting the DB files over to the format used by the new library version; please review the Knowledge Base article on Converting Berkeley DB Files To New Version for more information.</p></blockquote>
<p>It linked to an entry on <a href="http://www.sixapart.com/movabletype/kb/databases/converting_berk.html">upgrading the database version</a>.  &#8220;The easiest way to convert the DB files is to use the db_upgrade program.&#8221;  Great!  I could just run the &#8220;db_upgrade&#8221; command.  Except&#8230; no such program existed on my server!  So I then tried the burdensome &#8220;dump and reload&#8221; method at the end of the article.  After laboriously typing in</p>
<pre>$ db_dump -f author.db.data author.db
$ mv author.db author.db.old
$ db_load -f author.db.data author.db
$ chmod 666 author.db</pre>
<p>&#8230;for more than two dozen files, I thought I was ready to go.  I fired up the login window&#8230;  INVALID LOGIN.  </p>
<p>Now I was mad.  But one guy, Dylan Parker <a href="http://blog.warmbrain.com/2004/Feb/2004Feb05_corrupted_movable_type_database.html">seemed to be having the same types of troubles</a> I was having, and he was equally determined.  I re-read his article for clues.  Ultimately, I never had to try his solution of upgrading Perl modules, because this paragraph gave me all I needed:</p>
<blockquote><p>First off, my web hosting site didn&#8217;t appear to have db_upgrade, db_dump, db_dump185 or db_load installed. I hunted all over the directory tree and eventually found them in /usr/local/bin but they had the prefix db3_ instead of db_. Be aware your hosting company may have renamed these utilities. Remember&#8230; the locate and whereis commands are your friend.</p></blockquote>
<p>Db3?  Locate!  Five seconds later, I had found the &#8220;db3_upgrade&#8221; program that had eluded me while I was searching for its little brother without the 3.  Ran it, went to MT-Medic, waited with bated breath for it to load, and magic!  The database spilled its guts across my screen:  authors, blogs, everything.  Moving to the login window, the entire Movable Type installation was back at my fingertips, fully operational.</p>
<p>My next item of business?  Export!  You&#8217;ll soon be seeing some of the old blog entries nestled in new blog homes.  Hopefully no other Movable Type users have to go through what I went through, but if they do, I hope this note helps.  </p>
<p>Remember, back up your data often.</p>
<p>UPDATE:  I&#8217;m <a href="http://ask.metafilter.com/mefi/25356">not the only one</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://perpetualbeta.com/release/2005/11/database-resurrection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

