<?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>PHUTiLiTY &#187; Programmierung</title>
	<atom:link href="http://www.phutility.de/category/programmierung/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phutility.de</link>
	<description>is resistant.</description>
	<lastBuildDate>Sun, 15 Jan 2012 14:38:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Script für Wake on LAN über FRITZ!Box</title>
		<link>http://www.phutility.de/2012/01/15/script-fuer-wake-on-lan-ueber-fritzbox/</link>
		<comments>http://www.phutility.de/2012/01/15/script-fuer-wake-on-lan-ueber-fritzbox/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 12:54:35 +0000</pubDate>
		<dc:creator>speaker</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.phutility.de/?p=1443</guid>
		<description><![CDATA[Die meisten FRITZ!Box-Modelle bringen eine &#8220;Wake on Lan&#8221;-Funktion mit, über die sich ein ausgeschalteter Heimrechner starten läßt, wenn beispielsweise gerade Zugriff vom Büro aus notwendig ist. Solange der Rechner zu Hause am (verkabelten) LAN hängt, funktioniert das Ganze einwandfrei. Allerdings muß man sich auf der FRITZ!Box zunächst per HTTP-Auth und anschließend mit Admin-Paßwort anmelden, ins [...]]]></description>
			<content:encoded><![CDATA[<p>Die meisten FRITZ!Box-Modelle bringen eine &#8220;Wake on Lan&#8221;-Funktion mit, über die sich ein ausgeschalteter Heimrechner starten läßt, wenn beispielsweise gerade Zugriff vom Büro aus notwendig ist. Solange der Rechner zu Hause am (verkabelten) LAN hängt, funktioniert das Ganze einwandfrei. Allerdings muß man sich auf der FRITZ!Box zunächst per HTTP-Auth und anschließend mit Admin-Paßwort anmelden, ins entsprechende Menü navigieren, dort den Rechner auswählen, der aufgeweckt werden soll, und schließlich den finalen Button drücken. Da das alles unglaublich viel Zeit frißt (bestimmt volle 1-2 Minuten!), hier ein Perl-Script, das den Kram automatisiert: Einmalig anpassen, starten, fertig.</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> warnings<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> LWP<span style="color: #339933;">::</span><span style="color: #006600;">UserAgent</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> Encode<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> Digest<span style="color: #339933;">::</span><span style="color: #006600;">MD5</span> <span style="color: #000066;">qw</span><span style="color: #009900;">&#40;</span>md5_hex<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$ua</span> <span style="color: #339933;">=</span> LWP<span style="color: #339933;">::</span><span style="color: #006600;">UserAgent</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$ua</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">timeout</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">30</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### config section ###</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$fritzpass</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;&lt;fritzbox password&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$httpuser</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;&lt;http auth user&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$httppass</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;&lt;http auth password&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$host</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;&lt;hostname or ip&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$mac</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;&lt;mac for wake up&gt;&quot;</span><span style="color: #339933;">;</span>	<span style="color: #666666; font-style: italic;"># use mac format 01:23:45:67:89:AB</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## uncomment the following line if you get ssl certificate warnings</span>
<span style="color: #666666; font-style: italic;">#$ua-&gt;ssl_opts(verify_hostname =&gt; 0);</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### don't change anything below ###</span>
&nbsp;
<span style="color: #000066;">push</span> <span style="color: #339933;">@</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">$ua</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">requests_redirectable</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'POST'</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$ua</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">credentials</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$host</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;:443&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;HTTPS Access&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$httpuser</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$httppass</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$url_base</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;https://&quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$host</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$url_login</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$url_base</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;/login.lua&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$url_wakeup</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$url_base</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;/cgi-bin/webcm&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$r</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$ua</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$url_login</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: #0000ff;">$r</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">is_success</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$c</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$r</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">decoded_content</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$c</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">m/var challenge = &quot;([a-f0-9]+)&quot;;/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$challenge</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$1</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">%data</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>response <span style="color: #339933;">=&gt;</span> <span style="color: #000066;">sprintf</span> <span style="color: #ff0000;">&quot;%s-%s&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$challenge</span><span style="color: #339933;">,</span>
			md5_hex<span style="color: #009900;">&#40;</span>encode<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;UTF16-LE&quot;</span><span style="color: #339933;">,</span> <span style="color: #000066;">sprintf</span> <span style="color: #ff0000;">&quot;%s-%s&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$challenge</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$fritzpass</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>		
		<span style="color: #0000ff;">$r</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$ua</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">post</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$url_login</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">\%data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #0000ff;">$c</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$r</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">decoded_content</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$c</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">m/logout\.lua\?sid=([a-f0-9]+)/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$sid</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$1</span><span style="color: #339933;">;</span>
			<span style="color: #0000ff;">%data</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>sid <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$sid</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;wakeup:settings/mac&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$mac</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #0000ff;">$r</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$ua</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">post</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$url_wakeup</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">\%data</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: #0000ff;">$r</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">is_success</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;wakeup done.<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000066;">printf</span> <span style="color: #ff0000;">&quot;error: %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$r</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">status_line</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;error: couldn't find a session id<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;error: couldn't find a challenge<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>	
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;error: couldn't login<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066;">exit</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span></pre></div></div>

<p>Getestet wurde das Ganze mit einer FRITZ!Box 7170, also nicht gerade dem jüngsten Modell.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phutility.de/2012/01/15/script-fuer-wake-on-lan-ueber-fritzbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linksys WRT54G Config decodieren</title>
		<link>http://www.phutility.de/2010/12/06/linksys-wrt54g-config-decodieren/</link>
		<comments>http://www.phutility.de/2010/12/06/linksys-wrt54g-config-decodieren/#comments</comments>
		<pubDate>Mon, 06 Dec 2010 15:57:23 +0000</pubDate>
		<dc:creator>speaker</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.phutility.de/?p=1250</guid>
		<description><![CDATA[Es soll ja Leute geben, die z.B. ihre ISP-Paßwörter verlegen und nur noch einen funktionierenden Linksys-Router (WRT54Gx) besitzen, aus dem die entsprechenden Daten irgendwie extrahiert werden sollen. Da die Config-Files der Router ein etwas &#8220;seltsames&#8221; Format besitzen und deshalb entsprechende Zugangsdaten, Paßwörter, Einstellungen usw. nicht lesbar sind, hier ein kleiner Perl-Einzeiler, der eine solche Config [...]]]></description>
			<content:encoded><![CDATA[<p>Es soll ja Leute geben, die z.B. ihre ISP-Paßwörter verlegen und nur noch einen funktionierenden Linksys-Router (WRT54Gx) besitzen, aus dem die entsprechenden Daten irgendwie extrahiert werden sollen. Da die Config-Files der Router ein etwas &#8220;seltsames&#8221; Format besitzen und deshalb entsprechende Zugangsdaten, Paßwörter, Einstellungen usw. nicht lesbar sind, hier ein kleiner Perl-Einzeiler, der eine solche Config lesbar macht:</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">sub</span> d<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$)</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">$c</span><span style="color: #339933;">=</span><span style="color: #000066;">shift</span><span style="color: #339933;">;</span><span style="color: #0000ff;">$c</span><span style="color: #339933;">=</span><span style="color: #000066;">pack</span><span style="color: #ff0000;">&quot;C&quot;</span><span style="color: #339933;">,</span><span style="color: #000066;">sprintf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;%d&quot;</span><span style="color: #339933;">,~</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$c</span><span style="color: #339933;">&lt;&lt;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">|</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$c</span><span style="color: #339933;">&amp;</span>0xC0<span style="color: #009900;">&#41;</span><span style="color: #339933;">&gt;&gt;</span><span style="color: #cc66cc;">6</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&amp;</span><span style="color: #cc66cc;">255</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>unless<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$c</span> <span style="color: #b1b100;">eq</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\0</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$c</span><span style="color: #339933;">=~</span><span style="color: #000066;">m</span><span style="color: #339933;">/^</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">:</span><span style="color: #000066;">print</span><span style="color: #339933;">:</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span><span style="color: #0000ff;">$/</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000066;">return</span><span style="color: #0000ff;">$c</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span><span style="color: #000066;">return</span><span style="color: #ff0000;">&quot; &quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #000066;">return</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #0000ff;">$f</span><span style="color: #339933;">=</span><span style="color: #000066;">shift</span><span style="color: #339933;">;</span>open FH<span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;&lt;&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$f</span> <span style="color: #b1b100;">or</span> <span style="color: #000066;">die</span><span style="color: #339933;">;</span>while<span style="color: #009900;">&#40;</span><span style="color: #009999;">&lt;FH&gt;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #b1b100;">my</span><span style="color: #0000ff;">@l</span><span style="color: #339933;">=</span><span style="color: #000066;">split</span><span style="color: #339933;">//,</span><span style="color: #0000ff;">$_</span><span style="color: #339933;">;</span>foreach<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@l</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000066;">print</span> d<span style="color: #009900;">&#40;</span><span style="color: #000066;">ord</span><span style="color: #0000ff;">$_</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #000066;">close</span> FH<span style="color: #339933;">;</span>exit <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span></pre></div></div>

<p>Und <a href="/wp-content/uploads/2010/12/linksys_decoder.pl" title="linksys_decoder.pl">hier</a> gibt&#8217;s das Ganze etwas weniger kryptisch.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phutility.de/2010/12/06/linksys-wrt54g-config-decodieren/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Evolution of a Programmer</title>
		<link>http://www.phutility.de/2009/09/25/the-evolution-of-a-programmer/</link>
		<comments>http://www.phutility.de/2009/09/25/the-evolution-of-a-programmer/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 18:08:50 +0000</pubDate>
		<dc:creator>speaker</dc:creator>
				<category><![CDATA[Humor]]></category>
		<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Fun]]></category>

		<guid isPermaLink="false">http://www.phutility.de/?p=968</guid>
		<description><![CDATA[&#60;snip&#62; Experienced Hacker: #include #define S &#34;Hello, World\n&#34; main&#40;&#41;&#123;exit&#40;printf&#40;S&#41; == strlen&#40;S&#41; ? 0 : 1&#41;;&#125; Guru Hacker: % echo &#34;Hello, world.&#34; New Manager: 10 PRINT &#34;HELLO WORLD&#34; 20 END &#60;/snip&#62; (Link) Ähnliche Artikel: Linksys WRT54G Config decodieren
Ähnliche Artikel:<ul>
<li><a href='http://www.phutility.de/2010/12/06/linksys-wrt54g-config-decodieren/' rel='bookmark' title='Linksys WRT54G Config decodieren'>Linksys WRT54G Config decodieren</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p><code>&lt;snip&gt;</code></p>
<p>Experienced Hacker:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include </span>
<span style="color: #339933;">#define S &quot;Hello, World\n&quot;</span>
main<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>exit<span style="color: #009900;">&#40;</span><span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span>S<span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> strlen<span style="color: #009900;">&#40;</span>S<span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">:</span> <span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span></pre></div></div>

<p>Guru Hacker:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Hello, world.&quot;</span></pre></div></div>

<p>New Manager:</p>

<div class="wp_syntax"><div class="code"><pre class="qbasic" style="font-family:monospace;"><span style="color: #8080C0;">10</span> <span style="color: #000066;">PRINT</span> <span style="color: #ff0000;">&quot;HELLO WORLD&quot;</span>
<span style="color: #8080C0;">20</span> <span style="color: #000066;">END</span></pre></div></div>

<p><code>&lt;/snip&gt;</code><code></code></p>
<p>(<a href="http://www.ariel.com.au/jokes/The_Evolution_of_a_Programmer.html">Link</a>) <img src='http://www.phutility.de/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /> </p>
<p>Ähnliche Artikel:<ul>
<li><a href='http://www.phutility.de/2010/12/06/linksys-wrt54g-config-decodieren/' rel='bookmark' title='Linksys WRT54G Config decodieren'>Linksys WRT54G Config decodieren</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.phutility.de/2009/09/25/the-evolution-of-a-programmer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PicLens für eigene Bilder nutzen</title>
		<link>http://www.phutility.de/2008/07/27/piclens-fuer-eigene-bilder-nutzen/</link>
		<comments>http://www.phutility.de/2008/07/27/piclens-fuer-eigene-bilder-nutzen/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 13:23:04 +0000</pubDate>
		<dc:creator>speaker</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.phutility.de/?p=317</guid>
		<description><![CDATA[Das hervorragende Firefox-Addon PicLens, mit dem sich komfortabel Bilderstrecken und Videos anschauen lassen, ist ja schon länger bekannt. Leider wird von Haus aus nicht jede Webseite unterstützt, sodaß momentan nur die Seiten davon profitieren, die &#8220;PicLens-enabled&#8221; sind. Um das Addon auch mit der eigenen Fotosammlung nutzen zu können, ist nur das Erstellen und Einbinden eines [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.phutility.de/wp-content/uploads/2008/07/piclens-full.jpg"><img style="margin-right: 10px;" class="rawrahmen size-medium wp-image-318 alignleft" title="PicLens - Fullscreen" src="http://www.phutility.de/wp-content/uploads/2008/07/piclens-full-300x187.jpg" alt="PicLens - Fullscreen" width="300" height="187" /></a>Das hervorragende Firefox-Addon <a href="http://www.piclens.com/">PicLens</a>, mit dem sich komfortabel Bilderstrecken und Videos anschauen lassen, ist ja schon länger bekannt. Leider wird von Haus aus nicht jede Webseite unterstützt, sodaß momentan nur die Seiten davon profitieren, die &#8220;PicLens-enabled&#8221; sind.</p>
<p>Um das Addon auch mit der eigenen Fotosammlung nutzen zu können, ist nur das Erstellen und Einbinden eines RSS-Feeds nötig, der alle Bilder auflistet.</p>
<p>Dazu fügt man im HTML-Header der aufzurufenden Seite folgende Zeile ein:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;link id=&quot;gallery&quot; rel=&quot;alternate&quot; href=&quot;photos.rss&quot; type=&quot;application/rss+xml&quot;&gt;</pre></div></div>

<p>Nachdem dann der Feed <code>photo.rss</code> generiert wurde, leuchtet beim nächsten Seitenaufruf im Firefox das PicLens-Icon oben rechts auch schon blau. <img src='http://www.phutility.de/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><img src="http://www.phutility.de/wp-content/uploads/2008/07/piclens-icon.png" alt="PicLens-Icon" title="PicLens-Icon" width="137" height="105" class="rahmen alignnone size-full wp-image-320" /></p>
<p>Folgendes Beispiel-Script kann für die Feed-Erstellung verwendet werden (das Syntax-Highlighting wird übrigens durch das WordPress-Plugin <a href="http://wordpress.org/extend/plugins/wp-syntax/">WP-Syntax</a> realisiert):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">//</span>
<span style="color: #666666; font-style: italic;">// PicLEns Feed Creator</span>
<span style="color: #666666; font-style: italic;">// (c)2008 speaker</span>
<span style="color: #666666; font-style: italic;">//</span>
<span style="color: #666666; font-style: italic;">//</span>
<span style="color: #666666; font-style: italic;">// === Konfiguration ===</span>
<span style="color: #666666; font-style: italic;">//</span>
<span style="color: #666666; font-style: italic;">// Dateiname des zu erstellenden RSS-Feeds</span>
<span style="color: #000088;">$filename</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;photos.rss&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Verzeichnispfad, unter dem die Bilder zu finden sind</span>
<span style="color: #666666; font-style: italic;">// (relativ oder absolut)</span>
<span style="color: #000088;">$dir</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;img&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Dateiendung der Bilder</span>
<span style="color: #000088;">$ext</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;jpg&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Suffix, der Thumbnails von den original Bildern unterscheidet</span>
<span style="color: #666666; font-style: italic;">// Beispiel:</span>
<span style="color: #666666; font-style: italic;">// Bild: &quot;original.jpg&quot; - Thumbnail: &quot;original-thumb.jpg&quot;</span>
<span style="color: #666666; font-style: italic;">// -&gt; Suffix: &quot;-thumb&quot;</span>
<span style="color: #000088;">$sfx</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;-thumb&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// === Ab hier nichts mehr ändern! ===</span>
&nbsp;
<span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$filename</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;wb&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$header</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; standalone=&quot;yes&quot;?&gt;
&lt;rss xmlns:media=&quot;http://search.yahoo.com/mrss&quot; version=&quot;2.0&quot;&gt;
  &lt;channel&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$footer</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'
  &lt;/channel&gt;
&lt;/rss&gt;
'</span><span style="color: #339933;">;</span>
<span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span> <span style="color: #000088;">$header</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">glob</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/*&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$sfx</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;.&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$ext</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$thumb</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$pic</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sfx</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$thumb</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #990000;">basename</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pic</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$item</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'
    &lt;item&gt;
      &lt;title&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$name</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/title&gt;
      &lt;link&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$pic</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/link&gt;
      &lt;media:thumbnail url=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$thumb</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; /&gt;
      &lt;media:content url=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$pic</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; /&gt;
    &lt;/item&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span> <span style="color: #000088;">$item</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span> <span style="color: #000088;">$footer</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.phutility.de/2008/07/27/piclens-fuer-eigene-bilder-nutzen/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Scripts mit Notepad++ direkt aufrufen</title>
		<link>http://www.phutility.de/2008/06/10/scripts-mit-notepad-direkt-aufrufen/</link>
		<comments>http://www.phutility.de/2008/06/10/scripts-mit-notepad-direkt-aufrufen/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 22:01:02 +0000</pubDate>
		<dc:creator>speaker</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.phutility.de/?p=247</guid>
		<description><![CDATA[Mein Editor of Choice unter Windows ist definitiv Notepad++. Das Open Source Programm unterstützt unter anderem Syntax-Highlighting für knapp 50 Programmiersprachen, Code-Folding und -Completion sowie einen Makrorecorder. Außerdem ist es durch zahlreiche Plugins zB. um eine Funktionsliste, einen Hex-Editor oder XML-Tools erweiterbar. Besonders das standardmäßig bereits enthaltene Plugin NppExec bringt sinnvolle Funktionalität mit sich: Es [...]
Ähnliche Artikel:<ul>
<li><a href='http://www.phutility.de/2007/12/10/neue-ct-mit-diagnose-cd/' rel='bookmark' title='Neue c&#8217;t mit Diagnose-CD'>Neue c&#8217;t mit Diagnose-CD</a></li>
<li><a href='http://www.phutility.de/2008/04/09/raid5-rekonstruktion-bei-zwei-kaputten-platten/' rel='bookmark' title='RAID5-Rekonstruktion bei zwei kaputten Platten'>RAID5-Rekonstruktion bei zwei kaputten Platten</a></li>
<li><a href='http://www.phutility.de/2008/07/05/truecrypt-60-ist-da/' rel='bookmark' title='TrueCrypt 6.0 ist da'>TrueCrypt 6.0 ist da</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>Mein Editor of Choice unter Windows ist definitiv <a href="http://notepad-plus.sourceforge.net/">Notepad++</a>. Das Open Source Programm unterstützt unter anderem Syntax-Highlighting für knapp 50 Programmiersprachen, Code-Folding und -Completion sowie einen Makrorecorder. Außerdem ist es durch zahlreiche <a href="http://notepad-plus.sourceforge.net/de/download.php?lang=de">Plugins</a> zB. um eine Funktionsliste, einen Hex-Editor oder XML-Tools erweiterbar.</p>
<p>Besonders das standardmäßig bereits enthaltene Plugin <a href="http://sourceforge.net/project/showfiles.php?group_id=189927&amp;package_id=224034">NppExec</a> bringt sinnvolle Funktionalität mit sich: Es erlaubt das Ausführen von Scripts oder Programmen direkt im Editor. Dabei wird die Ausgabe in einem Konsolenfenster wiedergegeben, bekannt von IDEs wie Eclipse.</p>
<p><a title="Notepad++ mit NppExec-Plugin" href="http://www.phutility.de/wp-content/uploads/2008/06/nppp.png"><img src="http://www.phutility.de/wp-content/uploads/2008/06/nppp-thumb.png" alt="nppp" width="250" height="212" /></a></p>
<p>Das Plugin erleichtert das Programmieren und Testen ungemein. Zur Konfiguration drückt man die Taste <em>F6</em> und tippt in das daraufhin erscheinende Execute-Fenster folgende Befehle ein (siehe auch Bild):</p>
<blockquote><p><code>NPP_SAVE<br />
C:\Pfad\Interpreter.exe "$(FULL_CURRENT_PATH)"</code></p></blockquote>
<p>Anschließend bestätigt man mit <em>OK</em>, worauf im Konsolenfenster die Ausgabe beginnt. Dabei nimmt es genau wie die cmd-Shell Tastatureingaben entgegen, sodaß sich Scripts zB. mit <em>STRG+C</em> abbrechen lassen und auch nicht auf Benutzerinteraktion verzichtet werden muß. Wiederholte Executes können mit <em>STRG+F6</em> ausgeführt werden.</p>
<p>Ähnliche Artikel:<ul>
<li><a href='http://www.phutility.de/2007/12/10/neue-ct-mit-diagnose-cd/' rel='bookmark' title='Neue c&#8217;t mit Diagnose-CD'>Neue c&#8217;t mit Diagnose-CD</a></li>
<li><a href='http://www.phutility.de/2008/04/09/raid5-rekonstruktion-bei-zwei-kaputten-platten/' rel='bookmark' title='RAID5-Rekonstruktion bei zwei kaputten Platten'>RAID5-Rekonstruktion bei zwei kaputten Platten</a></li>
<li><a href='http://www.phutility.de/2008/07/05/truecrypt-60-ist-da/' rel='bookmark' title='TrueCrypt 6.0 ist da'>TrueCrypt 6.0 ist da</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.phutility.de/2008/06/10/scripts-mit-notepad-direkt-aufrufen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Designer-Virus f&#252;r den Mac</title>
		<link>http://www.phutility.de/2008/03/05/designer-virus-fur-den-mac/</link>
		<comments>http://www.phutility.de/2008/03/05/designer-virus-fur-den-mac/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 20:13:23 +0000</pubDate>
		<dc:creator>speaker</dc:creator>
				<category><![CDATA[Humor]]></category>
		<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.phutility.de/2008/03/05/designer-virus-fur-den-mac/</guid>
		<description><![CDATA[Oliver hat mich heute auf diesen völlig sinnfreien, aber auf jeden Fall sehr originellen Virus für Macs aufmerksam gemacht, der eigentlich gar keiner ist: Video-Quelle: dezeen.com Die Software bedient sich dabei des Macbook-eigenen internen Gyroskops, das Teil des von Apple patentierten Sudden Motion Sensors (kurz: SMS) ist. Dieses System dient eigentlich dem Schutz der Festplatte [...]
Ähnliche Artikel:<ul>
<li><a href='http://www.phutility.de/2008/06/06/der-duke-kommt/' rel='bookmark' title='Der Duke kommt&#8230;'>Der Duke kommt&#8230;</a></li>
<li><a href='http://www.phutility.de/2008/02/29/sicherheitsupdates-fur-den-vlc-media-player/' rel='bookmark' title='Sicherheitsupdates f&#252;r den VLC Media Player'>Sicherheitsupdates f&#252;r den VLC Media Player</a></li>
<li><a href='http://www.phutility.de/2008/07/03/day-of-defeat-source-free-weekend/' rel='bookmark' title='Day of Defeat: Source &#8211; Free Weekend'>Day of Defeat: Source &#8211; Free Weekend</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.aptgetupdate.de/index.php/2008/03/05/mac-endlich-mal-ein-ordentlicher-virus-fuer-den-mac/">Oliver</a> hat mich heute auf diesen völlig sinnfreien, aber auf jeden Fall sehr originellen <a href="http://www.troika.uk.com/virus.htm">Virus</a> für Macs aufmerksam gemacht, der eigentlich gar keiner ist:</p>
<p><img src="" /></p>
<p><em>Video-Quelle: <a href="http://www.dezeen.com/2008/03/03/movie-newton-virus-by-troika/#more-10101">dezeen.com</a></em></p>
<p>Die Software bedient sich dabei des Macbook-eigenen internen Gyroskops, das Teil des von Apple patentierten Sudden Motion Sensors (kurz: SMS) ist. Dieses System dient eigentlich dem Schutz der Festplatte vor Beschädigungen bei plötzlicher Bewegung, wobei dann augenblicklich Lese- und Schreibköpfe geparkt werden. Für den SMS gibt es neben einigen weiteren kleinen Anwendungen wie zum Beispiel <a href="http://www.suitable.com/tools/seismac.html">SeisMac</a> oder <a href="http://www.osxbook.com/software/sms/smsrotated/">SMSRotateD</a> auch die Java-Bibliothek <a href="http://kortenkamps.net/jilt">jilt</a> zum Umsetzen eigener Ideen.</p>
<p>PS.: Ich merke <a href="http://www.google.de/search?q=jilt+sms">gerade</a>, daß Oliver genau wie ich die Wikipedia und Google befragt, nur dabei das Gleiche schon gute drei Monate <a href="http://www.aptgetupdate.de/index.php/2007/12/30/sms-ich-weiss-wofuer-fuer-sie-gut-sind/">früher</a> zum Besten gegeben hat. Macht nix, denk ich mir, déjà vus sind schön. <img src='http://www.phutility.de/wp-includes/images/smilies/icon_cool.gif' alt=':cool:' class='wp-smiley' /> </p>
<p>Ähnliche Artikel:<ul>
<li><a href='http://www.phutility.de/2008/06/06/der-duke-kommt/' rel='bookmark' title='Der Duke kommt&#8230;'>Der Duke kommt&#8230;</a></li>
<li><a href='http://www.phutility.de/2008/02/29/sicherheitsupdates-fur-den-vlc-media-player/' rel='bookmark' title='Sicherheitsupdates f&#252;r den VLC Media Player'>Sicherheitsupdates f&#252;r den VLC Media Player</a></li>
<li><a href='http://www.phutility.de/2008/07/03/day-of-defeat-source-free-weekend/' rel='bookmark' title='Day of Defeat: Source &#8211; Free Weekend'>Day of Defeat: Source &#8211; Free Weekend</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.phutility.de/2008/03/05/designer-virus-fur-den-mac/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Valid XHTML und Get Recent Comments</title>
		<link>http://www.phutility.de/2008/02/23/valid-xhtml-und-get-recent-comments/</link>
		<comments>http://www.phutility.de/2008/02/23/valid-xhtml-und-get-recent-comments/#comments</comments>
		<pubDate>Sat, 23 Feb 2008 01:32:23 +0000</pubDate>
		<dc:creator>speaker</dc:creator>
				<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.phutility.de/2008/02/23/valid-xhtml-und-get-recent-comments/</guid>
		<description><![CDATA[Da ich zur Konfiguration der letzten Kommentare, die rechts im Sidebar angezeigt werden, ein vernünftiges Plugin brauchte, habe ich seit einiger Zeit Get Recent Comments in Benutzung, das seinen Zweck gut erfüllt. Ein einziges Problem konnte ich nun trotzdem beobachten: Beim Zusammenspiel mehrerer Faktoren zerstört das sonst einwandfrei funktionierende Plugin die XHTML-Validität. Das mag den [...]
Ähnliche Artikel:<ul>
<li><a href='http://www.phutility.de/2008/03/13/truecrypt-51-mit-schwachstellen/' rel='bookmark' title='TrueCrypt 5.1 mit Schwachstellen?'>TrueCrypt 5.1 mit Schwachstellen?</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>Da ich zur Konfiguration der letzten Kommentare, die rechts im Sidebar angezeigt werden, ein vernünftiges Plugin brauchte, habe ich seit einiger Zeit <em><a href="http://wordpress.org/extend/plugins/get-recent-comments/">Get Recent Comments</a></em> in Benutzung, das seinen Zweck gut erfüllt.</p>
<p>Ein einziges Problem konnte ich nun trotzdem beobachten: Beim Zusammenspiel mehrerer Faktoren zerstört das sonst einwandfrei funktionierende Plugin die XHTML-Validität. Das mag den Durchschnittsblogger nicht interessieren, aber bei mir kam diesbezüglich leider mal wieder der Perfektionismus durch&#8230; <img src='http://www.phutility.de/wp-includes/images/smilies/icon_rolleyes.gif' alt=':roll:' class='wp-smiley' /> </p>
<p align="center"><img src="http://www.phutility.de/wp-content/uploads/2008/02/invalidxhtml.png" alt="invalidxhtml" /></p>
<p>Konkret muß das Caching von <em>Get Recent Comments</em> aktiviert sein und es müssen beide Widgets (Kommentare und Trackbacks) in der Sidebar auftauchen. In diesem Fall werden die zu cachenden Daten bereits beim Aufbau des ersten Widgets vollständig erstellt, was falsche HTML-Tags in <code>$before_widget</code> und <code>$before_title</code> des zweiten Widgets erzeugt (nämlich die des ersten Widgets). Da sich innerhalb dieser Tags ids befinden, die, wie der Name schon sagt, einzigartig sein müssen (was sie ja nicht mehr sind, sobald die gleiche id für beide Widgets genutzt wird), ist die Seite nicht mehr XHTML-konform. <img src='http://www.phutility.de/wp-includes/images/smilies/icon_cry.gif' alt=':cry:' class='wp-smiley' /> </p>
<p><a href="http://validator.w3.org/check?uri=referer" title="Validate XHTML"><img src="http://www.phutility.de/wp-content/uploads/2008/02/validxhtml.png" class="rahmen" alt="validxhtml" /></a></p>
<p>Lange Rede, kurzer Sinn: <a href="http://www.phutility.de/wp-content/uploads/2008/02/grc-202-valid-xhtml.patch" title="Get Recent Comments Valid XHTML Patch">Hier</a> mein Patch für Version 2.0.2 des Plugins, allen kleinkarierten Gleichgesinnten gewidmet. <img src='http://www.phutility.de/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /><br />
Zur Erneuerung des Caches muß dieser einmal deaktiviert und, nachdem die Hauptseite neu geladen wurde, wieder aktiviert werden.</p>
<p>Ähnliche Artikel:<ul>
<li><a href='http://www.phutility.de/2008/03/13/truecrypt-51-mit-schwachstellen/' rel='bookmark' title='TrueCrypt 5.1 mit Schwachstellen?'>TrueCrypt 5.1 mit Schwachstellen?</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.phutility.de/2008/02/23/valid-xhtml-und-get-recent-comments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

