<?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>Linux 360° &#124; Italia &#187; Varie</title>
	<atom:link href="http://www.linux360.it/category/varie/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linux360.it</link>
	<description>Notizie, guide e tutorial per il mondo Linux a 360°</description>
	<lastBuildDate>Tue, 16 Dec 2014 14:03:33 +0000</lastBuildDate>
	<language>it-IT</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>Cross Site Scripting XSS : vediamo alcuni esempi</title>
		<link>http://www.linux360.it/2014/08/01/cross-site-scripting-xss-vediamo-alcuni-esempi/</link>
		<comments>http://www.linux360.it/2014/08/01/cross-site-scripting-xss-vediamo-alcuni-esempi/#comments</comments>
		<pubDate>Fri, 01 Aug 2014 11:08:29 +0000</pubDate>
		<dc:creator><![CDATA[Paolo Daniele]]></dc:creator>
				<category><![CDATA[Varie]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[injection]]></category>
		<category><![CDATA[xss]]></category>

		<guid isPermaLink="false">http://www.paolodaniele.it/?p=1957</guid>
		<description><![CDATA[<p>Ciao Ragazzi, oggi torniamo alle orgini&#8230;vediamo un po&#8217; di nozioni di Hacking che ovviamente servono per difendersi e non per attaccare(lo so non sono convincente quando lo dico&#8230;&#8230;..!!!) Parliamo del Cross Site Scripting (XSS) Per chi non lo conosce vi posso dire che è un insieme di tecniche che mirano a sfruttare delle vulnerabilità presenti ...</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/08/01/cross-site-scripting-xss-vediamo-alcuni-esempi/">Cross Site Scripting XSS : vediamo alcuni esempi</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Ciao Ragazzi,</p>
<p>oggi torniamo alle orgini&#8230;vediamo un po&#8217; di nozioni di Hacking che ovviamente servono per difendersi e non per attaccare(lo so non sono convincente quando lo dico&#8230;&#8230;..!!!)</p>
<p>Parliamo del Cross Site Scripting (<strong>XSS</strong>)</p>
<p>Per chi non lo conosce vi posso dire che è un insieme di tecniche che mirano a sfruttare delle vulnerabilità presenti nel codice HTML/JAVASCRIPT ma soprattutto dovute a chi interpreta queste pagine ovvero i nostri amatissimi Browser!</p>
<p>Queste pagine web, generalmente client-side, presentano delle malformazioni nel codice, ma non perchè chi le ha programmate non ha fatto un buon lavoro, semplicemente c&#8217;è stato qualcuno più furbo che ha capito come aggirare l&#8217;interprete di queste pagine ovvero il browser.</p>
<p>Prima di passare subito ai casi pratici vi faccio un esempio classico di SQL Injection ( che è un XSS relativo al linguaggio SQL):</p>
<p><a href="http://www.paolodaniele.it/wp-content/uploads/2014/08/sqlh_0613.jpg"><img class="alignnone size-full wp-image-1958" src="http://www.paolodaniele.it/wp-content/uploads/2014/08/sqlh_0613.jpg" alt="sqlh_0613" width="404" height="279" /></a></p>
<p>In questo caso ho aggirato il codice SQL per ottenere l&#8217;accesso anche senza conoscere username o password.</p>
<p>Nel caso dell&#8217;XSS la cosa è molto simile, quello che bisogna fare è un buon debug delle pagine internet:</p>
<p><a href="http://www.paolodaniele.it/wp-content/uploads/2014/08/health1.jpg"><img class="alignnone size-full wp-image-1959" src="http://www.paolodaniele.it/wp-content/uploads/2014/08/health1.jpg" alt="health1" width="492" height="158" /></a></p>
<p>Come vedere un questo caso inserendo un carattere non standard posso creare &#8220;casini&#8221; sul sistema che interpreta la pagina web.</p>
<p>Questi caratteri &#8220;speciali&#8221; o di &#8220;escape&#8221; forniscono delle vere e proprie porte di accesso al browser e quindi alla connessione che si crea tra client e server:</p>
<p><a href="http://www.paolodaniele.it/wp-content/uploads/2014/08/background_xss.gif"><img class="alignnone  wp-image-1962" src="http://www.paolodaniele.it/wp-content/uploads/2014/08/background_xss.gif" alt="background_xss" width="451" height="286" /></a></p>
<p>Come potete notare in questo caso l&#8217;Attacker si &#8220;sostituisce&#8221; al browser del client per ingannare il server e quindi usarlo per capire diverse informazioni che possono essere cruciali.</p>
<p>Oggi vi presento un esempio semplicissimo, in realtà ne esistono diversi a secondo dei livelli di protezione alzati dai programmatori!</p>
<p>Useremo come test 2 siti:</p>
<p>1) http://it.eonline.com</p>
<p>2) http://www.paolodaniele.it</p>
<p>Mi sfido da solo!</p>
<p>Vediamo cosa succede se provo a forzare la stringa di ricerca del sito 1)</p>
<p><a href="http://www.paolodaniele.it/wp-content/uploads/2014/08/miao.jpg"><img class="alignnone  wp-image-1964" src="http://www.paolodaniele.it/wp-content/uploads/2014/08/miao.jpg" alt="miao" width="621" height="366" /></a></p>
<p>Il sito &#8220;Miagola&#8221;&#8230;Se vedete adesso la barra degli indirizzi, capirete la mia XSS:</p>
<p>it.eonline.com/search?query=<strong>&#8220;; alert(&#8216;Miao&#8217;); //</strong></p>
<p>Avete visto la stringa utilizzata?</p>
<p>In questo modo quando il browser rigenera la pagina con il nuovo &#8220;indirizzo&#8221; che gli passo io esegue il codice di alert. e quindi compare il popup che &#8220;Miagola!&#8221;</p>
<p>Complichiamo leggermente le cose, andando a far scrivere qualche variabile Javascript codificata nel sistema:</p>
<p><a href="http://www.paolodaniele.it/wp-content/uploads/2014/08/xss.jpg"><img class="alignnone  wp-image-1965" src="http://www.paolodaniele.it/wp-content/uploads/2014/08/xss.jpg" alt="xss" width="634" height="384" /></a></p>
<p>Nel secondo caso il cross script XSS è:</p>
<p>it.eonline.com/search?query=<strong>&#8220;; alert(JSON.stringify(model,null,4)); //</strong></p>
<p>Dove model è una matrice definita nei sorgenti del sito.</p>
<p>In realtà tutte queste azioni sono state effettuate client-side, io devo insegnare a difendervi&#8230;ad attaccare ce ne sono già troppi che insegnano; ma il concetto  è simile con un po&#8217; di &#8220;studio&#8221; sul sito web sarebbe possibile carpire informazioni di configurazione, dati di utenti e così via fino agli Hijack delle sessioni tramite cookie.</p>
<p>Ma&#8230;.</p>
<p>Il sito 2) ?</p>
<p>Non l&#8217;ho dimenticato&#8230;</p>
<p>Ecco il risultato della seconda XSS sul mio sito web:</p>
<p><a href="http://www.paolodaniele.it/wp-content/uploads/2014/08/noxss.jpg"><img class="alignnone  wp-image-1966" src="http://www.paolodaniele.it/wp-content/uploads/2014/08/noxss.jpg" alt="noxss" width="632" height="397" /></a></p>
<p>Nessun popup, alert o robe del genere.</p>
<p>Spesso non dipende solo dalla bontà del CMS usato, ma dall&#8217;accortezza di chi lo utilizza!!</p>
<p>Fate buon uso di queste informazioni programmatori!</p>
<p>Per chi fosse interessato ad approfondire l&#8217;argomento, vi consiglio le <a href="http://slides.com/mscasharjaved/on-breaking-php-based-cross-site-scripting-protections-in-the-wild">slide</a> di <a href="https://twitter.com/soaj1664ashar">Ashar Javed </a>un vero Guru dell&#8217;XSS dove spiega anche come aggirare i browser moderni!</p>
<p>&nbsp;</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/08/01/cross-site-scripting-xss-vediamo-alcuni-esempi/">Cross Site Scripting XSS : vediamo alcuni esempi</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux360.it/2014/08/01/cross-site-scripting-xss-vediamo-alcuni-esempi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux whois nuovi TLDs</title>
		<link>http://www.linux360.it/2014/07/30/linux-whois-tlds/</link>
		<comments>http://www.linux360.it/2014/07/30/linux-whois-tlds/#comments</comments>
		<pubDate>Wed, 30 Jul 2014 16:13:13 +0000</pubDate>
		<dc:creator><![CDATA[Paolo Daniele]]></dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[Varie]]></category>
		<category><![CDATA[nic]]></category>
		<category><![CDATA[tld]]></category>
		<category><![CDATA[whois]]></category>

		<guid isPermaLink="false">http://www.paolodaniele.it/?p=1951</guid>
		<description><![CDATA[<p>Il mondo cambia, quindi cambiano anche i domini internet. Non solo le classiche estensioni (TLD) .com, .net, .it, .org etc. oggi il mondo di internet viaggia in base alle esigenze dei clienti, rendendo disponibili quasi ogni giorno nuovi TLD. Per gli amici &#8220;linuxiani&#8221; esiste un modo molto veloce per poter effettuare il whois, cioè conoscere ...</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/07/30/linux-whois-tlds/">Linux whois nuovi TLDs</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Il mondo cambia, quindi cambiano anche i domini internet.</p>
<p>Non solo le classiche estensioni (TLD) .com, .net, .it, .org etc. oggi il mondo di internet viaggia in base alle esigenze dei clienti, rendendo disponibili quasi ogni giorno nuovi TLD.</p>
<p>Per gli amici &#8220;linuxiani&#8221; esiste un modo molto veloce per poter effettuare il whois, cioè conoscere lo stato, di un dominio con TLD di nuova generazione!</p>
<p>Per prima cosa è necessario creare (se esiste, dovete solo accodare quanto di seguito) il file <strong><em>/etc/whois.conf</em></strong> in questo file inserite quanto di seguito:</p>
<div id="wpshdo_1" class="wp-synhighlighter-outer"><div id="wpshdt_1" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_1"></a><a id="wpshat_1" class="wp-synhighlighter-title" href="#codesyntax_1"  onClick="javascript:wpsh_toggleBlock(1)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_1" onClick="javascript:wpsh_code(1)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_1" onClick="javascript:wpsh_print(1)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_1" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="co0">## </span>
<span class="co0"># WHOIS servers for new TLDs (http://www.iana.org/domains/root/db)</span>
<span class="co0">##</span>
&nbsp;
.academy$ whois.donuts.co
.actor$ whois.unitedtld.com
.agency$ whois.donuts.co
.bar$ whois.nic.bar
.bargains$ whois.donuts.co
.berlin$ whois.nic.berlin
.best$ whois.nic.best
.bid$ whois.nic.bid
.bike$ whois.donuts.co
.blue$ whois.afilias.net
.boutique$ whois.donuts.co
.build$ whois.nic.build
.builders$ whois.donuts.co
.buzz$ whois.nic.buzz
.cab$ whois.donuts.co
.camera$ whois.donuts.co
.camp$ whois.donuts.co
.cards$ whois.donuts.co
.careers$ whois.donuts.co
.catering$ whois.donuts.co
.center$ whois.donuts.co
.ceo$ whois.nic.ceo
.cheap$ whois.donuts.co
.christmas$ whois.uniregistry.net
.cleaning$ whois.donuts.co
.clothing$ whois.donuts.co
.club$ whois.nic.club
.codes$ whois.donuts.co
.coffee$ whois.donuts.co
.cologne$ whois-fe1.pdt.cologne.tango.knipp.de
.community$ whois.donuts.co
.company$ whois.donuts.co
.computer$ whois.donuts.co
.construction$ whois.donuts.co
.contractors$ whois.donuts.co
.cool$ whois.donuts.co
.cruises$ whois.donuts.co
.dance$ whois.unitedtld.com
.dating$ whois.donuts.co
.democrat$ whois.unitedtld.com
.diamonds$ whois.donuts.co
.directory$ whois.donuts.co
.domains$ whois.donuts.co
.education$ whois.donuts.co
.email$ whois.donuts.co
.enterprises$ whois.donuts.co
.equipment$ whois.donuts.co
.estate$ whois.donuts.co
.events$ whois.donuts.co
.expert$ whois.donuts.co
.exposed$ whois.donuts.co
.farm$ whois.donuts.co
.fish$ whois.donuts.co
.flights$ whois.donuts.co
.florist$ whois.donuts.co
.foundation$ whois.donuts.co
.futbol$ whois.unitedtld.com
.gallery$ whois.donuts.co
.gift$ whois.uniregistry.net
.glass$ whois.donuts.co
.graphics$ whois.donuts.co
.guitars$ whois.uniregistry.net
.guru$ whois.donuts.co
.holdings$ whois.donuts.co
.holiday$ whois.donuts.co
.house$ whois.donuts.co
.immobilien$ whois.unitedtld.com
.industries$ whois.donuts.co
.institute$ whois.donuts.co
.international$ whois.donuts.co
.jetzt$ whois.nic.jetzt
.jobs$ jobswhois.verisign-grs.com
.kaufen$ whois.unitedtld.com
.kim$ whois.afilias.net
.kitchen$ whois.donuts.co
.kiwi$ whois.dot-kiwi.com
.koeln$ whois-fe1.pdt.koeln.tango.knipp.de
.kred$ whois.nic.kred
.land$ whois.donuts.co
.lighting$ whois.donuts.co
.limo$ whois.donuts.co
.link$ whois.uniregistry.net
.london$ whois-lon.mm-registry.com
.luxury$ whois.nic.luxury
.management$ whois.donuts.co
.mango$ whois.mango.coreregistry.net
.marketing$ whois.donuts.co
.menu$ whois.nic.menu
.moda$ whois.unitedtld.com
.monash$ whois.nic.monash
.nagoya$ whois.gmoregistry.net
.ninja$ whois.unitedtld.com
.nyc$ whois.nic.nyc
.okinawa$ whois.gmoregistry.ne
.partners$ whois.donuts.co
.parts$ whois.donuts.co
.photo$ whois.uniregistry.net
.photography$ whois.donuts.co
.photos$ whois.donuts.co
.pics$ whois.uniregistry.net
.pink$ whois.afilias.net
.plumbing$ whois.donuts.co
.productions$ whois.donuts.co
.properties$ whois.donuts.co
.pub$ whois.unitedtld.com
.qpon$ whois.nic.qpon
.recipes$ whois.donuts.co
.red$ whois.nic.red
.rentals$ whois.donuts.co
.repair$ whois.donuts.co
.report$ whois.donuts.co
.reviews$ whois.unitedtld.com
.rich$ whois.afilias-srs.net
.ruhr$ whois.nic.ruhr
.sexy$ whois.uniregistry.net
.shiksha$ whois.nic.shiksha
.shoes$ whois.donuts.co
.singles$ whois.donuts.co
.social$ whois.unitedtld.com
.sohu$ whois.gtld.knet.cn
.solar$ whois.donuts.co
.solutions$ whois.donuts.co
.supplies$ whois.donuts.co
.supply$ whois.donuts.co
.support$ whois.donuts.co
.systems$ whois.donuts.co
.tattoo$ whois.uniregistry.net
.technology$ whois.donuts.co
.tienda$ whois.donuts.co
.tips$ whois.donuts.co
.today$ whois.donuts.co
.tokyo$ whois.nic.tokyo
.tools$ whois.donuts.co
.trade$ whois.nic.trade
.training$ whois.donuts.co
.uno$ whois.nic.uno
.vacations$ whois.donuts.co
.ventures$ whois.donuts.co
.viajes$ whois.donuts.co
.villas$ whois.donuts.co
.vision$ whois.donuts.co
.vote$ whois.afilias.net
.voting$ whois.nic.voting
.voto$ whois.afilias.net
.voyage$ whois.donuts.co
.wang$ whois.gtld.knet.cn
.watch$ whois.donuts.co
.webcam$ whois.nic.webcam
.wed$ whois.nic.wed
.wien$ whois.nic.wien
.wiki$ whois.nic.wiki
.works$ whois.donuts.co
.xn--3bst00m$ whois.gtld.knet.cn
.xn--3ds443g$ whois.afilias-srs.net
.xn--55qw42g$ whois.conac.cn
.xn--55qx5d$ whois.ngtld.cn
.xn--6frz82g$ whois.afilias.net
.xn--6qq986b3xl$ whois.gtld.knet.cn
.xn--80asehdb$ whois.online.rs.corenic.net
.xn--80aswg$ whois.site.rs.corenic.net
.xn--c1avg$ whois.publicinterestregistry.net
.xn--cg4bki$ whois.kr
.xn--d1acj3b$ whois.nic.xn--d1acj3b
.xn--fiq228c5hs$ whois.afilias-srs.net
.xn--fiq64b$ whois.gtld.knet.cn
.xn--i1b6b1a6a2e$ whois.publicinterestregistry.net
.xn--io0a7i$ whois.ngtld.cn
.xn--mgbab2bd$ whois.bazaar.coreregistry.net
.xn--ngbc5azd$ whois.nic.xn--ngbc5azd
.xn--nqv7f$ whois.publicinterestregistry.net
.xn--nqv7fs00ema$ whois.publicinterestregistry.net
.xn--q9jyb4c$ domain-registry-whois.l.google.com
.xn--rhqv96g$ whois.nic.xn--rhqv96g
.xn--unup4y$ whois.donuts.co
.xn--zfr164b$ whois.conac.cn
.xyz$ whois.nic.xyz
.zone$ whois.donuts.co</pre></div></div>
<p>Salvate ed uscite!</p>
<p>Et voilà!</p>
<p>Il gioco è fatto! D&#8217;ora in poi potrete controllare i nuovi TLD direttamente dal vostro terminale!</p>
<p>Enjoy!</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/07/30/linux-whois-tlds/">Linux whois nuovi TLDs</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux360.it/2014/07/30/linux-whois-tlds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Impostare Manualmente Data e ora su Linux</title>
		<link>http://www.linux360.it/2014/07/29/impostare-manualmente-data-ora-su-linux/</link>
		<comments>http://www.linux360.it/2014/07/29/impostare-manualmente-data-ora-su-linux/#comments</comments>
		<pubDate>Tue, 29 Jul 2014 13:28:40 +0000</pubDate>
		<dc:creator><![CDATA[linux360]]></dc:creator>
				<category><![CDATA[Varie]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[ora]]></category>

		<guid isPermaLink="false">http://www.linux360.it/?p=23</guid>
		<description><![CDATA[<p>Impostare Manualmente Ora e Data su Linux. Nell’amministrazione quotidiana di un sistema Linux, come ad esempio la propria workstation, può essere utile impostare manualmente data ed ora. Di seguito i comandi che possono aiutarci allo scopo. (come root) eseguire il comando date per settare l’ora di sistema date -s “01/20/2014 13:36:30″   —-&#62; formato “MM/gg/aaaa hh:mm:ss” ...</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/07/29/impostare-manualmente-data-ora-su-linux/">Impostare Manualmente Data e ora su Linux</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p><strong>Impostare Manualmente Ora e Data su Linux.</strong></p>
<p>Nell’amministrazione quotidiana di un sistema Linux, come ad esempio la propria workstation, può essere utile impostare manualmente data ed ora. Di seguito i comandi che possono aiutarci allo scopo.</p>
<p>(come root) eseguire il comando date per settare l’ora di sistema<br />
date -s “01/20/2014 13:36:30″   —-&gt; formato “MM/gg/aaaa hh:mm:ss”<br />
A questo punto, l’ora di sistema è corretta.<br />
Per regolare l’ora del computer:<br />
/sbin/hwclock -r          —&gt; legge l’ora del computer<br />
/sbin/hwclock –adjust    —&gt; regola i meccanismi di controllo dell’orologio del computer in modo da migliorarne la precisione<br />
/sbin/hwclock –systohc   —&gt; setta la data del computer a quella di sistema</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/07/29/impostare-manualmente-data-ora-su-linux/">Impostare Manualmente Data e ora su Linux</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux360.it/2014/07/29/impostare-manualmente-data-ora-su-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Master-Master Replication</title>
		<link>http://www.linux360.it/2014/07/28/mysql-master-master-replication/</link>
		<comments>http://www.linux360.it/2014/07/28/mysql-master-master-replication/#comments</comments>
		<pubDate>Mon, 28 Jul 2014 15:17:41 +0000</pubDate>
		<dc:creator><![CDATA[Paolo Daniele]]></dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[Varie]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[master]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[replication]]></category>

		<guid isPermaLink="false">http://www.paolodaniele.it/?p=1941</guid>
		<description><![CDATA[<p>Oggi voglio pubblicare un qualcosa di interessante che mi è capitato per lavoro. Ipotizziamo di avere 2 database MySQL in due zone geograficamente distanti tra loro. Questi database devono essere consistenti, cioè contenere sempre gli stessi dati, così nel caso di perdita di connessione o di blocco del database 1 tutte le connessioni verranno indirizzate ...</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/07/28/mysql-master-master-replication/">MySQL Master-Master Replication</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Oggi voglio pubblicare un qualcosa di interessante che mi è capitato per lavoro.</p>
<p>Ipotizziamo di avere 2 database MySQL in due zone geograficamente distanti tra loro.</p>
<p>Questi database devono essere consistenti, cioè contenere sempre gli stessi dati, così nel caso di perdita di connessione o di blocco del database 1 tutte le connessioni verranno indirizzate sul database 2 e viceversa.</p>
<p>Vi spiego meglio con una figura:</p>
<p><img class="alignnone  wp-image-1943" src="http://www.paolodaniele.it/wp-content/uploads/2014/07/mysql-active-active.jpg" alt="mysql-active-active" width="576" height="312" /></p>
<p>Abbiamo capito il problema, adesso vediamo come affrontarlo e trovare la soluzione.</p>
<p>In rete ho trovato molte &#8220;strade&#8221; più o meno simili, non è detto che la mia sia giusta, ma so che funziona perchè l&#8217;ho provata praticamente!</p>
<p>La soluzione che vi propongo è stata testata con mysql-server 5.5.37 su Debian 7.1 Wheezy a 64bit</p>
<p>Per prima cosa dobbiamo abilitare su entrambi i database il <strong>BINARY LOGGING </strong>che è un vero e proprio log delle operazioni che vengono effettuate su ogni database.</p>
<p>Modifichiamo il file di configurazione <em><strong>my.cnf</strong></em> come segue:</p>
<p>Database <span style="color: #ff0000;"><strong>MASTER-1</strong></span></p>
<div id="wpshdo_2" class="wp-synhighlighter-outer"><div id="wpshdt_2" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_2"></a><a id="wpshat_2" class="wp-synhighlighter-title" href="#codesyntax_2"  onClick="javascript:wpsh_toggleBlock(2)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_2" onClick="javascript:wpsh_code(2)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_2" onClick="javascript:wpsh_print(2)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_2" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;">server_id           = <span class="nu0">1</span>
log_bin             = <span class="sy0">/</span>var<span class="sy0">/</span>log<span class="sy0">/</span>mysql<span class="sy0">/</span>mysql-bin.log
log_bin_index       = <span class="sy0">/</span>var<span class="sy0">/</span>log<span class="sy0">/</span>mysql<span class="sy0">/</span>mysql-bin.log.index
relay_log           = <span class="sy0">/</span>var<span class="sy0">/</span>log<span class="sy0">/</span>mysql<span class="sy0">/</span>mysql-relay-bin
relay_log_index     = <span class="sy0">/</span>var<span class="sy0">/</span>log<span class="sy0">/</span>mysql<span class="sy0">/</span>mysql-relay-bin.index
expire_logs_days    = <span class="nu0">10</span>
max_binlog_size     = 100M
log_slave_updates   = <span class="nu0">1</span>
auto-increment-increment = <span class="nu0">2</span>
auto-increment-offset = <span class="nu0">1</span>
binlog_do_db        = sharedb</pre></div></div>
<p>Database <strong>MASTER-2</strong></p>
<div id="wpshdo_3" class="wp-synhighlighter-outer"><div id="wpshdt_3" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_3"></a><a id="wpshat_3" class="wp-synhighlighter-title" href="#codesyntax_3"  onClick="javascript:wpsh_toggleBlock(3)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_3" onClick="javascript:wpsh_code(3)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_3" onClick="javascript:wpsh_print(3)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_3" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;">server_id           = <span class="nu0">2</span>
log_bin             = <span class="sy0">/</span>var<span class="sy0">/</span>log<span class="sy0">/</span>mysql<span class="sy0">/</span>mysql-bin.log
log_bin_index       = <span class="sy0">/</span>var<span class="sy0">/</span>log<span class="sy0">/</span>mysql<span class="sy0">/</span>mysql-bin.log.index
relay_log           = <span class="sy0">/</span>var<span class="sy0">/</span>log<span class="sy0">/</span>mysql<span class="sy0">/</span>mysql-relay-bin
relay_log_index     = <span class="sy0">/</span>var<span class="sy0">/</span>log<span class="sy0">/</span>mysql<span class="sy0">/</span>mysql-relay-bin.index
expire_logs_days    = <span class="nu0">10</span>
max_binlog_size     = 100M
log_slave_updates   = <span class="nu0">1</span>
auto-increment-increment = <span class="nu0">2</span>
auto-increment-offset = <span class="nu0">2</span>
binlog_do_db        = sharedb</pre></div></div>
<p>E&#8217; molto importante definire il parametro <em><strong>auto-increment-offset</strong></em> diverso tra i due database, questo serve per evitare che ci siano conflitti di indici nelle fasi di replicazione.</p>
<p>Prima di riavviare il servizio, procediamo con la creazione/import del database sharedb su entrambi i server (ATTENZIONE consiglio che i databasesiano uguali in questa fase)</p>
<p>Sempre su entrambi i server, da console:</p>
<div id="wpshdo_4" class="wp-synhighlighter-outer"><div id="wpshdt_4" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_4"></a><a id="wpshat_4" class="wp-synhighlighter-title" href="#codesyntax_4"  onClick="javascript:wpsh_toggleBlock(4)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_4" onClick="javascript:wpsh_code(4)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_4" onClick="javascript:wpsh_print(4)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_4" class="wp-synhighlighter-inner" style="display: block;"><pre class="sql" style="font-family:monospace;"><span class="kw1">CREATE</span> user <span class="st0">'replicante'</span>@<span class="st0">'%'</span> <span class="kw1">IDENTIFIED</span> <span class="kw1">BY</span> <span class="st0">'Wp4Suppl1c4nt462!'</span>;
<span class="kw1">GRANT</span> replication slave <span class="kw1">ON</span> <span class="sy0">*.*</span> <span class="kw1">TO</span> <span class="st0">'replicante'</span>@<span class="st0">'%'</span>;</pre></div></div>
<p>Riavviamo il servizio su entrambi i server.</p>
<p>&nbsp;</p>
<p>Operiamo adesso sul server <span style="color: #ff0000;"><strong>MASTER-1</strong></span></p>
<div id="wpshdo_5" class="wp-synhighlighter-outer"><div id="wpshdt_5" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_5"></a><a id="wpshat_5" class="wp-synhighlighter-title" href="#codesyntax_5"  onClick="javascript:wpsh_toggleBlock(5)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_5" onClick="javascript:wpsh_code(5)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_5" onClick="javascript:wpsh_print(5)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_5" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;">mysql <span class="re5">-u</span> root - p</pre></div></div>
<div id="wpshdo_6" class="wp-synhighlighter-outer"><div id="wpshdt_6" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_6"></a><a id="wpshat_6" class="wp-synhighlighter-title" href="#codesyntax_6"  onClick="javascript:wpsh_toggleBlock(6)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_6" onClick="javascript:wpsh_code(6)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_6" onClick="javascript:wpsh_print(6)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_6" class="wp-synhighlighter-inner" style="display: block;"><pre class="sql" style="font-family:monospace;"><span class="kw1">SHOW</span> master <span class="kw1">STATUS</span>;</pre></div></div>
<p>Appare una cosa del genere:</p>
<p>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| File                              | Position | Binlog_Do_DB | Binlog_Ignore_DB |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| mysql-bin.000001 |      106     |   sharedb               |                                       |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+</p>
<p>Passiamo su <strong>MASTER-2</strong></p>
<p>Da console sql:</p>
<div id="wpshdo_7" class="wp-synhighlighter-outer"><div id="wpshdt_7" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_7"></a><a id="wpshat_7" class="wp-synhighlighter-title" href="#codesyntax_7"  onClick="javascript:wpsh_toggleBlock(7)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_7" onClick="javascript:wpsh_code(7)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_7" onClick="javascript:wpsh_print(7)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_7" class="wp-synhighlighter-inner" style="display: block;"><pre class="sql" style="font-family:monospace;">slave stop;
<span class="kw1">CHANGE</span> MASTER <span class="kw1">TO</span> MASTER_HOST <span class="sy0">=</span> <span class="st0">'IP-MASTER-1'</span><span class="sy0">,</span> MASTER_USER <span class="sy0">=</span> <span class="st0">'replicante'</span><span class="sy0">,</span> MASTER_PASSWORD <span class="sy0">=</span> <span class="st0">'Wp4Suppl1c4nt462!'</span><span class="sy0">,</span> MASTER_LOG_FILE <span class="sy0">=</span> <span class="st0">'mysql-bin.000001'</span><span class="sy0">,</span> MASTER_LOG_POS <span class="sy0">=</span> <span class="nu0">106</span>;
slave start;
<span class="kw1">SHOW</span> master <span class="kw1">STATUS</span>;</pre></div></div>
<p>Apparirà quealcosa del genere:</p>
<p>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| File                              | Position | Binlog_Do_DB | Binlog_Ignore_DB |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| mysql-bin.000002 |     1060   |   sharedb              |                                       |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+</p>
<p>Torniamo su <span style="color: #ff0000;"><strong>MASTER-1</strong></span></p>
<p>Da console sql:</p>
<div id="wpshdo_8" class="wp-synhighlighter-outer"><div id="wpshdt_8" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_8"></a><a id="wpshat_8" class="wp-synhighlighter-title" href="#codesyntax_8"  onClick="javascript:wpsh_toggleBlock(8)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_8" onClick="javascript:wpsh_code(8)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_8" onClick="javascript:wpsh_print(8)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_8" class="wp-synhighlighter-inner" style="display: block;"><pre class="sql" style="font-family:monospace;">slave stop;
<span class="kw1">CHANGE</span> MASTER <span class="kw1">TO</span> MASTER_HOST <span class="sy0">=</span> <span class="st0">'IP-MASTER-2'</span><span class="sy0">,</span> MASTER_USER <span class="sy0">=</span> <span class="st0">'replicante'</span><span class="sy0">,</span> MASTER_PASSWORD <span class="sy0">=</span> <span class="st0">'Wp4Suppl1c4nt462!'</span><span class="sy0">,</span> MASTER_LOG_FILE <span class="sy0">=</span> <span class="st0">'mysql-bin.000002'</span><span class="sy0">,</span> MASTER_LOG_POS <span class="sy0">=</span> <span class="nu0">1060</span>;
slave start;</pre></div></div>
<p>Il gioco è fatto!</p>
<p>Proviamo a fare un update su uno dei due master e vedremo la replica in tempo (quasi reale!) sull&#8217;altro!</p>
<p>Per essere sicuri, da uno dei due server sempre da console fate un:</p>
<div id="wpshdo_9" class="wp-synhighlighter-outer"><div id="wpshdt_9" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_9"></a><a id="wpshat_9" class="wp-synhighlighter-title" href="#codesyntax_9"  onClick="javascript:wpsh_toggleBlock(9)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_9" onClick="javascript:wpsh_code(9)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_9" onClick="javascript:wpsh_print(9)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_9" class="wp-synhighlighter-inner" style="display: block;"><pre class="sql" style="font-family:monospace;"><span class="kw1">SHOW</span> slave <span class="kw1">STATUS</span>;</pre></div></div>
<p>dovreste ottenere un qualcosa del genere:</p>
<p>&#8230;&#8230;&#8230;.Waiting for master to send event | IP-MASTER &#8230;&#8230;&#8230;&#8230;.</p>
<p>Enjoy!</p>
<p>&nbsp;</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/07/28/mysql-master-master-replication/">MySQL Master-Master Replication</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux360.it/2014/07/28/mysql-master-master-replication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux: Rimuovere Password da documenti PDF</title>
		<link>http://www.linux360.it/2014/07/15/linux-rimuovere-password-documenti-pdf/</link>
		<comments>http://www.linux360.it/2014/07/15/linux-rimuovere-password-documenti-pdf/#comments</comments>
		<pubDate>Tue, 15 Jul 2014 11:02:26 +0000</pubDate>
		<dc:creator><![CDATA[Paolo Daniele]]></dc:creator>
				<category><![CDATA[Varie]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.paolodaniele.it/?p=1927</guid>
		<description><![CDATA[<p>Ciao Ragazzi, oggi voglio fare l&#8217;Hacker&#8230;in fondo lo siamo un po&#8217; tutti! Vi spiego come rimuovere le protezioni dai file PDF, molto spesso non servono per motivi &#8220;nocivi&#8221; ma anche solo per poter aggiungere delle note o dei segnalibri per facilitarne la consultazione. Su Linux esistono due modi. MODO 1: CONOSCO LA PASSWORD Ovviamente questo ...</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/07/15/linux-rimuovere-password-documenti-pdf/">Linux: Rimuovere Password da documenti PDF</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Ciao Ragazzi,</p>
<p>oggi voglio fare l&#8217;Hacker&#8230;in fondo lo siamo un po&#8217; tutti!</p>
<p>Vi spiego come rimuovere le protezioni dai file PDF, molto spesso non servono per motivi &#8220;nocivi&#8221; ma anche solo per poter aggiungere delle note o dei segnalibri per facilitarne la consultazione.</p>
<p>Su Linux esistono due modi.</p>
<h3><strong>MODO 1: CONOSCO LA PASSWORD</strong></h3>
<p>Ovviamente questo caso è relativo allo 0,00001% di voi!</p>
<p>Se conoscete la password del vostro documento è semplice, esistono diversi programmi che fanno al caso vostro:</p>
<p><strong>pdftk</strong> &#8211; Molto utile per la manipolazione dei file PDF.<br />
<strong>qpdf</strong> &#8211; Converte da PDF a PDF .<br />
<strong>xpdf-utils</strong> &#8211; Suite con diversi tool per manipolazione di PDF<br />
<strong>Print to a file</strong> &#8211; Software Evince per stampare direttamente su File</p>
<p><strong>PDFTK</strong></p>
<div id="wpshdo_10" class="wp-synhighlighter-outer"><div id="wpshdt_10" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_10"></a><a id="wpshat_10" class="wp-synhighlighter-title" href="#codesyntax_10"  onClick="javascript:wpsh_toggleBlock(10)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_10" onClick="javascript:wpsh_code(10)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_10" onClick="javascript:wpsh_print(10)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_10" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> pdftk
pdftk input.pdf output output.pdf user_pw YOURPASSWORD-HERE</pre></div></div>
<p>Oppure:</p>
<div id="wpshdo_11" class="wp-synhighlighter-outer"><div id="wpshdt_11" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_11"></a><a id="wpshat_11" class="wp-synhighlighter-title" href="#codesyntax_11"  onClick="javascript:wpsh_toggleBlock(11)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_11" onClick="javascript:wpsh_code(11)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_11" onClick="javascript:wpsh_print(11)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_11" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;">pdftk input.pdf output output.pdf user_pw YOURPASSWORD-HERE owner_pw YOURPASSWORD-HERE</pre></div></div>
<p>Oppure:</p>
<div id="wpshdo_12" class="wp-synhighlighter-outer"><div id="wpshdt_12" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_12"></a><a id="wpshat_12" class="wp-synhighlighter-title" href="#codesyntax_12"  onClick="javascript:wpsh_toggleBlock(12)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_12" onClick="javascript:wpsh_code(12)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_12" onClick="javascript:wpsh_print(12)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_12" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;">pdftk input.pdf output output.pdf input_pw YOURPASSWORD-HERE</pre></div></div>
<p><strong>QPDF</strong></p>
<div id="wpshdo_13" class="wp-synhighlighter-outer"><div id="wpshdt_13" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_13"></a><a id="wpshat_13" class="wp-synhighlighter-title" href="#codesyntax_13"  onClick="javascript:wpsh_toggleBlock(13)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_13" onClick="javascript:wpsh_code(13)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_13" onClick="javascript:wpsh_print(13)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_13" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> qpdf
qpdf <span class="re5">--password</span>=YOURPASSWORD-HERE <span class="re5">--decrypt</span> input.pdf output.pdf</pre></div></div>
<p><strong>XPDF UTILS</strong></p>
<div id="wpshdo_14" class="wp-synhighlighter-outer"><div id="wpshdt_14" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_14"></a><a id="wpshat_14" class="wp-synhighlighter-title" href="#codesyntax_14"  onClick="javascript:wpsh_toggleBlock(14)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_14" onClick="javascript:wpsh_code(14)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_14" onClick="javascript:wpsh_print(14)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_14" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> xpdf-utils
pdftops <span class="re5">-upw</span> YOURPASSWORD-HERE input.pdf</pre></div></div>
<p>Si lo so ho rotto con tutti questi software&#8230;adesso arriviamo alla parte divertente!!</p>
<h3><strong>MODO 2: NON CONOSCO LA PASSWORD</strong></h3>
<div id="wpshdo_15" class="wp-synhighlighter-outer"><div id="wpshdt_15" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_15"></a><a id="wpshat_15" class="wp-synhighlighter-title" href="#codesyntax_15"  onClick="javascript:wpsh_toggleBlock(15)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_15" onClick="javascript:wpsh_code(15)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_15" onClick="javascript:wpsh_print(15)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_15" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="kw2">gs</span> <span class="re5">-q</span> <span class="re5">-dNOPAUSE</span> <span class="re5">-dBATCH</span> <span class="re5">-sDEVICE</span>=pdfwrite <span class="re5">-sOutputFile</span>=unencrypted.pdf <span class="re5">-c</span> .setpdfwrite <span class="re5">-f</span> encrypted.pdf</pre></div></div>
<p>Enjoy!</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/07/15/linux-rimuovere-password-documenti-pdf/">Linux: Rimuovere Password da documenti PDF</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux360.it/2014/07/15/linux-rimuovere-password-documenti-pdf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mikrotik Scripting: Failover Routing for Asterisk PBX</title>
		<link>http://www.linux360.it/2014/06/25/mikrotik-scripting-failover-routing-for-asterisk-pbx/</link>
		<comments>http://www.linux360.it/2014/06/25/mikrotik-scripting-failover-routing-for-asterisk-pbx/#comments</comments>
		<pubDate>Wed, 25 Jun 2014 14:35:21 +0000</pubDate>
		<dc:creator><![CDATA[Paolo Daniele]]></dc:creator>
				<category><![CDATA[Varie]]></category>

		<guid isPermaLink="false">http://www.paolodaniele.it/?p=1911</guid>
		<description><![CDATA[<p>Hi Guys, today i&#8217;ll show you some scripting tricks! Assume we have 2 Internet connection and a Mikrotik device (e.g. Mikrotik 750, Mikrotik 750GL etc.) and we want to put those connection in failover mode. Failover mode start when Primary connection fails (e.g. ADSL link down) so we need to switch all traffic to Secondary ...</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/06/25/mikrotik-scripting-failover-routing-for-asterisk-pbx/">Mikrotik Scripting: Failover Routing for Asterisk PBX</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Hi Guys,</p>
<p>today i&#8217;ll show you some scripting tricks!</p>
<p>Assume we have 2 Internet connection and a Mikrotik device (e.g. Mikrotik 750, Mikrotik 750GL etc.) and we want to put those connection in failover mode.</p>
<p>Failover mode start when Primary connection fails (e.g. ADSL link down) so we need to switch all traffic to Secondary connection.</p>
<p>This is easy to do with some route command, but what&#8217;s happened to Asterisk VoIP PBX?</p>
<p>When Asterisk loose the Primary connection, all registration to sip providers not switch automatically to Secondary connection, so the VoIP PBX stop working but internet works!</p>
<p>How can we solve this thing?</p>
<p>Let&#8217;s go scripting!</p>
<p>First of all i&#8217;m going to explain you the idea. we&#8217;re going to put to scripts into our device.</p>
<p>One that periodically do some check ping to 2 ip address. When ping is ok, we&#8217;re fine and nothing happen.</p>
<p>When ping fails from both address, we&#8217;ve lost connection so this is the trigger for the script.</p>
<p>The first script, that we&#8217;re going to call &#8220;Check Script&#8221;, disable the Primary Internet GW and send an email to alert us.</p>
<p>After a 3 seconds delay reboot the device.</p>
<p>So this is the trigger for second script, that we&#8217;re going to call &#8220;Restart Script&#8221;, that after a 10 second delay(necessary to get the device up completely) check if the Primary Internet GW is disabled (maybe you reboot the device for other purpose?!?!?) .</p>
<p>If Primary GW is disabled, the script assign it a rounting distance of 3 (so the Secondary became the Master Internet GW) and enable it to check if the connection come back.</p>
<p>If pings are now ok, restore the Primary Interface as Master by changing the distance to 1 otherwise Primary link is down for some bad reason, and connection remains on with Secondary GW.</p>
<p>Under this Scenario Asterisk VoIP does not stop working but remains up!</p>
<p>Those are the two Scripts:</p>
<p><strong>CHECK SCRIPT</strong></p>
<div id="wpshdo_16" class="wp-synhighlighter-outer"><div id="wpshdt_16" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_16"></a><a id="wpshat_16" class="wp-synhighlighter-title" href="#codesyntax_16"  onClick="javascript:wpsh_toggleBlock(16)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_16" onClick="javascript:wpsh_code(16)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_16" onClick="javascript:wpsh_print(16)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_16" class="wp-synhighlighter-inner" style="display: block;"><pre class="powershell" style="font-family:monospace;">:global strDate <span class="br0">[</span><span class="sy0">/</span>system clock get date<span class="br0">]</span>
:global strTime <span class="br0">[</span><span class="sy0">/</span>system clock get time<span class="br0">]</span>
:global strSystemName <span class="br0">[</span><span class="sy0">/</span>system identity get name<span class="br0">]</span>
&nbsp;
&nbsp;
:<span class="kw3">if</span> <span class="br0">&#40;</span><span class="br0">[</span><span class="sy0">/</span>ping 10.104.7.187 interface<span class="sy0">=</span>pppoe<span class="sy0">-</span>out1 count<span class="sy0">=</span><span class="nu0">5</span><span class="br0">]</span> <span class="sy0">=</span> <span class="nu0">0</span> <span class="sy0">&amp;&amp;</span> <span class="br0">[</span><span class="sy0">/</span>ping 8.8.4.4 interface<span class="sy0">=</span>pppoe<span class="sy0">-</span>out1 count<span class="sy0">=</span><span class="nu0">5</span><span class="br0">]</span> <span class="sy0">=</span> <span class="nu0">0</span> <span class="sy0">&amp;&amp;</span> <span class="br0">[</span><span class="sy0">/</span>ip route get <span class="br0">[</span>find comment<span class="sy0">=</span><span class="st0">&quot;Primary&quot;</span><span class="br0">]</span> disabled<span class="br0">]</span><span class="sy0">=</span>false<span class="br0">&#41;</span> <span class="kw3">do</span><span class="sy0">=</span><span class="br0">&#123;</span>
    :log info <span class="st0">&quot;Disabling Primary&quot;</span>;
    <span class="sy0">/</span>ip route <span class="kw2">set</span> <span class="br0">[</span>find comment<span class="sy0">=</span><span class="st0">&quot;Primary&quot;</span><span class="br0">]</span> disabled<span class="sy0">=</span>yes
    <span class="sy0">/</span>tool e<span class="sy0">-</span>mail send from<span class="sy0">=</span><span class="st0">&quot;yyyyy@gmail.com&quot;</span> to<span class="sy0">=</span><span class="st0">&quot;xxxx@gmail.com&quot;</span> subject<span class="sy0">=</span><span class="st0">&quot;Route Failover - $strDate $strTime - $strSystemName&quot;</span> body<span class="sy0">=</span><span class="st0">&quot;Failover to Telecom occurred at $strDate $strTime on $strSystemName&quot;</span>
    :delay 3
    <span class="sy0">/</span>system reboot
&nbsp;
<span class="br0">&#125;</span> <span class="kw3">else</span><span class="sy0">=</span> <span class="br0">&#123;</span>
    :log info <span class="st0">&quot;No Failover Necessary&quot;</span>;
<span class="br0">&#125;</span></pre></div></div>
<p>&nbsp;</p>
<p><strong>RESTART SCRIPT</strong></p>
<div id="wpshdo_17" class="wp-synhighlighter-outer"><div id="wpshdt_17" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_17"></a><a id="wpshat_17" class="wp-synhighlighter-title" href="#codesyntax_17"  onClick="javascript:wpsh_toggleBlock(17)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_17" onClick="javascript:wpsh_code(17)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_17" onClick="javascript:wpsh_print(17)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_17" class="wp-synhighlighter-inner" style="display: block;"><pre class="powershell" style="font-family:monospace;">:delay <span class="nu0">10</span>;
:<span class="kw3">if</span> <span class="br0">&#40;</span><span class="br0">[</span><span class="sy0">/</span>ip route get <span class="br0">[</span>find comment<span class="sy0">=</span><span class="st0">&quot;Primary&quot;</span><span class="br0">]</span> disabled<span class="br0">]</span><span class="sy0">=</span>true<span class="br0">&#41;</span> <span class="kw3">do</span><span class="sy0">=</span><span class="br0">&#123;</span>
    <span class="sy0">/</span>interface ethernet <span class="kw2">set</span> numbers<span class="sy0">=</span>4 disabled<span class="sy0">=</span>no
   
     <span class="sy0">/</span>ip route <span class="kw2">set</span> <span class="br0">[</span>find comment<span class="sy0">=</span><span class="st0">&quot;Primary&quot;</span><span class="br0">]</span> disabled<span class="sy0">=</span>no
     <span class="sy0">/</span>ip route <span class="kw2">set</span> <span class="br0">[</span>find comment<span class="sy0">=</span><span class="st0">&quot;Primary&quot;</span><span class="br0">]</span> distance<span class="sy0">=</span>3
    :delay 10
    :<span class="kw3">if</span> <span class="br0">&#40;</span><span class="br0">[</span><span class="sy0">/</span>ping 10.104.7.187 routing<span class="sy0">-</span>table<span class="sy0">=</span>Primary count<span class="sy0">=</span>5<span class="br0">]</span> <span class="sy0">&gt;</span> 0 <span class="sy0">&amp;&amp;</span> <span class="br0">[</span><span class="sy0">/</span>ping 8.8.4.4 routing<span class="sy0">-</span>table<span class="sy0">=</span>Primary count<span class="sy0">=</span>5<span class="br0">]</span> <span class="sy0">&gt;</span> 0<span class="br0">&#41;</span> <span class="kw3">do</span><span class="sy0">=</span><span class="br0">&#123;</span>
&nbsp;
       <span class="sy0">/</span>ip route <span class="kw2">set</span> <span class="br0">[</span>find comment<span class="sy0">=</span><span class="st0">&quot;Primary&quot;</span><span class="br0">]</span> distance<span class="sy0">=</span>1
       <span class="sy0">/</span>system reboot
    <span class="br0">&#125;</span>
     <span class="kw3">else</span><span class="sy0">=</span> <span class="br0">&#123;</span>
       
        <span class="sy0">/</span>ip route <span class="kw2">set</span> <span class="br0">[</span>find comment<span class="sy0">=</span><span class="st0">&quot;Primary&quot;</span><span class="br0">]</span> distance<span class="sy0">=</span>3
&nbsp;
    <span class="br0">&#125;</span>
<span class="br0">&#125;</span> <span class="kw3">else</span><span class="sy0">=</span> <span class="br0">&#123;</span>
    :log info <span class="st0">&quot;No Failover Necessary&quot;</span>;
<span class="br0">&#125;</span></pre></div></div>
<p>Enjoy!</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/06/25/mikrotik-scripting-failover-routing-for-asterisk-pbx/">Mikrotik Scripting: Failover Routing for Asterisk PBX</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux360.it/2014/06/25/mikrotik-scripting-failover-routing-for-asterisk-pbx/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ubuntu Desktop Errore</title>
		<link>http://www.linux360.it/2014/06/20/ubuntu-desktop-errore/</link>
		<comments>http://www.linux360.it/2014/06/20/ubuntu-desktop-errore/#comments</comments>
		<pubDate>Fri, 20 Jun 2014 14:01:35 +0000</pubDate>
		<dc:creator><![CDATA[Paolo Daniele]]></dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Varie]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[errore]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.paolodaniele.it/?p=1907</guid>
		<description><![CDATA[<p>Oggi ho combinato un casino! Stavo provando il nuovo client Telegram per Ubuntu, Sigram e non riuscivo a farlo partire! Ho fatto un po&#8217; di prove e poi ho deciso di disinstallare le librerie aggiuntive che ho installato. Tra queste, non l&#8217;avessi mai fatto, c&#8217;erano anche delle librerie che mi hanno seriamente compromesso il desktop ...</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/06/20/ubuntu-desktop-errore/">Ubuntu Desktop Errore</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Oggi ho combinato un casino!</p>
<p>Stavo provando il nuovo client Telegram per Ubuntu, Sigram e non riuscivo a farlo partire!</p>
<p>Ho fatto un po&#8217; di prove e poi ho deciso di disinstallare le librerie aggiuntive che ho installato.</p>
<p>Tra queste, non l&#8217;avessi mai fatto, c&#8217;erano anche delle librerie che mi hanno seriamente compromesso il desktop di ubuntu!</p>
<p>A volta capita&#8230;.anche ai migliori!</p>
<p>Detto fatto, sistemiamo subito la questione.</p>
<p>Da riga di comando digitare:</p>
<div id="wpshdo_18" class="wp-synhighlighter-outer"><div id="wpshdt_18" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_18"></a><a id="wpshat_18" class="wp-synhighlighter-title" href="#codesyntax_18"  onClick="javascript:wpsh_toggleBlock(18)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_18" onClick="javascript:wpsh_code(18)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_18" onClick="javascript:wpsh_print(18)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_18" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> <span class="re5">--reinstall</span> ubuntu-desktop</pre></div></div>
<p>Piano piano torna tutto normale&#8230;</p>
<p>Un bel reboot e il nostro Gnome è tornato in vita!</p>
<p>Enjoy!</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/06/20/ubuntu-desktop-errore/">Ubuntu Desktop Errore</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux360.it/2014/06/20/ubuntu-desktop-errore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trovare gli IP liberi di una rete con NMAP</title>
		<link>http://www.linux360.it/2014/05/24/trovare-gli-ip-liberi-rete-nmap/</link>
		<comments>http://www.linux360.it/2014/05/24/trovare-gli-ip-liberi-rete-nmap/#comments</comments>
		<pubDate>Sat, 24 May 2014 13:35:06 +0000</pubDate>
		<dc:creator><![CDATA[linux360]]></dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Varie]]></category>
		<category><![CDATA[nmap]]></category>

		<guid isPermaLink="false">http://www.linux360.it/?p=26</guid>
		<description><![CDATA[<p>Trovare gli IP liberi di una rete con NMAP. Nell’amministrazione quotidiana di una rete, come ad esempio la propria rete domestica, può essere utile individuare un metodo veloce per individuare indirizzi IP liberi. Di seguito un metodo rapido e funzionale che prevede l&#8217;utilizzo di nmap: nmap -v -sP 10.104.102.0/24 &#124; grep “is down.” &#62; ipliberi.txt; ...</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/05/24/trovare-gli-ip-liberi-rete-nmap/">Trovare gli IP liberi di una rete con NMAP</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p><strong>Trovare gli IP liberi di una rete con NMAP.</strong></p>
<p>Nell’amministrazione quotidiana di una rete, come ad esempio la propria rete domestica, può essere utile individuare un metodo veloce per individuare indirizzi IP liberi. Di seguito un metodo rapido e funzionale che prevede l&#8217;utilizzo di nmap:</p>
<p>nmap -v -sP 10.104.102.0/24 | grep “is down.” &gt; ipliberi.txt;</p>
<p>Fa un grep degli hop che vede in stato down e li scrive tutti nel file ipliberi.txt</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/05/24/trovare-gli-ip-liberi-rete-nmap/">Trovare gli IP liberi di una rete con NMAP</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux360.it/2014/05/24/trovare-gli-ip-liberi-rete-nmap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mikrotik Scripting: Check Queue Tree Limit Exceeded</title>
		<link>http://www.linux360.it/2014/05/10/mikrotik-scripting-check-queue-tree-limit-exceeded/</link>
		<comments>http://www.linux360.it/2014/05/10/mikrotik-scripting-check-queue-tree-limit-exceeded/#comments</comments>
		<pubDate>Sat, 10 May 2014 14:10:21 +0000</pubDate>
		<dc:creator><![CDATA[Paolo Daniele]]></dc:creator>
				<category><![CDATA[Varie]]></category>

		<guid isPermaLink="false">http://www.paolodaniele.it/?p=1733</guid>
		<description><![CDATA[<p>Today i&#8217;ll show you a little script for RouterOS to check if queue tree exceed the limit you set. For. Example i&#8217;ve a queue tree that limit the amount o total traffic(Upload+Download) to 50MBps I want to know whenever this queue exceed the limit, and i want the system to send me an email. This ...</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/05/10/mikrotik-scripting-check-queue-tree-limit-exceeded/">Mikrotik Scripting: Check Queue Tree Limit Exceeded</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Today i&#8217;ll show you a little script for RouterOS to check if queue tree exceed the limit you set.</p>
<p>For. Example i&#8217;ve a queue tree that limit the amount o total traffic(Upload+Download) to 50MBps</p>
<p>I want to know whenever this queue exceed the limit, and i want the system to send me an email.</p>
<p>This is the script:</p>
<div id="wpshdo_19" class="wp-synhighlighter-outer"><div id="wpshdt_19" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_19"></a><a id="wpshat_19" class="wp-synhighlighter-title" href="#codesyntax_19"  onClick="javascript:wpsh_toggleBlock(19)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_19" onClick="javascript:wpsh_code(19)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_19" onClick="javascript:wpsh_print(19)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_19" class="wp-synhighlighter-inner" style="display: block;"><pre class="powershell" style="font-family:monospace;">:global checkrate <span class="br0">[</span><span class="sy0">/</span>queue tree get total<span class="sy0">-</span>traffic rate<span class="br0">]</span>
:local limit 50000000
&nbsp;
:<span class="kw3">if</span> <span class="br0">&#40;</span> <span class="re0">$checkrate</span> <span class="sy0">&lt;</span> <span class="re0">$limit</span> <span class="br0">&#41;</span> <span class="kw3">do</span><span class="sy0">=</span><span class="br0">&#123;</span>
:log info <span class="br0">&#40;</span><span class="st0">&quot;Queue not Exceeded&quot;</span><span class="br0">&#41;</span>
<span class="br0">&#125;</span>
:<span class="kw3">if</span> <span class="br0">&#40;</span> <span class="re0">$checkrate</span> <span class="sy0">&gt;</span> <span class="re0">$limit</span> <span class="br0">&#41;</span> <span class="kw3">do</span><span class="sy0">=</span><span class="br0">&#123;</span>
:log info <span class="br0">&#40;</span><span class="st0">&quot;Queue Exceeded&quot;</span><span class="br0">&#41;</span>
<span class="sy0">/</span>tool e<span class="sy0">-</span>mail send server<span class="sy0">=</span>xxx.xxx.xxx.xxx from<span class="sy0">=</span><span class="st0">&quot;me@myself.com&quot;</span> to<span class="sy0">=</span><span class="st0">&quot;me@myself.com&quot;</span> subject<span class="sy0">=</span><span class="br0">&#40;</span><span class="st0">&quot;Queue Limit Exceed&quot;</span><span class="br0">&#41;</span> body<span class="sy0">=</span><span class="br0">&#40;</span><span class="st0">&quot;Queue Limit Exceed, Limit is: &quot;</span> . <span class="re0">$checkrate</span><span class="br0">&#41;</span>
<span class="br0">&#125;</span></pre></div></div>
<p>I&#8217;ll explain the code:</p>
<p>First i define a variable <strong>checkrate</strong> that represent the instant rate of the queue tree named <strong>total-traffic</strong> then i define a <strong>limit</strong>(this case i&#8217;ve used 50Mbps) then i check if rate less than limit do nothing or just log to test the script.</p>
<p>If checkrate greater than limit send an email to myself.</p>
<p>Be sure to specify as email server an IP address and not the name of the server(ex. mail.myself.com)</p>
<p>Enjoy!</p>
<p>&nbsp;</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/05/10/mikrotik-scripting-check-queue-tree-limit-exceeded/">Mikrotik Scripting: Check Queue Tree Limit Exceeded</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux360.it/2014/05/10/mikrotik-scripting-check-queue-tree-limit-exceeded/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Libre Office errore SMB</title>
		<link>http://www.linux360.it/2014/05/08/libre-office-errore-smb/</link>
		<comments>http://www.linux360.it/2014/05/08/libre-office-errore-smb/#comments</comments>
		<pubDate>Thu, 08 May 2014 15:14:34 +0000</pubDate>
		<dc:creator><![CDATA[Paolo Daniele]]></dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Varie]]></category>
		<category><![CDATA[libre office]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[smb]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://www.paolodaniele.it/?p=1728</guid>
		<description><![CDATA[<p>L&#8217;altro giorno mi è capito di avere un problema con Libre Office 4.0.2 Non mi apriva più i file condivisi in una cartella di rete. Dovevo necessariamente scaricare il file sul computer e poi rimetterlo in rete con ovvie rotture di **** Allora ho cercato un po&#8217;, ho aggiornato alla versione 4.2.4, ma niente stesso ...</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/05/08/libre-office-errore-smb/">Libre Office errore SMB</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>L&#8217;altro giorno mi è capito di avere un problema con Libre Office 4.0.2</p>
<p>Non mi apriva più i file condivisi in una cartella di rete.</p>
<p>Dovevo necessariamente scaricare il file sul computer e poi rimetterlo in rete con ovvie rotture di ****</p>
<p>Allora ho cercato un po&#8217;, ho aggiornato alla versione 4.2.4, ma niente stesso problema!</p>
<p>Alla fine ho trovato la soluzione e la metto a vostra disposizione.</p>
<p>Basta inserire questa riga:</p>
<div id="wpshdo_20" class="wp-synhighlighter-outer"><div id="wpshdt_20" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_20"></a><a id="wpshat_20" class="wp-synhighlighter-title" href="#codesyntax_20"  onClick="javascript:wpsh_toggleBlock(20)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_20" onClick="javascript:wpsh_code(20)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_20" onClick="javascript:wpsh_print(20)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_20" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="kw2">sed</span> <span class="re5">-i</span> <span class="st_h">'s/X-GIO-NoFuse=true/#X-GIO-NoFuse=true/'</span> <span class="sy0">/</span>usr<span class="sy0">/</span>share<span class="sy0">/</span>applications<span class="sy0">/</span>libreoffice-<span class="sy0">*</span></pre></div></div>
<p>(per libre office diverso dalla versione 4)</p>
<div id="wpshdo_21" class="wp-synhighlighter-outer"><div id="wpshdt_21" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_21"></a><a id="wpshat_21" class="wp-synhighlighter-title" href="#codesyntax_21"  onClick="javascript:wpsh_toggleBlock(21)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_21" onClick="javascript:wpsh_code(21)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_21" onClick="javascript:wpsh_print(21)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_21" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="kw2">sed</span> <span class="re5">-i</span> <span class="st_h">'s/X-GIO-NoFuse=true/#X-GIO-NoFuse=true/'</span> <span class="sy0">/</span>usr<span class="sy0">/</span>share<span class="sy0">/</span>applications<span class="sy0">/</span>libreoffice4.2-<span class="sy0">*</span></pre></div></div>
<p>(per libre office dalla versione 4.2 in poi)</p>
<p>Tutto Risolto!!</p>
<p>Enjoy!</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/05/08/libre-office-errore-smb/">Libre Office errore SMB</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux360.it/2014/05/08/libre-office-errore-smb/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
