<?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>jmanteau &#187; Informatique</title>
	<atom:link href="http://www.jmanteau.fr/category/informatique/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jmanteau.fr</link>
	<description>Photos, blog, CV &#38; Co : le "coin de Toile" de Julien Manteau</description>
	<lastBuildDate>Wed, 08 Feb 2012 13:49:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Activation du SSH et gestion des clefs sur ASA 8.x</title>
		<link>http://www.jmanteau.fr/informatique/securite/activation-du-ssh-et-gestion-des-clefs-sur-asa-8-x/</link>
		<comments>http://www.jmanteau.fr/informatique/securite/activation-du-ssh-et-gestion-des-clefs-sur-asa-8-x/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 13:44:01 +0000</pubDate>
		<dc:creator>jmanteau</dc:creator>
				<category><![CDATA[Sécurité]]></category>
		<category><![CDATA[asa]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.jmanteau.fr/?p=697</guid>
		<description><![CDATA[Devrant écrire une documentation rapide pour l&#8217;activation et la regénération de clefs pour un ASA en version 8.x, la voici: Configuration A partir de la console en mode configuration (conf t): 1ciscoasa&#40;config&#41;# enable password xxxxx Il est recommandé de toujours mettre le mot de passe enable 1ciscoasa&#40;config&#41;# username xxx password xxxx privilege 15 L&#8217;admin local [...]]]></description>
			<content:encoded><![CDATA[<p>Devrant écrire une documentation rapide pour l&#8217;activation et la regénération de clefs pour un ASA en version 8.x, la voici:</p>
<h4>Configuration</h4>
<p>A partir de la console en mode configuration (conf t):</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ciscoasa<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># enable password xxxxx</span></div></td></tr></tbody></table></div>
<p>Il est recommandé de toujours mettre le mot de passe enable</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ciscoasa<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># username xxx password xxxx privilege 15</span></div></td></tr></tbody></table></div>
<p>L&#8217;admin local et son mot de passe qui effectuera la connexion SSH. Pour plus d&#8217;infos sur les privilèges voir</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ciscoasa<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># aaa authentication ssh console LOCAL</span></div></td></tr></tbody></table></div>
<p>Le mot clé local précise d&#8217;utiliser l&#8217;utilisateur défini dans la base locale à l&#8217;étape précédente. On peut utiliser d&#8217;autres moyen d&#8217;authentifications comme TACACS, RADIUS &#8230;</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ciscoasa<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># ssh a.b.c.d 255.255.255.0 inside</span></div></td></tr></tbody></table></div>
<p>On précise quelles IPs ont le droit de se connecter en SSH et depuis quelles interfaces. A répéter sur toutes les interfaces ayant besoin d&#8217;être activées.</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ciscoasa<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># ssh timeout 30</span></div></td></tr></tbody></table></div>
<p>Le temps d&#8217;inactivité autorisé avant déconnexion.</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ciscoasa<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># ssh version 2</span></div></td></tr></tbody></table></div>
<p>On n&#8217;autorise que la version 2 de SSH. La 1 étant deprecated pour des raisons de sécurité.</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ciscoasa<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># domain-name monnom.com</span></div></td></tr></tbody></table></div>
<p>Le nom de domaine à utiliser. La clé RSA est générée en utilisant le nom de domaine plus le nom du firewall</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ciscoasa<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># crypto key generate rsa modulus 2048</span></div></td></tr></tbody></table></div>
<p>On génére une clef SSH RSA 2048bits.</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ciscoasa<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># wr</span></div></td></tr></tbody></table></div>
<p>On écrit les clefs en mémoire pour ne pas les perdre après redémarrage.</p>
<p>Si on résume:</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ciscoasa<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># enable password xxxxx</span><br />
<br />
ciscoasa<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># domain-name monnom.com</span><br />
<br />
ciscoasa<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># username xxx password xxxx</span><br />
<br />
ciscoasa<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># aaa authentication ssh console LOCAL</span><br />
<br />
ciscoasa<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># ssh a.b.c.d 255.255.255.0 inside</span><br />
<br />
ciscoasa<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># ssh timeout 30</span><br />
<br />
ciscoasa<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># ssh version 2</span><br />
<br />
ciscoasa<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># crypto key generate rsa modulus 2048</span><br />
<br />
ciscoasa<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># wr</span></div></td></tr></tbody></table></div>
<h4>Visualisation</h4>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">asa<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># show ssh sessions ?</span><br />
<br />
<span style="color: #7a0874; font-weight: bold;">exec</span> mode commands<span style="color: #000000; font-weight: bold;">/</span>options:<br />
Hostname or A.B.C.D Show SSH sessions corresponding to SSH client IP<br />
address<br />
Hostname or X:X:X:X::X Show SSH sessions corresponding to SSH client IPv6<br />
address<br />
<span style="color: #000000; font-weight: bold;">|</span> Output modifiers</div></td></tr></tbody></table></div>
<p>Sessions SSH en cours</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">asa<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># show crypto key mypubkey rsa</span><br />
Key pair was generated at: <span style="color: #000000;">12</span>:<span style="color: #000000;">48</span>:08 UTC Feb <span style="color: #000000;">8</span> <span style="color: #000000;">2012</span><br />
Key name:<br />
Usage: General Purpose Key<br />
Modulus Size <span style="color: #7a0874; font-weight: bold;">&#40;</span>bits<span style="color: #7a0874; font-weight: bold;">&#41;</span>: <span style="color: #000000;">1024</span><br />
Key Data:<br />
<br />
30819f30 0d06092a 864886f7 0d010101 05000381 8d003081 <span style="color: #000000;">89028181</span> 00bf9109<br />
79f201ad 7f0edfc1 9192a31d 8da48eb6 f0cc3a37 2ce5472d 6b73523f 9e4f00fd<br />
abdedeea e519cb86 f31bdbca 68a55367 b3fd95e1 cd692d8b 493f0e7e c2cbf8a3<br />
af826c2c 53111c59 c3f2fb92 d6ac54a3 ac093afc c9027c76 3d8dcbed 51d44e34<br />
d4a95ced 037e56da 8f9849f5 0d6d9014 dd95929f f77be2f2 8ce53eee <span style="color: #000000;">65020301</span> 0001</div></td></tr></tbody></table></div>
<p>Affichage de la clef RSA</p>
<h4>Reconfiguration</h4>
<p>Et en cas de changement de hostname ou de domain-name ? Il est alors recommandé de réinitialiser les clefs ssh.</p>
<p>Pour cela :</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ciscoasa<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># hostname nouveau-hostname</span><br />
<br />
nouveau-hostname<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># crypto key zeroize rsa</span><br />
<br />
nouveau-hostname<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># crypto key generate rsa modulus 2048</span><br />
<br />
nouveau-hostname<span style="color: #7a0874; font-weight: bold;">&#40;</span>config<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># wr</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.jmanteau.fr/informatique/securite/activation-du-ssh-et-gestion-des-clefs-sur-asa-8-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Merge de fichiers KeepassX ou Keepass 1.x (.kdb)</title>
		<link>http://www.jmanteau.fr/informatique/systeme/merge-de-fichiers-keepassx-ou-keepass-1-x-kdb/</link>
		<comments>http://www.jmanteau.fr/informatique/systeme/merge-de-fichiers-keepassx-ou-keepass-1-x-kdb/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 13:49:41 +0000</pubDate>
		<dc:creator>jmanteau</dc:creator>
				<category><![CDATA[Système]]></category>

		<guid isPermaLink="false">http://www.jmanteau.fr/?p=687</guid>
		<description><![CDATA[J&#8217;ai eu le besoin de merger plusieurs fichiers base de données de Keepass. Si vous ne connaissez pas cet excellent gestionnaire de mot de passe allez faire un tour ici ! Son pendant Linux/Mac OS X est KeepassX compatible avec la branche 1.x de Keepass. Ce script (rapidement fait) prend plusieurs fichiers d&#8217;export XML Keepass [...]]]></description>
			<content:encoded><![CDATA[<p>J&#8217;ai eu le besoin de merger plusieurs fichiers base de données de Keepass. Si vous ne connaissez pas cet excellent gestionnaire de mot de passe allez faire un tour <a href="http://keepass.info/">ici</a> ! Son pendant Linux/Mac OS X est <a title="KeepassX" href="http://www.keepassx.org/">KeepassX</a> compatible avec la branche 1.x de Keepass.</p>
<p>Ce script (rapidement fait) prend plusieurs fichiers d&#8217;export XML Keepass (Menu -> Exporter sous -> XML)<br />
et les regroupent sous un fichier. Il prend l&#8217;entrée la plus récente en cas de conflit. Il affichera les conflits en sortie console.</p>
<p>La source est disponible ici pour ceux qui veulent la regarder et je l&#8217;ai également compilé ici pour ceux qui veulent faire un merge rapide.</p>
<p>Télécharger <a href='http://www.jmanteau.fr/wp-content/uploads/2011/12/KeeMerge.exe'>KeeMerge</a></p>
<p>Pour l’exécutable, le mettre dans le même dossier que les exports xml puis le lancer.</p>
<p>Il faut ensuite importer le merge.xml dans Keepass. Créer une nouvelle base puis Menu-> Importer -> XML Keepass 1.x.</p>
<div class="codecolorer-container python mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br />83<br />84<br />85<br />86<br />87<br />88<br />89<br />90<br />91<br />92<br />93<br />94<br />95<br />96<br />97<br /></div></td><td><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff7700;font-weight:bold;">from</span> lxml <span style="color: #ff7700;font-weight:bold;">import</span> etree<br />
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">datetime</span><span style="color: #66cc66;">,</span> <span style="color: #dc143c;">glob</span><br />
<br />
<span style="color: #ff7700;font-weight:bold;">class</span> Password<span style="color: black;">&#40;</span><span style="color: #008000;">object</span><span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: #66cc66;">,</span> node<span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; date<span style="color: #66cc66;">=</span> node.<span style="color: black;">find</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;lastmodtime&quot;</span><span style="color: black;">&#41;</span>.<span style="color: black;">text</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">self</span>.<span style="color: black;">lastmodtime</span><span style="color: #66cc66;">=</span> <span style="color: #dc143c;">datetime</span>.<span style="color: #dc143c;">datetime</span>.<span style="color: black;">strptime</span><span style="color: black;">&#40;</span>date<span style="color: #66cc66;">,</span><span style="color: #483d8b;">&quot;%Y-%m-%dT%H:%M:%S&quot;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">self</span>.<span style="color: black;">uuid</span><span style="color: #66cc66;">=</span> node.<span style="color: black;">find</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;uuid&quot;</span><span style="color: black;">&#41;</span>.<span style="color: black;">text</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">self</span>.<span style="color: black;">username</span><span style="color: #66cc66;">=</span> node.<span style="color: black;">find</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;username&quot;</span><span style="color: black;">&#41;</span>.<span style="color: black;">text</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">self</span>.<span style="color: black;">password</span><span style="color: #66cc66;">=</span> node.<span style="color: black;">find</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;password&quot;</span><span style="color: black;">&#41;</span>.<span style="color: black;">text</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">self</span>.<span style="color: black;">title</span><span style="color: #66cc66;">=</span> node.<span style="color: black;">find</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;title&quot;</span><span style="color: black;">&#41;</span>.<span style="color: black;">text</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">self</span>.<span style="color: black;">node</span><span style="color: #66cc66;">=</span> node<br />
<br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__hash__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">hash</span><span style="color: black;">&#40;</span><span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">title</span><span style="color: black;">&#41;</span>+<span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">lastmodtime</span><span style="color: black;">&#41;</span>+<span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">uuid</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__eq__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: #66cc66;">,</span>other<span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">self</span>.<span style="color: black;">uuid</span><span style="color: #66cc66;">==</span>other.<span style="color: black;">uuid</span> <span style="color: #ff7700;font-weight:bold;">and</span> <span style="color: #008000;">self</span>.<span style="color: black;">username</span><span style="color: #66cc66;">==</span>other.<span style="color: black;">username</span> <span style="color: #ff7700;font-weight:bold;">and</span> <span style="color: #008000;">self</span>.<span style="color: black;">password</span><span style="color: #66cc66;">==</span>other.<span style="color: black;">password</span> <span style="color: #ff7700;font-weight:bold;">and</span> <span style="color: #008000;">self</span>.<span style="color: black;">title</span><span style="color: #66cc66;">==</span><span style="color: #008000;">self</span>.<span style="color: black;">title</span><br />
<br />
<br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__str__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; s <span style="color: #66cc66;">=</span> <span style="color: #483d8b;">&quot;%s (%s): [%s|%s] - %s&quot;</span> % <span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">title</span><span style="color: #66cc66;">,</span><span style="color: #008000;">self</span>.<span style="color: black;">uuid</span><span style="color: #66cc66;">,</span><span style="color: #008000;">self</span>.<span style="color: black;">username</span><span style="color: #66cc66;">,</span><span style="color: #008000;">self</span>.<span style="color: black;">password</span><span style="color: #66cc66;">,</span><span style="color: #008000;">self</span>.<span style="color: black;">lastmodtime</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">return</span> s<br />
<br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__repr__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; s <span style="color: #66cc66;">=</span> <span style="color: #483d8b;">&quot;%s (%s): [%s|%s] - %s&quot;</span> % <span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">title</span><span style="color: #66cc66;">,</span><span style="color: #008000;">self</span>.<span style="color: black;">uuid</span><span style="color: #66cc66;">,</span><span style="color: #008000;">self</span>.<span style="color: black;">username</span><span style="color: #66cc66;">,</span><span style="color: #008000;">self</span>.<span style="color: black;">password</span><span style="color: #66cc66;">,</span><span style="color: #008000;">self</span>.<span style="color: black;">lastmodtime</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">return</span> s<br />
<br />
<br />
<span style="color: #ff7700;font-weight:bold;">def</span> getTree<span style="color: black;">&#40;</span><span style="color: #008000;">file</span><span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; <span style="color: #483d8b;">&quot;&quot;&quot;<br />
&nbsp; &nbsp; Give the root and tree of the XML file<br />
&nbsp; &nbsp; &quot;&quot;&quot;</span><br />
&nbsp; &nbsp; <span style="color: #dc143c;">parser</span> <span style="color: #66cc66;">=</span> etree.<span style="color: black;">XMLParser</span><span style="color: black;">&#40;</span>strip_cdata<span style="color: #66cc66;">=</span><span style="color: #008000;">False</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; tree <span style="color: #66cc66;">=</span> etree.<span style="color: black;">parse</span><span style="color: black;">&#40;</span><span style="color: #008000;">file</span><span style="color: #66cc66;">,</span> <span style="color: #dc143c;">parser</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; root<span style="color: #66cc66;">=</span> tree.<span style="color: black;">getroot</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">return</span> tree <span style="color: #66cc66;">,</span>root<br />
<br />
<span style="color: #ff7700;font-weight:bold;">def</span> getpasswords<span style="color: black;">&#40;</span><span style="color: #008000;">file</span><span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; <span style="color: #483d8b;">&quot;&quot;&quot;<br />
&nbsp; &nbsp; Parse and return all the password of an xml exported by Keepass<br />
&nbsp; &nbsp; &quot;&quot;&quot;</span><br />
&nbsp; &nbsp; tree<span style="color: #66cc66;">,</span> root <span style="color: #66cc66;">=</span> getTree<span style="color: black;">&#40;</span><span style="color: #008000;">file</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; elements<span style="color: #66cc66;">=</span> <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span><br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">for</span> e <span style="color: #ff7700;font-weight:bold;">in</span> root:<br />
&nbsp; &nbsp; &nbsp; &nbsp; elements.<span style="color: black;">append</span><span style="color: black;">&#40;</span>Password<span style="color: black;">&#40;</span>e<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">return</span> elements<br />
<br />
<span style="color: #ff7700;font-weight:bold;">def</span> main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;"># give me your xmls</span><br />
&nbsp; &nbsp; xmls<span style="color: #66cc66;">=</span> <span style="color: #dc143c;">glob</span>.<span style="color: #dc143c;">glob</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;*.xml&quot;</span><span style="color: black;">&#41;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;"># a dict uniq by the uuid of the node</span><br />
&nbsp; &nbsp; uniquepasswords<span style="color: #66cc66;">=</span> <span style="color: #008000;">dict</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;"># all your passwords are belong to us</span><br />
&nbsp; &nbsp; passwords<span style="color: #66cc66;">=</span><span style="color: black;">&#91;</span><span style="color: #dc143c;">pwd</span> <span style="color: #ff7700;font-weight:bold;">for</span> f <span style="color: #ff7700;font-weight:bold;">in</span> xmls <span style="color: #ff7700;font-weight:bold;">for</span> <span style="color: #dc143c;">pwd</span> <span style="color: #ff7700;font-weight:bold;">in</span> getpasswords<span style="color: black;">&#40;</span>f<span style="color: black;">&#41;</span><span style="color: black;">&#93;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;"># let's go marco</span><br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">for</span> <span style="color: #dc143c;">pwd</span> <span style="color: #ff7700;font-weight:bold;">in</span> passwords:<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;"># do I know you ?</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #dc143c;">pwd</span>.<span style="color: black;">uuid</span> <span style="color: #ff7700;font-weight:bold;">in</span> uniquepasswords:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; challenger<span style="color: #66cc66;">=</span> <span style="color: #dc143c;">pwd</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; champion<span style="color: #66cc66;">=</span> uniquepasswords<span style="color: black;">&#91;</span><span style="color: #dc143c;">pwd</span>.<span style="color: black;">uuid</span><span style="color: black;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;"># If exact match, skips</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">if</span> challenger <span style="color: #66cc66;">!=</span> champion:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;"># challenger modified recently ?</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">if</span> challenger.<span style="color: black;">lastmodtime</span> <span style="color: #66cc66;">&gt;</span> champion.<span style="color: black;">lastmodtime</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;####&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;%s&quot;</span> % <span style="color: black;">&#40;</span>challenger<span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;more recent than&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;%s&quot;</span> % <span style="color: black;">&#40;</span>champion<span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Challenger wins&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; uniquepasswords<span style="color: black;">&#91;</span><span style="color: #dc143c;">pwd</span>.<span style="color: black;">uuid</span><span style="color: black;">&#93;</span><span style="color: #66cc66;">=</span> challenger<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">elif</span> challenger.<span style="color: black;">lastmodtime</span> <span style="color: #66cc66;">&lt;</span> champion.<span style="color: black;">lastmodtime</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;####&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;%s&quot;</span> % <span style="color: black;">&#40;</span>challenger<span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;older than&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;%s&quot;</span> % <span style="color: black;">&#40;</span>champion<span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Garbage&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">else</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;"># hello you</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; uniquepasswords<span style="color: black;">&#91;</span><span style="color: #dc143c;">pwd</span>.<span style="color: black;">uuid</span><span style="color: black;">&#93;</span><span style="color: #66cc66;">=</span> <span style="color: #dc143c;">pwd</span><br />
<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;"># Append xml nodes to root</span><br />
&nbsp; &nbsp; root<span style="color: #66cc66;">=</span> etree.<span style="color: black;">Element</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;pwlist&quot;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">for</span> <span style="color: #dc143c;">pwd</span> <span style="color: #ff7700;font-weight:bold;">in</span> uniquepasswords.<span style="color: black;">values</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; root.<span style="color: black;">append</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">pwd</span>.<span style="color: black;">node</span><span style="color: black;">&#41;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;"># Write to file</span><br />
&nbsp; &nbsp; et <span style="color: #66cc66;">=</span> etree.<span style="color: black;">ElementTree</span><span style="color: black;">&#40;</span>root<span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; et.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;merge.xml&quot;</span><span style="color: #66cc66;">,</span> pretty_print<span style="color: #66cc66;">=</span><span style="color: #008000;">True</span><span style="color: #66cc66;">,</span> xml_declaration<span style="color: #66cc66;">=</span><span style="color: #008000;">True</span><span style="color: #66cc66;">,</span> encoding<span style="color: #66cc66;">=</span><span style="color: #483d8b;">'utf-8'</span><span style="color: #66cc66;">,</span> standalone<span style="color: #66cc66;">=</span><span style="color: #483d8b;">'yes'</span><span style="color: black;">&#41;</span><br />
<br />
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ <span style="color: #66cc66;">==</span> <span style="color: #483d8b;">&quot;__main__&quot;</span>:<br />
&nbsp; &nbsp; main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.jmanteau.fr/informatique/systeme/merge-de-fichiers-keepassx-ou-keepass-1-x-kdb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NCSI ou &#171;&#160;connectivité limitée&#160;&#187; sous Windows</title>
		<link>http://www.jmanteau.fr/informatique/securite/ncsi-ou-connectivite-limitee-sous-windows/</link>
		<comments>http://www.jmanteau.fr/informatique/securite/ncsi-ou-connectivite-limitee-sous-windows/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 15:13:31 +0000</pubDate>
		<dc:creator>jmanteau</dc:creator>
				<category><![CDATA[Sécurité]]></category>
		<category><![CDATA[Système]]></category>

		<guid isPermaLink="false">http://www.jmanteau.fr/?p=662</guid>
		<description><![CDATA[Depuis Windows Vista et Seven lorsque vous connectez un ordinateur à un réseau filaire ou wifi l&#8217;icône vous indique l&#8217;état de la connexion: non connecté, connectivité limitée ou accès internet. Cette information est obtenue avec NCSI ( Network Connectivity Status Indicator ). Cette fonctionnalité fonctionne de la manière suivante: NCSI effectue une requête DNS sur [...]]]></description>
			<content:encoded><![CDATA[<p>Depuis Windows Vista et Seven lorsque vous connectez un ordinateur à un réseau filaire ou wifi l&#8217;icône vous indique l&#8217;état de la connexion: non connecté, connectivité limitée ou accès internet.</p>
<p>Cette information est obtenue avec NCSI ( Network Connectivity Status Indicator ). Cette fonctionnalité fonctionne de la manière suivante:</p>
<ol>
<li>NCSI effectue une requête DNS sur www.msftncsi.com, puis demande la page http://www.msftncsi.com/ncsi.txt. C&#8217;est un fichier texte contenant Microsoft NCSI.</li>
<li>NCSI effectue une requête DNS sur dns.msftncsi.com. Cela résout normalement en 131.107.255.255. Si cette vérification échoue on a un problème de connectivité voire un DNS menteur. Mais cette vérification est le plus souvent utilisée lors d&#8217;une authentification requise par une page web (type FreeWifi, NeufWifi ou tout autre hotspot).</li>
</ol>
<p>La fonction part d&#8217;une bonne intention mais on envoie quand même une requête à Microsoft avec son IP &#8230; et les logs sont gardés:</p>
<blockquote><p>IIS logs are stored on the server at www.msftncsi.com. These logs contain the time of each access and the IP address recorded for that access. These IP addresses are not used to identify users, and in many cases, they are the address of a network address translation (NAT) computer or proxy server, not a specific client behind that NAT computer or proxy server.</p>
<p><a href="http://technet.microsoft.com/fr-fr/library/cc766017%28WS.10%29.aspx">Source</a></p></blockquote>
<p>Si on souhaite désactiver cette fonction on peut le faire dans la base de registre:</p>
<blockquote><p>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet<br />
Under the Internet key, double-click EnableActiveProbing, and then in Value data, type: 0. The default for this value is 1. Setting the value to 0 prevents NCSI from connecting to a site on the Internet during checks for connectivity.</p></blockquote>
<p>On peut également créer son propre serveur pour utiliser cette fonction en modifiant les entrées du registre correspondantes.</p>
<p>Après recherche on tombe sur des articles plus détaillées comme <a href="http://blog.superuser.com/2011/05/16/windows-7-network-awareness/">Super User.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jmanteau.fr/informatique/securite/ncsi-ou-connectivite-limitee-sous-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UDP over SSH port forwarding</title>
		<link>http://www.jmanteau.fr/informatique/systeme/652/</link>
		<comments>http://www.jmanteau.fr/informatique/systeme/652/#comments</comments>
		<pubDate>Sun, 10 Jul 2011 19:42:31 +0000</pubDate>
		<dc:creator>jmanteau</dc:creator>
				<category><![CDATA[Système]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[tunneling]]></category>

		<guid isPermaLink="false">http://www.jmanteau.fr/?p=652</guid>
		<description><![CDATA[Il est courant d&#8217;utliser les tunnels SSH pour faire transiter divers flux TCP. Cependant on ne peut utiliser le port forwarding directement avec du TCP (exemple du DNS ou SNMP). Ce billet vous montre les étapes à effectuer pour atteindre ce but. Etapes par étapes Ouvrir un tunnel SSH avec TCP forward port Depuis votre [...]]]></description>
			<content:encoded><![CDATA[<p>Il est courant d&#8217;utliser les tunnels SSH pour faire transiter divers flux TCP. Cependant on ne peut utiliser le port forwarding directement avec du TCP (exemple du DNS ou SNMP). Ce billet vous montre les étapes à effectuer pour atteindre ce but.</p>
<p><strong>Etapes par étapes</strong></p>
<p><em>Ouvrir un tunnel SSH avec TCP forward port </em></p>
<p>Depuis votre machine, se connecter au serveur SSH distant avec l&#8217;option -L pour utiliser le port forwarding :</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">local# </span><span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #660033;">-L</span> PORT_TCP_LOCAL:localhost:PORT_TCP_DISTANT IP_SERVEUR_SSH</div></td></tr></tbody></table></div>
<p>La commande précédente transfère depuis le port_tcp_local de localhost vers le port_tcp_distant de server.</p>
<p><em>Mise en place de TCP to UDP sur le serveur</em></p>
<p>Sur le serveur SSH on ouvre un listener sur le port PORT_TCP_DISTANT qui transfèrera les données vers le port UDP du serveur voulu (par exemple dans le cas d&#8217;un DNS forwarding l&#8217;IP du resolveur DNS).<br />
Avant tout il faut créer un FIFO qui fait office de transfert en local. Une fifo est une communication bidirectionnel entre deux processus. La fifo est à distinguer du pipe qui est unidirectionnel (gauche output vers droit input).</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">server# </span><span style="color: #c20cb9; font-weight: bold;">mkfifo</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>fifo</div></td></tr></tbody></table></div>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">server# </span>nc <span style="color: #660033;">-l</span> <span style="color: #660033;">-p</span> PORT_TCP_DISTANT <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>fifo <span style="color: #000000; font-weight: bold;">|</span> nc <span style="color: #660033;">-u</span> IP_SERVEUR_UDP PORT_UDP_DISTANT <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>fifo</div></td></tr></tbody></table></div>
<p>Cela permet au trafic TCP du serveur SSH d&#8217;être transmis vers le le port du serveur distant portant le service UDP nous intéressant et de transmettre également le retour.</p>
<p><em>Mise en place du UDP sur TCP sur votre machine</em></p>
<p>Maintenant nous devons effectuer la manoeuvre opposée sur notre machine.</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">local# </span><span style="color: #c20cb9; font-weight: bold;">mkfifo</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>fifo</div></td></tr></tbody></table></div>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">local# </span><span style="color: #c20cb9; font-weight: bold;">sudo</span> nc <span style="color: #660033;">-l</span> <span style="color: #660033;">-u</span> <span style="color: #660033;">-p</span> PORT_UDP_LOCAL <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>fifo <span style="color: #000000; font-weight: bold;">|</span> nc localhost PORT_TCP_LOCAL <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>fifo</div></td></tr></tbody></table></div>
<p>Cela permet au trafic UDP provenant du PORT_UDP_LOCAL d&#8217;être transféré dans le tunnel SSH écoutant sur le PORT_TCP_LOCAL</p>
<p><a href="http://www.jmanteau.fr/wp-content/uploads/2011/07/udptunneling.jpg" rel="lightbox[652]"><img class="aligncenter size-full wp-image-653" title="UDP tunneling over SSH" src="http://www.jmanteau.fr/wp-content/uploads/2011/07/udptunneling.jpg" alt="" width="504" height="575" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jmanteau.fr/informatique/systeme/652/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac OS X et wget</title>
		<link>http://www.jmanteau.fr/informatique/apple/mac-os-x-et-wget/</link>
		<comments>http://www.jmanteau.fr/informatique/apple/mac-os-x-et-wget/#comments</comments>
		<pubDate>Sat, 12 Feb 2011 10:02:56 +0000</pubDate>
		<dc:creator>jmanteau</dc:creator>
				<category><![CDATA[Apple]]></category>

		<guid isPermaLink="false">http://www.jmanteau.fr/?p=634</guid>
		<description><![CDATA[Wget est un utilitaire bien pratique pour télécharger des fichiers en ligne de commande. Malheureusement OSX ne le propose par défaut. On peut bien sur l&#8217;installer via les ports mais sur un autre Mac que le sien on peut avoir besoin d&#8217;une solution plus rapide et moins intrusive. OSX propose heureusement curl qui peut remplir [...]]]></description>
			<content:encoded><![CDATA[<p>Wget est un utilitaire bien pratique pour télécharger des fichiers en ligne de commande. Malheureusement OSX ne le propose par défaut. On peut bien sur l&#8217;installer via les ports mais sur un autre Mac que le sien on peut avoir besoin d&#8217;une solution plus rapide et moins intrusive.<br />
OSX propose heureusement curl qui peut remplir le même rôle avec l&#8217;option :</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">-O<span style="color: #000000; font-weight: bold;">/</span>--remote-name   Write output to a <span style="color: #c20cb9; font-weight: bold;">file</span> named <span style="color: #c20cb9; font-weight: bold;">as</span> the remote <span style="color: #c20cb9; font-weight: bold;">file</span></div></td></tr></tbody></table></div>
<p>Mais les habitudes ont la vie dure et donc pour simuler wget il est plus simple de rajouter un alias:</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'alias wget=&quot;curl -O&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>.bash_profile</div></td></tr></tbody></table></div>
<p>Curl propose plein d&#8217;autres options. Pour les consulter:</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">curl <span style="color: #660033;">--help</span></div></td></tr></tbody></table></div>
<p>ou</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">man</span> curl</div></td></tr></tbody></table></div>
<p>Si vous rencontrez l&#8217;erreur:</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ curl <span style="color: #660033;">-O</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.jmanteau.fr<span style="color: #000000; font-weight: bold;">/</span><br />
curl: Remote <span style="color: #c20cb9; font-weight: bold;">file</span> name has no length<span style="color: #000000; font-weight: bold;">!</span><br />
curl: try <span style="color: #ff0000;">'curl --help'</span> or <span style="color: #ff0000;">'curl --manual'</span> <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #c20cb9; font-weight: bold;">more</span> information</div></td></tr></tbody></table></div>
<p>Il faut alors utiliser curl de la façon suivante:</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">curl  http:<span style="color: #000000; font-weight: bold;">//</span>www.jmanteau.fr<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">&gt;</span> sortie.html<br />
<span style="color: #000000; font-weight: bold;">%</span> Total    <span style="color: #000000; font-weight: bold;">%</span> Received <span style="color: #000000; font-weight: bold;">%</span> Xferd  Average Speed   Time    Time     Time  Current<br />
Dload  Upload   Total   Spent    Left  Speed<br />
<span style="color: #000000;">100</span> <span style="color: #000000;">34039</span>    <span style="color: #000000;">0</span> <span style="color: #000000;">34039</span>    <span style="color: #000000;">0</span>     <span style="color: #000000;">0</span>  <span style="color: #000000;">25476</span>      <span style="color: #000000;">0</span> --:--:--  <span style="color: #000000;">0</span>:00:01 --:--:-- <span style="color: #000000;">26865</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.jmanteau.fr/informatique/apple/mac-os-x-et-wget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disques durs externes et Mac OS X</title>
		<link>http://www.jmanteau.fr/informatique/apple/disques-durs-externes-et-mac-os-x/</link>
		<comments>http://www.jmanteau.fr/informatique/apple/disques-durs-externes-et-mac-os-x/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 06:00:07 +0000</pubDate>
		<dc:creator>jmanteau</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[indexation]]></category>
		<category><![CDATA[mac os x]]></category>

		<guid isPermaLink="false">http://www.jmanteau.fr/?p=570</guid>
		<description><![CDATA[Ou plus prosaïquement comment empecher l&#8217;apparition des .Trashes, .fseventsd, et .Spotlight-V100 sur les périphériques de stockage externes sous OS X. Si vous connectez un disque externe sous Leopard (et Snow), celui-ci se sent libre d&#8217;écrire ses fichiers d&#8217;indexations dessus ! Voici comment faire pour empêcher ce comportement: Pour empêcher l’indexation Spotlight, vous devez avoir un [...]]]></description>
			<content:encoded><![CDATA[<p>Ou plus prosaïquement comment empecher l&#8217;apparition des .Trashes, .fseventsd, et .Spotlight-V100 sur les périphériques de stockage externes sous OS X.<br />
Si vous connectez un disque externe sous Leopard (et Snow), celui-ci se sent libre d&#8217;écrire ses fichiers d&#8217;indexations dessus !<br />
Voici comment faire pour empêcher ce comportement:</p>
<ul>
<li>Pour empêcher l’indexation Spotlight, vous devez avoir un fichier appelé .metadata_never_index dans la racine du disque.
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>Volumes<span style="color: #000000; font-weight: bold;">/</span>MONDISQUE<span style="color: #000000; font-weight: bold;">/</span>.metadata_never_index</div></td></tr></tbody></table></div>
</li>
<li>Pour empêcher la création du repertoire .Trashes , vous devez avoir votre propre fichier (et non un répertoire) qui s’appelle .Trashes
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>Volumes<span style="color: #000000; font-weight: bold;">/</span>MONDISQUE<span style="color: #000000; font-weight: bold;">/</span>.Trashes</div></td></tr></tbody></table></div>
</li>
<li>Pour empêcher la journalisation des événements sur le lecteur, vous devez créer un fichier no_log dans le répertoire .fseventsd
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>Volumes<span style="color: #000000; font-weight: bold;">/</span>MONDISQUE<span style="color: #000000; font-weight: bold;">/</span>.fseventsd<span style="color: #000000; font-weight: bold;">/</span>no_log</div></td></tr></tbody></table></div>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jmanteau.fr/informatique/apple/disques-durs-externes-et-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connaître l&#8217;ensemble des types de fichiers dans un répertoire</title>
		<link>http://www.jmanteau.fr/informatique/linux/connaitre-lensemble-des-types-de-fichiers-dans-un-repertoire/</link>
		<comments>http://www.jmanteau.fr/informatique/linux/connaitre-lensemble-des-types-de-fichiers-dans-un-repertoire/#comments</comments>
		<pubDate>Sun, 12 Sep 2010 17:06:37 +0000</pubDate>
		<dc:creator>jmanteau</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[filetype]]></category>

		<guid isPermaLink="false">http://www.jmanteau.fr/?p=531</guid>
		<description><![CDATA[Une ligne rapide pour avoir l&#8217;ensemble des types de fichiers dans un répertoire : 1find REPERTOIRE -type f &#124;  awk -F . '{print $NF}' &#124; sort &#124; uniq Ou avec le décompte trié par extension : 1find REPERTOIRE -type f &#124;  awk -F . '{print $NF}' &#124; sort &#124; uniq -c &#124; sort -n]]></description>
			<content:encoded><![CDATA[<p>Une ligne rapide pour avoir l&#8217;ensemble des types de fichiers dans un répertoire :</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">find</span> REPERTOIRE <span style="color: #660033;">-type</span> f <span style="color: #000000; font-weight: bold;">|</span>  <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-F</span> . <span style="color: #ff0000;">'{print $NF}'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">uniq</span></div></td></tr></tbody></table></div>
<p>Ou avec le décompte trié par extension :</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">find</span> REPERTOIRE <span style="color: #660033;">-type</span> f <span style="color: #000000; font-weight: bold;">|</span>  <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-F</span> . <span style="color: #ff0000;">'{print $NF}'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">uniq</span> <span style="color: #660033;">-c</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #660033;">-n</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.jmanteau.fr/informatique/linux/connaitre-lensemble-des-types-de-fichiers-dans-un-repertoire/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>France.fr est de retour</title>
		<link>http://www.jmanteau.fr/informatique/web/france-fr-est-de-retour/</link>
		<comments>http://www.jmanteau.fr/informatique/web/france-fr-est-de-retour/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 09:00:53 +0000</pubDate>
		<dc:creator>jmanteau</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[akamai]]></category>
		<category><![CDATA[france.fr]]></category>

		<guid isPermaLink="false">http://www.jmanteau.fr/?p=517</guid>
		<description><![CDATA[Après les péripéties du mois de juillet pour le site représentant notre chère France, il est revenu en ligne. Mais un petit coup d&#8217;œil derrière la scène monte quelque chose d&#8217;assez marrant: L&#8217;information intéressante suivante est fourni par le  whois: IP Information for 213.155.157.41 IP Location: United Kingdom Akamai International B.v IP Address: 213.155.157.41  inetnum:        213.155.157.0 - 213.155.157.255 [...]]]></description>
			<content:encoded><![CDATA[<p>Après les péripéties du mois de juillet pour <a href="http://www.france.fr">le site </a>représentant notre chère France, il est revenu en ligne.</p>
<p>Mais un petit coup d&#8217;œil derrière la scène monte quelque chose d&#8217;assez marrant:</p>
<p><a href="http://www.jmanteau.fr/wp-content/uploads/2010/08/france_fr.jpg" rel="lightbox[517]"><img title="france_fr" src="http://www.jmanteau.fr/wp-content/uploads/2010/08/france_fr.jpg" alt="" width="594" height="330" /></a></p>
<p>L&#8217;information intéressante suivante est fourni par le  whois:</p>
<div id="ipInformationContainer">
<blockquote>
<h3>IP Information for 213.155.157.41</h3>
<div>
<table>
<tbody>
<tr>
<td>IP Location:</td>
<td><img src="http://whois.domaintools.com/images/flags/uk.gif" alt="United Kingdom" width="18" height="12" /> United Kingdom		        		        Akamai International B.v</td>
</tr>
<tr>
<td>IP Address:</td>
<td>213.155.157.41 <a href="http://dns-tools.domaintools.com/ip-tools/?method=traceroute&amp;query=213.155.157.41"> </a></td>
</tr>
</tbody>
</table>
</div>
<p>inetnum:        213.155.157.0 - 213.155.157.255<br />
netname:        AKAMAI<br />
descr:          Akamai International B.V.<br />
org:            ORG-AIB7-RIPE<br />
country:        GB<br />
admin-c:        NARA1-RIPE<br />
tech-c:         NARA1-RIPE<br />
status:         ASSIGNED PA<br />
mnt-by:         TELIANET-LIR<br />
source:         RIPE # Filtered</p></blockquote>
<p>Akamai est un CDN : Content Delivery Network constitué d’ordinateurs reliés en réseau à travers Internet, et qui coopèrent afin de mettre à disposition du contenu ou des données (généralement du contenu multimédia volumineux) à des utilisateurs. Plus d&#8217;info<a href="http://fr.wikipedia.org/wiki/Content_Delivery_Network"> ici</a>.</p>
<p>Pour résoudre les problèmes de charges venant de la conception du site web (de ce que j&#8217;ai pu en lire), au lieu de refaire le site totalement (il tourne toujours sous Drupal), même si il a du être optimisé, l&#8217;hébergement est maintenant assuré par Akamai ce qui permet une meilleure disponibilité du site.</p>
<blockquote></blockquote>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.jmanteau.fr/informatique/web/france-fr-est-de-retour/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Un script pour les lier tous</title>
		<link>http://www.jmanteau.fr/informatique/systeme/un-script-pour-les-lier-tous/</link>
		<comments>http://www.jmanteau.fr/informatique/systeme/un-script-pour-les-lier-tous/#comments</comments>
		<pubDate>Tue, 18 May 2010 12:49:16 +0000</pubDate>
		<dc:creator>jmanteau</dc:creator>
				<category><![CDATA[Système]]></category>
		<category><![CDATA[livecd]]></category>
		<category><![CDATA[rescue]]></category>

		<guid isPermaLink="false">http://www.jmanteau.fr/?p=510</guid>
		<description><![CDATA[MultiCD. Ce petit script est juste superbe. Il permet de regrouper en une seule iso plusieurs isos distinctes. Le site vous l&#8217;expliquera mieux que moi : http://multicd.tuxfamily.org/ Ainsi en gravant une seule ISO vous retrouvez toutes vos distributions facilement. Pour ma part je vais me faire une ISO avec: Backtrack Tiny Core Linux GeeXboX SystemRescueCd [...]]]></description>
			<content:encoded><![CDATA[<p>MultiCD. Ce petit script est juste superbe.</p>
<p>Il permet de regrouper en une seule iso plusieurs isos distinctes. Le site vous l&#8217;expliquera mieux que moi : <a href="http://multicd.tuxfamily.org/">http://multicd.tuxfamily.org/</a></p>
<p>Ainsi en gravant une seule ISO vous retrouvez toutes vos distributions facilement.</p>
<p>Pour ma part je vais me faire une ISO avec:</p>
<ul>
<li>Backtrack</li>
<li><a href="http://www.tinycorelinux.com/">Tiny Core Linux</a></li>
<li><a href="http://geexbox.org/en/index.html/">GeeXboX</a></li>
<li><a href="http://www.sysresccd.org/">SystemRescueCd</a></li>
<li><a href="http://gparted.sourceforge.net/">GParted Live</a></li>
<li><a href="http://home.eunet.no/pnordahl/ntpasswd/">Offline NT Password  &amp; Registry Editor</a></li>
<li><a href="http://www.clonezilla.org/">Clonezilla</a></li>
<li><a href="http://www.ubuntu.com/">Ubuntu</a></li>
<li><a href="http://www.ultimatebootcd.com/">Ultimate Boot CD</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jmanteau.fr/informatique/systeme/un-script-pour-les-lier-tous/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monter un partage Samba authentifiant avec /etc/fstab</title>
		<link>http://www.jmanteau.fr/informatique/linux/monter-un-partage-samba-authentifiant-avec-etcfstab/</link>
		<comments>http://www.jmanteau.fr/informatique/linux/monter-un-partage-samba-authentifiant-avec-etcfstab/#comments</comments>
		<pubDate>Mon, 17 May 2010 11:41:13 +0000</pubDate>
		<dc:creator>jmanteau</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[authentification]]></category>
		<category><![CDATA[cifs]]></category>
		<category><![CDATA[fstab]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[smb]]></category>

		<guid isPermaLink="false">http://www.jmanteau.fr/?p=508</guid>
		<description><![CDATA[Travailler dans un environnement professionnel avec un système Linux oblige à accéder aux ressources Windows également. L&#8217;accès aux fichiers partagé Windows est un grand classique (Samba, SMB, CIFS, etc &#8230;). KDE4 propose une découverte des fichiers partagés mais le parcours des volumes est très lent. Afin d&#8217;accélerer celui-ci la meilleure solution consiste à monter en [...]]]></description>
			<content:encoded><![CDATA[<p>Travailler dans un environnement professionnel avec un système Linux oblige à accéder aux ressources Windows également. L&#8217;accès aux fichiers partagé Windows est un grand classique (Samba, SMB, CIFS, etc &#8230;).</p>
<p>KDE4 propose une découverte des fichiers partagés mais le parcours des volumes est très lent. Afin d&#8217;accélerer celui-ci la meilleure solution consiste à monter en dur les répertoires les plus couramment utilisés.</p>
<p>La ligne de commande est la suivante :</p>
<blockquote><p>//Serveur/Partage /mnt/PointDeMontage  cifs rw,_netdev,uid=1000,gid=1000,user=USER,password=PASS,domain=VotreDomain,ip=IpDuServeurDeFichier,iocharset=utf8 0  0</p>
<p>Serveur:  nom du serveur</p>
<p>Partage:  nom de la ressource partagée</p>
<p>/mnt/PointDeMontage: emplacement où la ressource sera disponible sur votre système</p>
<p>USER: votre login</p>
<p>PASS: votre password</p>
<p>VotreDomain: le nom du domaine AD</p>
<p>IpDuServeurDeFichier: IP de l&#8217;AD effectuant l&#8217;authentification</p></blockquote>
<p style="text-align: center;"><strong>ATTENTION !!!</strong></p>
<p style="text-align: center;">Tout caractère spécial mis dans le /etc/fstab doit être mis en octal précédé d&#8217;un backslash.</p>
<p style="text-align: center;">La table de conversion peut se trouver sur le site <a href="http://www.asciitable.com/">http://www.asciitable.com/</a></p>
<p style="text-align: left;">Exemple:</p>
<ul>
<li>l&#8217;espace devient \040</li>
<li>le ! devient \041</li>
<li>le &amp; devient \046</li>
<li>etc &#8230;</li>
</ul>
<p>Et voilà ! Grâce à cela la vitesse d&#8217;accès aux ressources est grandement accélérée.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jmanteau.fr/informatique/linux/monter-un-partage-samba-authentifiant-avec-etcfstab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

