diff --git a/_posts/2016-05-03-satoshisignature.md b/_posts/2016-05-03-satoshisignature.md index 5e2ea25..d81e067 100644 --- a/_posts/2016-05-03-satoshisignature.md +++ b/_posts/2016-05-03-satoshisignature.md @@ -93,3 +93,5 @@ this [page](https://en.bitcoin.it/wiki/List_of_address_prefixes) explains that t ## So, is it a fake? Yes, indeed. At the end, I ask, why would you choose anything else than the easiest and most conclusive way to prove something? + +![Wright "signs" the blockchain](/wp-content/uploads/2016/satosh.jpg) diff --git a/_posts/2016-07-05-arduino_keyboard.md b/_posts/2016-07-05-arduino_keyboard.md new file mode 100644 index 0000000..4c38ef5 --- /dev/null +++ b/_posts/2016-07-05-arduino_keyboard.md @@ -0,0 +1,86 @@ +--- +title: Arduino Uno as HID keyboard +date: 2016-07-05 +author: pesceWanda +layout: post +categories: + - PesceWanda +tags: + - Arduino + - HID arduino + - mechanical keyboard + - programming + - arduino uno +--- + +Turin is the hometown of Arduino. I have been at the [fablab](http://fablabtorino.org/) multiple times but I am more of a software guy. +I had to come all the way to America to get my hands on a simple Arduino Uno. +For 60$ I bought a cheap (but still good!) mechanical keyboard by Qisan, a clone of the Arduino Uno and a USB host shield. + +Given that is 3 years since I have been using a dvorak layout and it's a pain to change layout on every machine that you have to use. +You can imagine that given this three pieces of hardware together I put together an hardware key mapper for the keyboard. + +I have never had experience with Arduino before but it was not that difficult to make it do simple things like blinking the led or send signal through to a serial monitor. + +It took me half an hour to wear down all my excitement: the USB Host Shield library broke all the compatibility with the similar project I found wandering online. + +In particular [this blog](http://hunt.net.nz/users/darran/) has the most precious information and the guy wrote a HID driver that allows the Uno to be seen as a HID device. + +It was a noob error but I didn't checked the various arduino alternatives and I discovered late that just a few have the HID capabilities that would make this work easier. I should have bought and Arduino Due or Leonardo maybe. + +Also, the various guides about flashing with a dfu tool are specific to older models of the Uno and it took me some time to figure the name of the new components so that I could flash a new firmware. + +## A small journey in the Arduino world + +It feels pretentious to write a little guide for this kind of work, given also the fact that I have roughly 10 hours of experience with the Arduino. But the other resources are really outdated so I hope this piece can be useful to someone out there. + +All the files I have used today are on [my repos](http://francescomecca.eu:3000/pesceWanda/arduino_HID_keyboard) and I included also an outdated version of the USB Host Shield library that I used. + +The original code from this [blog post](http://hunt.net.nz/users/darran/weblog/c6f35/Arduino_USB_Keyboard_Passthrough.html) works like a charm but just as a simple passthrough. + +It was not difficult at all to examine the code: +during each loop of the iteration a char array gets read from the shield and if it is contains information Arduino with the Serial.Write method send the data to the host. + +The buffer array is a simple array of length 8 and the first two positions are reserved. In particular the first one represent the various modifier keys. + +The dvorak layout has the same pairs as the US layout but eventually I got used to having the '@' where at the same place of 'Q' (qwerty) and '"' over the '2'. +Also, I am an avid ViM user (I should thank Simone Basso for that) and I swapped some keys on the new 65 keys keyboard. +The modifier bit at the beginning of the array came in handy for my code. + +An hardware key remapper is a simple but long switch C statement but I decided to consider also the modifier bit: in this way certain keys like the Window (UGH!) key is mapped to a different layer of keys. +I got all the codes for the HID events [here](http://www.freebsddiary.org/APC/usb_hid_usages.php). + +The process of flashing the code on the Uno goes like this: + +* write the looping code; +* push it to the Arduino using the IDE; +* shortcircuit the board so that it goes in DFU mode; +* flash the .hex HID firmware; +* try your code; +* repeat until it's right. + + +![Everything fits in one picture](/wp-content/uploads/2016/IMG_20160706_011304.jpg) + +## Flashing the firmware + +The firmware is in my repo but I got it from (here)[http://hunt.net.nz/users/darran/weblog/a6d52/Arduino_UNO_Keyboard_HID_version_02.html]. +The tool I used to flash it is dfu-programmer (version 0.62). +Every time you want to flash a new firmware the Arduino must be put in DFU mode (you can see the difference with lsusb). +To do that simply create a shortcircuit using a small metal wire on the two pins near the reset button and a led will blink. +This [video](https://www.youtube.com/watch?v=E8XyRwXQr8Q) shows the method briefly (no real need for a jumper). +The commands are the following and there is no risk to brick the Uno: + +``` +dfu-programmer atmega16u2 erase +dfu-programmer atmega16u2 flash Arduino-keyboard-0.2.hex +dfu-programmer atmega16u2 reset + +``` + +After each flashing the device needs to be disconnected once. Of course you can flash the original firmware back. It is included in my repo or on the official ones. + + +![Arduino and the shield](/wp-content/uploads/2016/IMG_20160706_011143.jpg) + +That's it, as you can see is not difficult at all. The worst part is gathering the various info that are left dormant in blogs or forums. diff --git a/_site/archive/index.html b/_site/archive/index.html index 1c12aa7..776a4a2 100644 --- a/_site/archive/index.html +++ b/_site/archive/index.html @@ -132,6 +132,7 @@

Blog Posts

diff --git a/_site/atom.xml b/_site/atom.xml index c53952c..b44256b 100644 --- a/_site/atom.xml +++ b/_site/atom.xml @@ -4,7 +4,7 @@ Caught in the Net - 2016-05-17T15:09:02+02:00 + 2016-07-06T01:48:39-04:00 francescomecca.eu Francesco Mecca @@ -12,10 +12,86 @@ + + Arduino Uno as HID keyboard + + 2016-07-05T00:00:00-04:00 + francescomecca.eu/pescewanda/2016/07/05/arduino_keyboard + <p>Turin is the hometown of Arduino. I have been at the <a href="http://fablabtorino.org/">fablab</a> multiple times but I am more of a software guy. +I had to come all the way to America to get my hands on a simple Arduino Uno. +For 60$ I bought a cheap (but still good!) mechanical keyboard by Qisan, a clone of the Arduino Uno and a USB host shield.</p> + +<p>Given that is 3 years since I have been using a dvorak layout and it&#39;s a pain to change layout on every machine that you have to use. +You can imagine that given this three pieces of hardware together I put together an hardware key mapper for the keyboard.</p> + +<p>I have never had experience with Arduino before but it was not that difficult to make it do simple things like blinking the led or send signal through to a serial monitor.</p> + +<p>It took me half an hour to wear down all my excitement: the USB Host Shield library broke all the compatibility with the similar project I found wandering online.</p> + +<p>In particular <a href="http://hunt.net.nz/users/darran/">this blog</a> has the most precious information and the guy wrote a HID driver that allows the Uno to be seen as a HID device.</p> + +<p>It was a noob error but I didn&#39;t checked the various arduino alternatives and I discovered late that just a few have the HID capabilities that would make this work easier. I should have bought and Arduino Due or Leonardo maybe.</p> + +<p>Also, the various guides about flashing with a dfu tool are specific to older models of the Uno and it took me some time to figure the name of the new components so that I could flash a new firmware.</p> + +<h2>A small journey in the Arduino world</h2> + +<p>It feels pretentious to write a little guide for this kind of work, given also the fact that I have roughly 10 hours of experience with the Arduino. But the other resources are really outdated so I hope this piece can be useful to someone out there.</p> + +<p>All the files I have used today are on <a href="http://francescomecca.eu:3000/pesceWanda/arduino_HID_keyboard">my repos</a> and I included also an outdated version of the USB Host Shield library that I used.</p> + +<p>The original code from this <a href="http://hunt.net.nz/users/darran/weblog/c6f35/Arduino_USB_Keyboard_Passthrough.html">blog post</a> works like a charm but just as a simple passthrough.</p> + +<p>It was not difficult at all to examine the code: +during each loop of the iteration a char array gets read from the shield and if it is contains information Arduino with the Serial.Write method send the data to the host.</p> + +<p>The buffer array is a simple array of length 8 and the first two positions are reserved. In particular the first one represent the various modifier keys.</p> + +<p>The dvorak layout has the same pairs as the US layout but eventually I got used to having the &#39;@&#39; where at the same place of &#39;Q&#39; (qwerty) and &#39;&quot;&#39; over the &#39;2&#39;. +Also, I am an avid ViM user (I should thank Simone Basso for that) and I swapped some keys on the new 65 keys keyboard. +The modifier bit at the beginning of the array came in handy for my code.</p> + +<p>An hardware key remapper is a simple but long switch C statement but I decided to consider also the modifier bit: in this way certain keys like the Window (UGH!) key is mapped to a different layer of keys. +I got all the codes for the HID events <a href="http://www.freebsddiary.org/APC/usb_hid_usages.php">here</a>.</p> + +<p>The process of flashing the code on the Uno goes like this:</p> + +<ul> +<li>write the looping code;</li> +<li>push it to the Arduino using the IDE;</li> +<li>shortcircuit the board so that it goes in DFU mode;</li> +<li>flash the .hex HID firmware;</li> +<li>try your code;</li> +<li>repeat until it&#39;s right.</li> +</ul> + +<p><img src="/wp-content/uploads/2016/IMG_20160706_011304.jpg" alt="Everything fits in one picture"></p> + +<h2>Flashing the firmware</h2> + +<p>The firmware is in my repo but I got it from (here)[http://hunt.net.nz/users/darran/weblog/a6d52/Arduino<em>UNO</em>Keyboard<em>HID</em>version_02.html]. +The tool I used to flash it is dfu-programmer (version 0.62). +Every time you want to flash a new firmware the Arduino must be put in DFU mode (you can see the difference with lsusb). +To do that simply create a shortcircuit using a small metal wire on the two pins near the reset button and a led will blink. +This <a href="https://www.youtube.com/watch?v=E8XyRwXQr8Q">video</a> shows the method briefly (no real need for a jumper). +The commands are the following and there is no risk to brick the Uno:</p> +<div class="highlight"><pre><code class="language-" data-lang="">dfu-programmer atmega16u2 erase +dfu-programmer atmega16u2 flash Arduino-keyboard-0.2.hex +dfu-programmer atmega16u2 reset + +</code></pre></div> +<p>After each flashing the device needs to be disconnected once. Of course you can flash the original firmware back. It is included in my repo or on the official ones.</p> + +<p><img src="/wp-content/uploads/2016/IMG_20160706_011143.jpg" alt="Arduino and the shield"></p> + +<p>That&#39;s it, as you can see is not difficult at all. The worst part is gathering the various info that are left dormant in blogs or forums.</p> + + + Lifehacks (2) - 2016-05-16T00:00:00+02:00 + 2016-05-16T00:00:00-04:00 francescomecca.eu/pescewanda/2016/05/16/lifehacks2 <ul> <li><p>If you&#39;re at a party and you don&#39;t know anyone, make it a point to meet the host and introduce yourself. The host can introduce you to other guys/girls and it scores you points.</p></li> @@ -30,7 +106,7 @@ Interpolation using a genetic algorithm - 2016-05-15T00:00:00+02:00 + 2016-05-15T00:00:00-04:00 francescomecca.eu/pescewanda/2016/05/15/genetic-alg <p>This weekend I was in Milan to get a visa and I had the opportunity to work with a friend, Michele, on genetic algorithms. It was the first time I dig up in such field and it was very exciting. @@ -117,7 +193,7 @@ Anyway for simple cases the GA yields good results, as an example for points (0 Why Wright's proof is a fake - 2016-05-03T00:00:00+02:00 + 2016-05-03T00:00:00-04:00 francescomecca.eu/pescewanda/2016/05/03/satoshisignature <p>I explained in my previous <a href="http://francescomecca.eu/pescewanda/2016/04/17/wright-nakamoto/">post</a> (in italian) that the signature that Wright provided as a public proof is in fact invalid. I want to explain briefly how you could check this claim. @@ -192,13 +268,15 @@ this <a href="https://en.bitcoin.it/wiki/List_of_address_prefixes"& <p>Yes, indeed. At the end, I ask, why would you choose anything else than the easiest and most conclusive way to prove something?</p> + +<p><img src="/wp-content/uploads/2016/satosh.jpg" alt="Wright &quot;signs&quot; the blockchain"></p> #JeSuisSatoshiNakamoto - 2016-04-17T00:00:00+02:00 + 2016-04-17T00:00:00-04:00 francescomecca.eu/pescewanda/2016/04/17/wright-nakamoto <p>Ieri mattina appena sveglio mi sono imbattuto in questo <a href="http://gavinandresen.ninja/satoshi">post</a> di Gavin Andresen, uno dei più importanti membri della Bitcoin Foundation. In quelle righe Gavin attribuisce l&#39;identità di Satoshi Nakamoto, il padre dei Bitcoin, a Craig Wright, un imprenditore australiano. @@ -298,7 +376,7 @@ Ogni altra prova è discutibile e non necessaria.</p> Kyuss Music Player - 2016-04-17T00:00:00+02:00 + 2016-04-17T00:00:00-04:00 francescomecca.eu/pescewanda/2016/04/17/kpd-player <p>For a long time I have been using Clementine music player on my workstation. Recently I reinstalled Gentoo on my desktop and I wanted to avoid installing QT libraries of any sort. So I switched to <a href="https://www.musicpd.org/">mpd</a> and I have fallen in love with it. It is very flexible, fast and enriched by a lot of community software. @@ -356,7 +434,7 @@ The source for our program is stored in my git <a href="http://francesco Bright Father - 2016-04-10T00:00:00+02:00 + 2016-04-10T00:00:00-04:00 francescomecca.eu/pescewanda/2016/04/10/short-lesson-from-reddit <blockquote> <p>My father used to tell us ridiculous false information all the time. The catch was if we could catch one out and prove him wrong he&#39;d give us a dollar. As we got older it would got a little less outrageous, but we&#39;d still get that dollar if we could prove it. Looking back it was a good way to get us to think for ourselves.</p> @@ -369,7 +447,7 @@ The source for our program is stored in my git <a href="http://francesco Lifehacks - 2016-04-10T00:00:00+02:00 + 2016-04-10T00:00:00-04:00 francescomecca.eu/pescewanda/2016/04/10/lifehacks <ul> <li><p>Even though you may be nervous about talking to random people, the worst you can get is &quot;Go away&quot;.</p></li> @@ -388,7 +466,7 @@ instantaneously.</p></li> The Buridan's donkey in python - 2016-04-02T00:00:00+02:00 + 2016-04-02T00:00:00-04:00 francescomecca.eu/pescewanda/2016/04/02/buridan_donkey <p>During the final weeks of my exam session I started reading a bit about python 3 using an excellent book: <a href="http://www.diveintopython.net/">Dive into Python</a>. When I noted that python uses the <a href="https://en.wikipedia.org/wiki/Mersenne_Twister">Mersenne Twister PRNG</a> as well I decided to write another version of my <a href="http://francescomecca.eu/index.php/archives/207">Buridan&#39;s donkey program</a>.</p> @@ -423,7 +501,7 @@ The bot can be added to your contact list by simply searching for <a href=&qu How I migrated to a static blog - 2016-04-02T00:00:00+02:00 + 2016-04-02T00:00:00-04:00 francescomecca.eu/pescewanda/2016/04/02/blog-migrated <p>Until one week ago my blog was hosted at my house, on a raspberrypi with debian + wordpress. I was not satisfied by my setup because given the minimal size of my blog and the really scarce content I post every now and then, a full LLMP stack was overblown. I decided to change distribution (my server now runs <a href="http://www.voidlinux.eu/">Void</a>) and to migrate to a static blog without CMS nor PHP.</p> @@ -474,7 +552,7 @@ Finally I put a link to the archive, my github page and the atom feed on the sid The Buridan’s donkey paradox - 2015-09-20T12:34:36+02:00 + 2015-09-20T06:34:36-04:00 francescomecca.eu/index.php/archives/the-buridans-donkey-paradox <p style="text-align: left;"> The Buridan&#8217;s donkey is an illustration of a paradox regarding the philosophy of moral determinism and free will. @@ -572,7 +650,7 @@ The original idea for the Buridan&#39;s donkey came from my mentor <a hre About Perl packages in Gentoo - 2015-09-11T14:52:25+02:00 + 2015-09-11T08:52:25-04:00 francescomecca.eu/index.php/archives/about-perl-packages-in-gentoo <p>In this post I wish to explain a bit about Perl related ebuilds in Gentoo and how to update from perl-core to virtual/perl without conflicts.</p> @@ -609,7 +687,7 @@ perl-cleaner --all</pre> 56 secondi di celebrita` - 2015-08-31T13:18:01+02:00 + 2015-08-31T07:18:01-04:00 francescomecca.eu/index.php/archives/56-secondi-di-celebrita <p><a href="http://www.mantellini.it/2015/08/26/state-al-riparo/" target="_blank" rel="http://www.mantellini.it/2015/08/26/state-al-riparo/"><img class="aligncenter wp-image-178 size-full" src="http://francescomecca.eu/wp-content/uploads/2015/08/Schermata-2015-08-26-alle-22.29.31.jpg" alt="" width="644" height="533" srcset="http://francescomecca.eu/wp-content/uploads/2015/08/Schermata-2015-08-26-alle-22.29.31-300x248.jpg 300w, http://francescomecca.eu/wp-content/uploads/2015/08/Schermata-2015-08-26-alle-22.29.31.jpg 644w" sizes="(max-width: 644px) 100vw, 644px" /></a></p> @@ -670,7 +748,7 @@ perl-cleaner --all</pre> Addio Blogspot - 2015-08-25T11:41:56+02:00 + 2015-08-25T05:41:56-04:00 francescomecca.eu/index.php/archives/addio-blogspot <p><a href="http://dashburst.com/nsa-needs-google-eye-in-sky/"><img class="aligncenter wp-image-172 size-medium" src="http://francescomecca.eu/wp-content/uploads/2015/08/googlebigbrother-296x300.jpg" alt="" width="296" height="300" srcset="http://francescomecca.eu/wp-content/uploads/2015/08/googlebigbrother-296x300.jpg 296w, http://francescomecca.eu/wp-content/uploads/2015/08/googlebigbrother.jpg 669w" sizes="(max-width: 296px) 100vw, 296px" /></a>Ho deciso di abbandonare Blogspot per le stesse ragioni per cui ho smesso di utilizzare i servizi Google due anni fa: privacy e controllo.</p> @@ -687,7 +765,7 @@ perl-cleaner --all</pre> A pochi metri da Stallman - 2015-07-21T16:51:00+02:00 + 2015-07-21T10:51:00-04:00 francescomecca.eu/index.php/archives/a-pochi-metri-da-stallman <p><span style="font-family: inherit;">Il 25 giugno sono stato alla presentazione del master di primo livello in “<a href="http://nexacenter.org/2015/06/master-software-libero">Management del Software Libero</a>”, che si e` tenuto nella sala della palazzo della Regione Piemonte. </span></p> @@ -747,7 +825,7 @@ perl-cleaner --all</pre> Puo` un sottomarino nuotare? Deep learning e intelligenze artificiali - 2015-07-21T15:59:00+02:00 + 2015-07-21T09:59:00-04:00 francescomecca.eu/index.php/archives/puo-un-sottomarino-nuotare-deep-learning-e-intelligenze-artificiali <p>Nel <a href="https://en.wikipedia.org/wiki/De_Arte_Combinatoria">De Arte Combinatoria</a> (1666) Leibniz afferma che tutta la logica del pensiero umano non sia altro che una combinazione di pensieri piu` piccoli che a loro volta possono essere frammentati in idee semplicissime e concatenabili.</p> @@ -838,7 +916,7 @@ perl-cleaner --all</pre> Dodici brevi domande sul mondo del giornalismo nell’era digitale - 2015-07-07T20:18:00+02:00 + 2015-07-07T14:18:00-04:00 francescomecca.eu/index.php/archives/dodici-brevi-domande-sul-mondo-del-giornalismo-nellera-digitale <h4><span style="font-size: large;">Premessa </span></h4> @@ -959,7 +1037,7 @@ perl-cleaner --all</pre> La Rivoluzione Digitale nella Professione dell’Avvocato - 2015-07-07T17:35:00+02:00 + 2015-07-07T11:35:00-04:00 francescomecca.eu/index.php/archives/la-rivoluzione-digitale-nella-professione-dellavvocato <h4><span style="font-size: large;">Premessa</span></h4> @@ -1044,7 +1122,7 @@ perl-cleaner --all</pre> Script per il bulk download da Archive.org - 2015-06-30T15:39:00+02:00 + 2015-06-30T09:39:00-04:00 francescomecca.eu/index.php/archives/script-per-il-bulk-download-da-archive-org <p>In questi giorni mi e` capitato di dover scaricare varie collezioni da <a href="https://en.wikipedia.org/wiki/Internet_Archive">archive.org</a>, una libreria digitale multimediale la cui missione e` l&#8217;accesso universale a tutta la conoscenza.</p> @@ -1091,7 +1169,7 @@ echo Complete. L’FBI contro la crittografia - 2015-06-13T14:29:00+02:00 + 2015-06-13T08:29:00-04:00 francescomecca.eu/index.php/archives/lfbi-contro-la-crittografia <div class="MsoNormal" style="text-align: justify;"> Un argomento sul quale si è discusso molto negli ultimi tempi è quello della crittografia dei dati, un ufficiale dell’FBI ha testimoniato che lo scopo delle forze dell’ordine è quello di collaborare con una società tecnologica per prevenire la crittografia. Anche se le compagnie non dovrebbero mettere l’accesso alla crittazione dei clienti prima di preoccupazioni per la sicurezza nazionale, perché la maggiore priorità del governo è quella di prevenire l’uso di tecnologie che proteggono ogni cosa che le persone fanno online. Il loro scopo non è quello di usare una “back door”, termine usato dagli esperti per descrivere punti di accesso integrati, ma quello di accedere ai contenuti dopo essere passati per un processo giudiziario. @@ -1166,7 +1244,7 @@ echo Complete. Nativi digitali: oltre il recinto della Generazione Google - 2015-06-13T01:57:00+02:00 + 2015-06-12T19:57:00-04:00 francescomecca.eu/index.php/archives/nativi-digitali-oltre-il-recinto-della-generazione-google <p>&nbsp;</p> @@ -1245,7 +1323,7 @@ echo Complete. Aerei FBI: pericolo per la privacy o sicurezza per i cittadini? - 2015-06-06T13:23:00+02:00 + 2015-06-06T07:23:00-04:00 francescomecca.eu/index.php/archives/aerei-fbi-pericolo-per-la-privacy-o-sicurezza-per-i-cittadini <p>Recentemente l&#8217;<a href="http://bigstory.ap.org/article/4b3f220e33b64123a3909c60845da045/fbi-behind-mysterious-surveillance-aircraft-over-us-cities">Associated Press</a> ha dichiarato che sono stati avvistati numerosi aerei americani che volavano a bassa quota nei pressi di alcune città americane. Dopo averli tracciati si è scoperto che gli aerei erano in possesso dell&#8217;FBI, che ne aveva menzionato ben 115 nel documento di bilancio federale del 2009.</p> @@ -1289,7 +1367,7 @@ David Gomez, un ex agente dell&#8217;FBI , ha detto che il velivolo di sorve Guida pratica a LUKS - 2015-06-01T14:14:00+02:00 + 2015-06-01T08:14:00-04:00 francescomecca.eu/index.php/archives/guida-pratica-a-luks <blockquote> <div style="text-align: left;"> @@ -1423,7 +1501,7 @@ Command successful.</pre> La taglia unica del Web 2.0 - 2015-06-01T13:12:00+02:00 + 2015-06-01T07:12:00-04:00 francescomecca.eu/index.php/archives/la-taglia-unica-del-web-2-0 <p><a href="https://www.youtube.com/embed/e3Zs74IH0mc?feature=player_embedded">In questo discorso</a> al summit Web 2.0 del 2011 Chris Poole, il fondatore di 4chan, riflette sul concetto di identita` e di come stia cambiando con l&#8217;introduzione del Web 2.0.</p> @@ -1476,7 +1554,7 @@ Command successful.</pre> Defend yourself: crittografia e “plausible deniability” - 2015-05-22T23:52:00+02:00 + 2015-05-22T17:52:00-04:00 francescomecca.eu/index.php/archives/defend-yourself-crittografia-e-plausible-deniability <p>Nel 2000, ben molto prima dello scandalo datagate, prima perfino dell&#8217;attacco alle torri gemelle, il Parlamento inglese approvo` una legge sulla sorveglianza di massa.<br> Questa legge, intitolata <a href="https://en.wikipedia.org/wiki/Regulation_of_Investigatory_Powers_Act_2000">RIPA</a>, Regulation of Investigatory Powers Act, interviene su come il corpo di polizia puo` condurre le investigazioni telematiche. </p> @@ -1552,7 +1630,7 @@ Truecrypt permette di creare un volume crittografico che si presenta come un fil Rischiare il carcere per TOR - 2015-05-18T14:12:00+02:00 + 2015-05-18T08:12:00-04:00 francescomecca.eu/index.php/archives/rischiare-il-carcere-per-tor <p>Articolo tradotto da <a href="http://motherboard.vice.com/read/the-operators">motherboard.vice.com</a><span id="goog_42434934"></span><span id="goog_42434935"></span></p> @@ -2187,7 +2265,7 @@ Truecrypt permette di creare un volume crittografico che si presenta come un fil NSA e le intercettazioni telefoniche - 2015-05-09T00:41:00+02:00 + 2015-05-08T18:41:00-04:00 francescomecca.eu/index.php/archives/nsa-e-le-intercettazioni-telefoniche <div class="MsoNormal" style="text-align:justify;"> <table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float:right;margin-left:1em;text-align:right;"> @@ -2247,7 +2325,7 @@ Truecrypt permette di creare un volume crittografico che si presenta come un fil Google afferma di essere pronta a dare agli utenti android più controllo sulla privacy - 2015-05-09T00:18:00+02:00 + 2015-05-08T18:18:00-04:00 francescomecca.eu/index.php/archives/google-afferma-di-essere-pronta-a-dare-agli-utenti-android-piu-controllo-sulla-privacy <div style="text-align:center;"> articolo tradotto da <a href="http://www.bloomberg.com/news/articles/2015-05-07/google-said-ready-to-give-android-users-more-privacy-controls" target="_blank">bloomberg.com</a> @@ -2283,7 +2361,7 @@ Truecrypt permette di creare un volume crittografico che si presenta come un fil La prima volta non si scorda mai! - 2015-05-08T22:16:00+02:00 + 2015-05-08T16:16:00-04:00 francescomecca.eu/index.php/archives/la-prima-volta-non-si-scorda-mai <p><span style="font-family:inherit;">Questa e` un&#8217; intervista fatta da noi del blog per noi del blog dove descriviamo la nostra prima esperienza nel Web, le nostre prime impressioni e le avventure che in questi anni ci hanno aiutato a maturare confidenza e consapevolezza in Internet. </span></p> @@ -2435,7 +2513,7 @@ Truecrypt permette di creare un volume crittografico che si presenta come un fil La Rete e’ neutrale - 2015-05-08T17:02:00+02:00 + 2015-05-08T11:02:00-04:00 francescomecca.eu/index.php/archives/la-rete-e-neutrale <p>Quando ogni giorno ci connettiamo al web lo facciamo con dei presupposti di cui magari non siamo consapevoli, ma che sono alla base della nostra esperienza in rete. </p> @@ -2508,7 +2586,7 @@ Alcuni <a href="https://trac.torproject.org/projects/tor/wiki/doc/GoodBa Trinita` - 2015-05-04T15:29:00+02:00 + 2015-05-04T09:29:00-04:00 francescomecca.eu/index.php/archives/trinita <table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float:right;margin-left:1em;text-align:right;"> <tr> @@ -2535,7 +2613,7 @@ L&#8217;opera si trova a Berlino.</p> Ancora nessuna visita dalla Cina - 2015-04-29T02:34:00+02:00 + 2015-04-28T20:34:00-04:00 francescomecca.eu/index.php/archives/ancora-nessuna-visita-dalla-cina <p><span style="font-family:inherit;">Questo blog non puo<code>essere &lt;a href=&quot;http://www.greatfirewallofchina.org/index.php?siteurl=caught-in-thenet.blogspot.it&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;visualizzato&lt;/a&gt; in Cina.&lt;br /&gt;A partire dal 1993 mentre molti altri Stati si occupavano delle leggi sul cyber crimine il CCP (Chinese Communist Party) ha dato inizio ad una delle piu</code> grandi operazioni di censura moderna mai messa in atto: il Grande Firewall Cinese. </span> </p> @@ -2616,7 +2694,7 @@ L&#8217;opera si trova a Berlino.</p> Javascript attacca la cache del processore - 2015-04-23T18:52:00+02:00 + 2015-04-23T12:52:00-04:00 francescomecca.eu/index.php/archives/javascript-attacca-la-cache-del-processore <p>Lo scorso febbraio 4 ricercatori della Columbia University hanno ideato un attacco <a href="https://en.wikipedia.org/wiki/Side-channel_attack">side channel</a> in grado di penetrare la cache dei processori intel piu` recenti di qualsiasi OS.<br> L&#8217;attacco avviene attraverso l&#8217;uso di codice Javascript e analizza la cache di terzo livello del processore. Il pdf tecnico e` disponibile a questo <a href="http://arxiv.org/abs/1502.07373">indirizzo</a>.</p> @@ -2645,7 +2723,7 @@ L&#8217;attacco avviene attraverso l&#8217;uso di codice Javascript e an Suicide Linux - 2015-04-19T22:24:00+02:00 + 2015-04-19T16:24:00-04:00 francescomecca.eu/index.php/archives/suicide-linux <div class="MsoNormal" style="text-align:center;"> </div> @@ -2762,7 +2840,7 @@ L&#8217;attacco avviene attraverso l&#8217;uso di codice Javascript e an Boneless, l’uomo senza identità che derubò HackBB - 2015-04-19T14:31:00+02:00 + 2015-04-19T08:31:00-04:00 francescomecca.eu/index.php/archives/boneless-luomo-senza-identita-che-derubo-hackbb <p>Tra i molti siti illegali del Deep Web uno molto popolare che si occupa di molte attività illegali, dalla vendita di carte di credito rubate all hacking di personal computer e server, è HackBB che nel 2013 fu soggetto a uno dei pù grossi furti mai avvenuti in rete da parte di un suo amministratore chiamato Boneless.</p> @@ -2801,7 +2879,7 @@ Secondo alcuni amministartori del sito, tra cui OptimusCrime, Boneless vendette Non abbiamo nulla da nascondere - 2015-04-15T12:54:00+02:00 + 2015-04-15T06:54:00-04:00 francescomecca.eu/index.php/archives/non-abbiamo-nulla-da-nascondere <div class="separator" style="clear: both; text-align: center;"> </div> @@ -2889,7 +2967,7 @@ Secondo alcuni amministartori del sito, tra cui OptimusCrime, Boneless vendette Facciamo luce sui profili ombra - 2015-04-13T03:25:00+02:00 + 2015-04-12T21:25:00-04:00 francescomecca.eu/index.php/archives/facciamo-luce-sui-profili-ombra <p>La BPC, Belgian Privacy Commision, il 31 marzo ha pubblicato un <a href="http://www.law.kuleuven.be/icri/en/news/item/facebooks-revised-policies-and-terms-v1-2.pdf">documento</a> investigativo sulle policy di Facebook e da questa indagine e` emersa una violazione delle leggi europee sul <a href="http://rt.com/news/245769-facebook-spies-eu-laws/">tracciamento online</a>.</p> @@ -2946,7 +3024,7 @@ In questo modo ed attraverso i cookie Facebook riesce a riunire la maggior parte Anonymous: we are legion - 2015-04-13T02:09:00+02:00 + 2015-04-12T20:09:00-04:00 francescomecca.eu/index.php/archives/anonymous-we-are-legion <div class="MsoNormal" style="text-align:justify;"> Trattando argomenti quali l’anonimato e la privacy, non si può fare a meno di parlare di uno dei movimenti più rappresentativi di queste due tematiche, ovvero Anonymous. Questo movimento nasce nel 2003, e per il suo nome prende ispirazione dal nickname usato nei siti di imageboard, siti nei quali un thread può essere iniziato solo con un immagine, quali per esempio 4chan, 711chan, dove chi commentava senza identificarsi appariva come “anonymous”, e da qui si incominciò a identificare anonymous come una persona reale. </p> @@ -3052,7 +3130,7 @@ In questo modo ed attraverso i cookie Facebook riesce a riunire la maggior parte L’anonimato violato di TOR - 2015-04-13T00:27:00+02:00 + 2015-04-12T18:27:00-04:00 francescomecca.eu/index.php/archives/lanonimato-violato-di-tor <p>Miliardi di persone usano giornalmente internet, ma sono poche quelle a conoscenza del suo lato oscuro, il deep web,nel quale sono presenti siti che gestiscono business illegali (dalla vendita di account rubati alla clonazione di carte di credito) e al quale tutti possono accedere tramite &#8220;Tor&#8221;. Questo è un software che rende chi lo utilizza invisibile, poichè nasconde l&#8217;indirizzo IP del computer tramite la crittografia a strati, da qui il nome scelto che sta per &#8220;The Onion Router&#8221;. Infatti grazie a Tor l&#8217;utente si collega al sito che vuole visitare passando però da una serie di altri server che fungono da router e cifrano la comunicazione.</p> @@ -3081,7 +3159,7 @@ Il payload è un tipo di shellcode, ovvero un piccolo pezzo di codice, che sfrut Tempo di elezioni - 2015-04-12T20:36:00+02:00 + 2015-04-12T14:36:00-04:00 francescomecca.eu/index.php/archives/tempo-di-elezioni <blockquote class="tr_bq"> <div style="text-align:center;"> @@ -3112,7 +3190,7 @@ Il payload è un tipo di shellcode, ovvero un piccolo pezzo di codice, che sfrut Bitwhisper, dove anche la rete non arriva - 2015-04-09T19:17:00+02:00 + 2015-04-09T13:17:00-04:00 francescomecca.eu/index.php/archives/bitwhisper-dove-anche-la-rete-non-arriva <div style="line-height:100%;margin-bottom:0;"> <span style="font-family:Arial, Helvetica, sans-serif;">Lo scorso 26 marzo 4 ricercatori della Ben Gurion University in Israele hanno sviluppato Bitwhisper, un inconsueto malware per PC che dimostra la possibilita` di penetrare macchine anche non connesse in rete.</span> @@ -3193,7 +3271,7 @@ Il payload è un tipo di shellcode, ovvero un piccolo pezzo di codice, che sfrut Il Big Bang dei Big Data - 2015-04-06T00:44:00+02:00 + 2015-04-05T18:44:00-04:00 francescomecca.eu/index.php/archives/il-big-bang-dei-big-data <p>“Perche` sto puntando tutto sul deep learning? Perche&#8217; sara` il nuovo Big Bang”</p> @@ -3261,7 +3339,7 @@ I dati sono la risposta economica a: “Iscriviti, e&#8217; gratis e lo sar Ci presentiamo - 2015-04-04T13:50:00+02:00 + 2015-04-04T07:50:00-04:00 francescomecca.eu/index.php/archives/ci-presentiamo <p><span style="font-family: inherit;">Salve a tutti,</span></p> @@ -3319,7 +3397,7 @@ I dati sono la risposta economica a: “Iscriviti, e&#8217; gratis e lo sar Chiave PGP - 2015-03-31T22:36:00+02:00 + 2015-03-31T16:36:00-04:00 francescomecca.eu/index.php/archives/chiave-pgp <p>Questa e` la nostra chiave PGP con la quale possiamo essere contattati all&#8217;indirizzo<br> <strong>pescewanda3 [at] gmail.com</strong></p> diff --git a/_site/index.html b/_site/index.html index 02922b4..ff1b06b 100644 --- a/_site/index.html +++ b/_site/index.html @@ -129,6 +129,86 @@
+
+

+ + Arduino Uno as HID keyboard + +

+ + + +

Turin is the hometown of Arduino. I have been at the fablab multiple times but I am more of a software guy. +I had to come all the way to America to get my hands on a simple Arduino Uno. +For 60$ I bought a cheap (but still good!) mechanical keyboard by Qisan, a clone of the Arduino Uno and a USB host shield.

+ +

Given that is 3 years since I have been using a dvorak layout and it's a pain to change layout on every machine that you have to use. +You can imagine that given this three pieces of hardware together I put together an hardware key mapper for the keyboard.

+ +

I have never had experience with Arduino before but it was not that difficult to make it do simple things like blinking the led or send signal through to a serial monitor.

+ +

It took me half an hour to wear down all my excitement: the USB Host Shield library broke all the compatibility with the similar project I found wandering online.

+ +

In particular this blog has the most precious information and the guy wrote a HID driver that allows the Uno to be seen as a HID device.

+ +

It was a noob error but I didn't checked the various arduino alternatives and I discovered late that just a few have the HID capabilities that would make this work easier. I should have bought and Arduino Due or Leonardo maybe.

+ +

Also, the various guides about flashing with a dfu tool are specific to older models of the Uno and it took me some time to figure the name of the new components so that I could flash a new firmware.

+ +

A small journey in the Arduino world

+ +

It feels pretentious to write a little guide for this kind of work, given also the fact that I have roughly 10 hours of experience with the Arduino. But the other resources are really outdated so I hope this piece can be useful to someone out there.

+ +

All the files I have used today are on my repos and I included also an outdated version of the USB Host Shield library that I used.

+ +

The original code from this blog post works like a charm but just as a simple passthrough.

+ +

It was not difficult at all to examine the code: +during each loop of the iteration a char array gets read from the shield and if it is contains information Arduino with the Serial.Write method send the data to the host.

+ +

The buffer array is a simple array of length 8 and the first two positions are reserved. In particular the first one represent the various modifier keys.

+ +

The dvorak layout has the same pairs as the US layout but eventually I got used to having the '@' where at the same place of 'Q' (qwerty) and '"' over the '2'. +Also, I am an avid ViM user (I should thank Simone Basso for that) and I swapped some keys on the new 65 keys keyboard. +The modifier bit at the beginning of the array came in handy for my code.

+ +

An hardware key remapper is a simple but long switch C statement but I decided to consider also the modifier bit: in this way certain keys like the Window (UGH!) key is mapped to a different layer of keys. +I got all the codes for the HID events here.

+ +

The process of flashing the code on the Uno goes like this:

+ +
    +
  • write the looping code;
  • +
  • push it to the Arduino using the IDE;
  • +
  • shortcircuit the board so that it goes in DFU mode;
  • +
  • flash the .hex HID firmware;
  • +
  • try your code;
  • +
  • repeat until it's right.
  • +
+ +

Everything fits in one picture

+ +

Flashing the firmware

+ +

The firmware is in my repo but I got it from (here)[http://hunt.net.nz/users/darran/weblog/a6d52/ArduinoUNOKeyboardHIDversion_02.html]. +The tool I used to flash it is dfu-programmer (version 0.62). +Every time you want to flash a new firmware the Arduino must be put in DFU mode (you can see the difference with lsusb). +To do that simply create a shortcircuit using a small metal wire on the two pins near the reset button and a led will blink. +This video shows the method briefly (no real need for a jumper). +The commands are the following and there is no risk to brick the Uno:

+
dfu-programmer atmega16u2 erase
+dfu-programmer atmega16u2 flash Arduino-keyboard-0.2.hex
+dfu-programmer atmega16u2 reset
+
+
+

After each flashing the device needs to be disconnected once. Of course you can flash the original firmware back. It is included in my repo or on the official ones.

+ +

Arduino and the shield

+ +

That's it, as you can see is not difficult at all. The worst part is gathering the various info that are left dormant in blogs or forums.

+ +
+

@@ -322,6 +402,8 @@ this page expl

Yes, indeed. At the end, I ask, why would you choose anything else than the easiest and most conclusive way to prove something?

+

Wright "signs" the blockchain

+

@@ -428,68 +510,6 @@ Ogni altra prova è discutibile e non necessaria.

-
-

- - Kyuss Music Player - -

- - - -

For a long time I have been using Clementine music player on my workstation. Recently I reinstalled Gentoo on my desktop and I wanted to avoid installing QT libraries of any sort. -So I switched to mpd and I have fallen in love with it. It is very flexible, fast and enriched by a lot of community software. -For some weeks I used mpc client as my primary client for mpd but I was not satisfied with it. Even though it is pretty minimal but packed with every feature mpd permits, the search feels uncomfortable because is case sensitive and need artist, album, etc. flags before any entry. -This is why I have written kpd together with Francesco Gallà

- -

Kyuss Player Client

- -

kpd is an acronym for Kyuss Player Client because we have been listening only to Kyuss while programming this client. -We have reimplemented the search functions to suit our habits. No more case sensitive, optional 'artist, album, title' flags. -kpd accepts only one string as the search argument and implements optional filter arguments to narrow the search in a grep like way. -I welcome you to read the readme in my git to understand how the search works. -Anyway in this post I want to explain bits of the code.

- -

Main

- -

The main kpd file invoked when the command is run in the console is kpd.py -The most interesting part in this file IMHO is these lines:

- -
 
-    for el in argsOrder:
-        if dictArgs[el] != False:
-            client.update_status ()
-            methodToCall = getattr (util, el)
-            retUtil = methodToCall (client, dictArgs[el], searchRes)
- -

argsOrder is a list of the arguments on the command line in the order the user wrote them. -kpd uses a dictionary to store for every argument the corrispective string for the function that will be invoked using getattr. -In this way any argument can be added to the main file without writing any other line of code. WE used this method to avoid using switch alike solutions.

- -

Util

- -

The util.py source file is a pretty easy source file to read. It contains every function that can be invoked by command line arguments. Every function has the same 'prototypes' so that they can be called using the method explained above. -To implement no-output and output function I have used a class: -to suppress the output on the console the program assign to sys.stdout a dummy class that save the original stdout on a variable and replaces write and flush functions so that they are just pass. and no output is written. -To permit output after suppression the program just reassing the original value to sys.stdout.

- -

Database Search

- -

In MPDdatabase.py we have written the search functions. -Originally we intended to just read and import in a dictionary the whole mpd database that is stored compressed in the home directory. -This list of dictionaries stores every entry related to the song and if any of them matches the search string or the filter string (considering also flags if any) the related song is printed on the output and saved in a list so it can be added by the add function. -This approach result very efficent in term of precision but it lacked speed. For a database of about 77 thousand songs (about 550k lines) a search query could last almost 2 seconds. -To improve the speed of the search we used the pickle module. The pickle module allows kpd to dump the data structure used to store the database in memory on a file that can be read easily by using the pickle.load function. -In this way the search lasts about 40 milliseconds on the same database that wastes about 16MiB of memory on disk.

- -

Conclusion

- -

This was really fun. It was our first hand on python project and the first real program we have written since we started learning programming at our university. -I discovered that programming allows me to relax and that is really cool to have custom software for activities you do every day. -The source for our program is stored in my git here and you are free to modify it.

- -
-
diff --git a/_site/index.php/archives/101.html b/_site/index.php/archives/101.html index 6b2c754..88b4a57 100644 --- a/_site/index.php/archives/101.html +++ b/_site/index.php/archives/101.html @@ -250,6 +250,15 @@

Related Posts

diff --git a/_site/index.php/archives/102.html b/_site/index.php/archives/102.html index 5b738ff..f2ccf26 100644 --- a/_site/index.php/archives/102.html +++ b/_site/index.php/archives/102.html @@ -214,6 +214,15 @@

Related Posts

diff --git a/_site/index.php/archives/104.html b/_site/index.php/archives/104.html index 9d1b88d..62cfe3e 100644 --- a/_site/index.php/archives/104.html +++ b/_site/index.php/archives/104.html @@ -204,6 +204,15 @@

Related Posts

diff --git a/_site/index.php/archives/13.html b/_site/index.php/archives/13.html index af41ff9..601e739 100644 --- a/_site/index.php/archives/13.html +++ b/_site/index.php/archives/13.html @@ -129,7 +129,7 @@

Nativi digitali: oltre il recinto della Generazione Google

- +

 

@@ -208,6 +208,15 @@

Related Posts

diff --git a/_site/index.php/archives/16.html b/_site/index.php/archives/16.html index 84fddca..3f89671 100644 --- a/_site/index.php/archives/16.html +++ b/_site/index.php/archives/16.html @@ -173,6 +173,15 @@ David Gomez, un ex agente dell’FBI , ha detto che il velivolo di sorveglia

Related Posts

diff --git a/_site/index.php/archives/171.html b/_site/index.php/archives/171.html index 9b70233..cd516c5 100644 --- a/_site/index.php/archives/171.html +++ b/_site/index.php/archives/171.html @@ -146,6 +146,15 @@

Related Posts

diff --git a/_site/index.php/archives/177.html b/_site/index.php/archives/177.html index bc187ec..2eedb44 100644 --- a/_site/index.php/archives/177.html +++ b/_site/index.php/archives/177.html @@ -190,6 +190,15 @@

Related Posts

diff --git a/_site/index.php/archives/19.html b/_site/index.php/archives/19.html index ee7a4b1..1d6c867 100644 --- a/_site/index.php/archives/19.html +++ b/_site/index.php/archives/19.html @@ -263,6 +263,15 @@ Command successful.

Related Posts

diff --git a/_site/index.php/archives/198.html b/_site/index.php/archives/198.html index bdd9e62..89fa5c8 100644 --- a/_site/index.php/archives/198.html +++ b/_site/index.php/archives/198.html @@ -166,6 +166,15 @@ perl-cleaner --all

Related Posts

diff --git a/_site/index.php/archives/207.html b/_site/index.php/archives/207.html index 4e0a15c..3f8d0a5 100644 --- a/_site/index.php/archives/207.html +++ b/_site/index.php/archives/207.html @@ -227,6 +227,15 @@ The original idea for the Buridan's donkey came from my mentor +
  • +

    + + Arduino Uno as HID keyboard + 05 Jul 2016 + +

    +
  • +
  • @@ -245,15 +254,6 @@ The original idea for the Buridan's donkey came from my mentor - Why Wright's proof is a fake - 03 May 2016 - -

    -
  • - diff --git a/_site/index.php/archives/23.html b/_site/index.php/archives/23.html index 68ded1d..195e711 100644 --- a/_site/index.php/archives/23.html +++ b/_site/index.php/archives/23.html @@ -182,6 +182,15 @@

    Related Posts

    diff --git a/_site/index.php/archives/27.html b/_site/index.php/archives/27.html index 9d7cf4b..e323260 100644 --- a/_site/index.php/archives/27.html +++ b/_site/index.php/archives/27.html @@ -205,6 +205,15 @@ Truecrypt permette di creare un volume crittografico che si presenta come un fil

    Related Posts

    diff --git a/_site/index.php/archives/32.html b/_site/index.php/archives/32.html index 7a9606c..66196e7 100644 --- a/_site/index.php/archives/32.html +++ b/_site/index.php/archives/32.html @@ -764,6 +764,15 @@

    Related Posts

    diff --git a/_site/index.php/archives/36.html b/_site/index.php/archives/36.html index c504f84..7a70832 100644 --- a/_site/index.php/archives/36.html +++ b/_site/index.php/archives/36.html @@ -129,7 +129,7 @@

    NSA e le intercettazioni telefoniche

    - +
    @@ -189,6 +189,15 @@

    Related Posts

    diff --git a/_site/index.php/archives/37.html b/_site/index.php/archives/37.html index cb22550..bbd560c 100644 --- a/_site/index.php/archives/37.html +++ b/_site/index.php/archives/37.html @@ -129,7 +129,7 @@

    Google afferma di essere pronta a dare agli utenti android più controllo sulla privacy

    - +
    articolo tradotto da bloomberg.com
    @@ -165,6 +165,15 @@

    Related Posts

    diff --git a/_site/index.php/archives/44.html b/_site/index.php/archives/44.html index a7e739e..2e051fc 100644 --- a/_site/index.php/archives/44.html +++ b/_site/index.php/archives/44.html @@ -281,6 +281,15 @@

    Related Posts

    diff --git a/_site/index.php/archives/46.html b/_site/index.php/archives/46.html index e9e38ff..d36ef0b 100644 --- a/_site/index.php/archives/46.html +++ b/_site/index.php/archives/46.html @@ -202,6 +202,15 @@ Alcuni Related Posts diff --git a/_site/index.php/archives/47.html b/_site/index.php/archives/47.html index 681b6a1..97867eb 100644 --- a/_site/index.php/archives/47.html +++ b/_site/index.php/archives/47.html @@ -156,6 +156,15 @@ L’opera si trova a Berlino.

    Related Posts

    diff --git a/_site/index.php/archives/51.html b/_site/index.php/archives/51.html index 5dea25e..2aef6d5 100644 --- a/_site/index.php/archives/51.html +++ b/_site/index.php/archives/51.html @@ -129,7 +129,7 @@

    Ancora nessuna visita dalla Cina

    - +

    Questo blog non puoessere <a href="http://www.greatfirewallofchina.org/index.php?siteurl=caught-in-thenet.blogspot.it" rel="nofollow" target="_blank">visualizzato</a> in Cina.<br />A partire dal 1993 mentre molti altri Stati si occupavano delle leggi sul cyber crimine il CCP (Chinese Communist Party) ha dato inizio ad una delle piu grandi operazioni di censura moderna mai messa in atto: il Grande Firewall Cinese.

    diff --git a/_site/index.php/archives/55.html b/_site/index.php/archives/55.html index 7f3eadb..f136ff5 100644 --- a/_site/index.php/archives/55.html +++ b/_site/index.php/archives/55.html @@ -158,6 +158,15 @@ L’attacco avviene attraverso l’uso di codice Javascript e analizza l

    Related Posts

    diff --git a/_site/index.php/archives/57.html b/_site/index.php/archives/57.html index 4af7cf4..6913e79 100644 --- a/_site/index.php/archives/57.html +++ b/_site/index.php/archives/57.html @@ -246,6 +246,15 @@

    Related Posts

    diff --git a/_site/index.php/archives/60.html b/_site/index.php/archives/60.html index eebac4c..03419e6 100644 --- a/_site/index.php/archives/60.html +++ b/_site/index.php/archives/60.html @@ -168,6 +168,15 @@ Secondo alcuni amministartori del sito, tra cui OptimusCrime, Boneless vendette

    Related Posts

    diff --git a/_site/index.php/archives/66.html b/_site/index.php/archives/66.html index 01ee191..30f6b6a 100644 --- a/_site/index.php/archives/66.html +++ b/_site/index.php/archives/66.html @@ -217,6 +217,15 @@

    Related Posts

    diff --git a/_site/index.php/archives/67.html b/_site/index.php/archives/67.html index 97e1d0e..ce12991 100644 --- a/_site/index.php/archives/67.html +++ b/_site/index.php/archives/67.html @@ -129,7 +129,7 @@

    Facciamo luce sui profili ombra

    - +

    La BPC, Belgian Privacy Commision, il 31 marzo ha pubblicato un documento investigativo sulle policy di Facebook e da questa indagine e` emersa una violazione delle leggi europee sul tracciamento online.

    Ogni volta che un utente non loggato, o perfino senza account sul social network, visita una pagina che incorpora il bottone “like” o altri plugin sociali riceve un piccolo file di testo chiamato cookie che incorpora una miriade di informazioni e la propria attivita` online in toto. Anche se si ha scelto per l’opt out un particolare cookie chiamato ‘datr‘ contenente un ID unico viene scaricato e mantenuto nella cache del browser identificando il computer dell’utente in maniera indistinguibile.
    @@ -186,6 +186,15 @@ In questo modo ed attraverso i cookie Facebook riesce a riunire la maggior parte

    Related Posts

    diff --git a/_site/index.php/archives/70.html b/_site/index.php/archives/70.html index c8768a2..98a276f 100644 --- a/_site/index.php/archives/70.html +++ b/_site/index.php/archives/70.html @@ -129,7 +129,7 @@

    Anonymous: we are legion

    - +
    Trattando argomenti quali l’anonimato e la privacy, non si può fare a meno di parlare di uno dei movimenti più rappresentativi di queste due tematiche, ovvero Anonymous. Questo movimento nasce nel 2003, e per il suo nome prende ispirazione dal nickname usato nei siti di imageboard, siti nei quali un thread può essere iniziato solo con un immagine, quali per esempio 4chan, 711chan, dove chi commentava senza identificarsi appariva come “anonymous”, e da qui si incominciò a identificare anonymous come una persona reale.

    @@ -235,6 +235,15 @@

    Related Posts

    diff --git a/_site/index.php/archives/73.html b/_site/index.php/archives/73.html index 73f13b6..52d5716 100644 --- a/_site/index.php/archives/73.html +++ b/_site/index.php/archives/73.html @@ -129,7 +129,7 @@

    L’anonimato violato di TOR

    - +

    Miliardi di persone usano giornalmente internet, ma sono poche quelle a conoscenza del suo lato oscuro, il deep web,nel quale sono presenti siti che gestiscono business illegali (dalla vendita di account rubati alla clonazione di carte di credito) e al quale tutti possono accedere tramite “Tor”. Questo è un software che rende chi lo utilizza invisibile, poichè nasconde l’indirizzo IP del computer tramite la crittografia a strati, da qui il nome scelto che sta per “The Onion Router”. Infatti grazie a Tor l’utente si collega al sito che vuole visitare passando però da una serie di altri server che fungono da router e cifrano la comunicazione.

    diff --git a/_site/index.php/archives/78.html b/_site/index.php/archives/78.html index 76bb214..459b880 100644 --- a/_site/index.php/archives/78.html +++ b/_site/index.php/archives/78.html @@ -160,6 +160,15 @@

    Related Posts

    diff --git a/_site/index.php/archives/82.html b/_site/index.php/archives/82.html index f787ef7..4cbcea0 100644 --- a/_site/index.php/archives/82.html +++ b/_site/index.php/archives/82.html @@ -210,6 +210,15 @@

    Related Posts

    diff --git a/_site/index.php/archives/85.html b/_site/index.php/archives/85.html index 7c0de5b..8b842b8 100644 --- a/_site/index.php/archives/85.html +++ b/_site/index.php/archives/85.html @@ -129,7 +129,7 @@

    Il Big Bang dei Big Data

    - +

    “Perche` sto puntando tutto sul deep learning? Perche’ sara` il nuovo Big Bang”

    Cosi` ha parlato il CEO di Nvidia Jensen Huang il 3 marzo scorso alla sua GTC 2015.
    @@ -197,6 +197,15 @@ I dati sono la risposta economica a: “Iscriviti, e’ gratis e lo sarà se

    Related Posts

    diff --git a/_site/index.php/archives/87.html b/_site/index.php/archives/87.html index fafd2d5..ea14d2a 100644 --- a/_site/index.php/archives/87.html +++ b/_site/index.php/archives/87.html @@ -187,6 +187,15 @@

    Related Posts

    diff --git a/_site/index.php/archives/9.html b/_site/index.php/archives/9.html index 52e149f..29aacd7 100644 --- a/_site/index.php/archives/9.html +++ b/_site/index.php/archives/9.html @@ -176,6 +176,15 @@ echo Complete.

    Related Posts

    diff --git a/_site/index.php/archives/90.html b/_site/index.php/archives/90.html index 1b2cf83..38bfad1 100644 --- a/_site/index.php/archives/90.html +++ b/_site/index.php/archives/90.html @@ -147,6 +147,15 @@

    Related Posts

    diff --git a/_site/index.php/archives/99.html b/_site/index.php/archives/99.html index fbcf886..b6fa52e 100644 --- a/_site/index.php/archives/99.html +++ b/_site/index.php/archives/99.html @@ -189,6 +189,15 @@

    Related Posts

    diff --git a/_site/page2/index.html b/_site/page2/index.html index e950937..2cb6347 100644 --- a/_site/page2/index.html +++ b/_site/page2/index.html @@ -129,6 +129,68 @@
    +
    +

    + + Kyuss Music Player + +

    + + + +

    For a long time I have been using Clementine music player on my workstation. Recently I reinstalled Gentoo on my desktop and I wanted to avoid installing QT libraries of any sort. +So I switched to mpd and I have fallen in love with it. It is very flexible, fast and enriched by a lot of community software. +For some weeks I used mpc client as my primary client for mpd but I was not satisfied with it. Even though it is pretty minimal but packed with every feature mpd permits, the search feels uncomfortable because is case sensitive and need artist, album, etc. flags before any entry. +This is why I have written kpd together with Francesco Gallà

    + +

    Kyuss Player Client

    + +

    kpd is an acronym for Kyuss Player Client because we have been listening only to Kyuss while programming this client. +We have reimplemented the search functions to suit our habits. No more case sensitive, optional 'artist, album, title' flags. +kpd accepts only one string as the search argument and implements optional filter arguments to narrow the search in a grep like way. +I welcome you to read the readme in my git to understand how the search works. +Anyway in this post I want to explain bits of the code.

    + +

    Main

    + +

    The main kpd file invoked when the command is run in the console is kpd.py +The most interesting part in this file IMHO is these lines:

    + +
     
    +    for el in argsOrder:
    +        if dictArgs[el] != False:
    +            client.update_status ()
    +            methodToCall = getattr (util, el)
    +            retUtil = methodToCall (client, dictArgs[el], searchRes)
    + +

    argsOrder is a list of the arguments on the command line in the order the user wrote them. +kpd uses a dictionary to store for every argument the corrispective string for the function that will be invoked using getattr. +In this way any argument can be added to the main file without writing any other line of code. WE used this method to avoid using switch alike solutions.

    + +

    Util

    + +

    The util.py source file is a pretty easy source file to read. It contains every function that can be invoked by command line arguments. Every function has the same 'prototypes' so that they can be called using the method explained above. +To implement no-output and output function I have used a class: +to suppress the output on the console the program assign to sys.stdout a dummy class that save the original stdout on a variable and replaces write and flush functions so that they are just pass. and no output is written. +To permit output after suppression the program just reassing the original value to sys.stdout.

    + +

    Database Search

    + +

    In MPDdatabase.py we have written the search functions. +Originally we intended to just read and import in a dictionary the whole mpd database that is stored compressed in the home directory. +This list of dictionaries stores every entry related to the song and if any of them matches the search string or the filter string (considering also flags if any) the related song is printed on the output and saved in a list so it can be added by the add function. +This approach result very efficent in term of precision but it lacked speed. For a database of about 77 thousand songs (about 550k lines) a search query could last almost 2 seconds. +To improve the speed of the search we used the pickle module. The pickle module allows kpd to dump the data structure used to store the database in memory on a file that can be read easily by using the pickle.load function. +In this way the search lasts about 40 milliseconds on the same database that wastes about 16MiB of memory on disk.

    + +

    Conclusion

    + +

    This was really fun. It was our first hand on python project and the first real program we have written since we started learning programming at our university. +I discovered that programming allows me to relax and that is really cool to have custom software for activities you do every day. +The source for our program is stored in my git here and you are free to modify it.

    + +
    +

    @@ -263,108 +325,6 @@ Finally I put a link to the archive, my github page and the atom feed on the sid

    -
    -

    - - The Buridan’s donkey paradox - -

    - - - -

    - The Buridan’s donkey is an illustration of a paradox regarding the philosophy of moral determinism and free will. -

    - -

    - The paradox shows an hypothetical situation in which a donkey searching for food is caught in the middle of two equally appealing stacks of hay located at the same distance from the donkey. Because the donkey has no real reason to choose one over the other he dies of starvation. -

    - -

    Deliberations_of_CongressI have decided to write a cli program that chooses for me when I can’t make up my mind.

    - -

    The program is written in C++ and when invoked along with two or more arguments it puts them in a vector and then changes the order randomly.

    - -
    #include <iostream>
    -#include <vector>
    -#include <algorithm>
    -#include <random>
    -#include <string>
    -#include <sys/poll.h>
    -using namespace std;
    -
    -struct pollfd stdin_poll = {
    -    .fd = fileno (stdin), .events = POLLIN
    -};
    -
    -void read_from_piped_input (vector<string>& lst)
    -{
    -    string x;
    -    while (getline (cin, x)) {
    -        lst.push_back (x);
    -    }
    -}
    -
    -void read_from_arguments (const int& argc, char* argv[], vector<string>& lst)
    -{
    -    if (argc  == 1) {
    -        cout << "Usage: asino [string] [string] ..." << endl;
    -        exit;
    -    }
    -    for (vector<string>::size_type i = 1; i < argc; ++i) {
    -        lst.push_back (argv[i]);
    -    }
    -}
    -
    -int main (int argc, char* argv[])
    -{
    -    vector<string> lst;
    -    int poll_ret = poll (&stdin_poll, 1, 0);
    -    if (poll_ret > 0) {
    -        read_from_piped_input (lst);
    -    }
    -    else {
    -    read_from_arguments (argc, argv, lst);
    -    }
    -
    -    random_device rd;
    -    mt19937 m(rd());
    -    shuffle (lst.begin (), lst.end (), m);
    -    
    -    int i = 1;
    -    for (vector<string>::iterator it = lst.begin (); it != lst.end (); ++it) {
    -        cout << i++ << ". " << *it << endl;
    -    }
    -}
    - -

    I have used the Mersenne Twister PRNG just to give it a try.

    - -

    - One of the challenges was to read from stdin instead of arguments when the program is piped after another program in the shell: -

    - -
    ls /media/my_movies/ | buridan
    - -

    So I have used poll() that checks for a specified amount of time if the selected device (/dev/stdin in my case) can perform I/O operations; in my code:

    - -
    poll (&stdin_poll, 1, 0)
    - -

    I selected the POLLIN as event so poll() only checks if there is data to read, 1 as the number of items in the fds array, 0 milliseconds of timeout because when the program is invoked /dev/stdin may already contain input.

    - -

    The program should be compiled this way:

    - -
    g++ -std=c++11 ./program.cpp -o output
    - -

    You are free to reuse this little piece of code as you wish.

    - -

    EDIT: 02-04-2016 -The original idea for the Buridan's donkey came from my mentor Simone Basso who wrote the original one in haskell.

    - -

    - Francesco Mecca -

    - -
    -
    - - - - - - - - - - - -
    - -
    - fu questo libro cinese, spedito da un gesuita a Leibniz, a dargli l’idea della matematica binaria - - -
    - -

    Luc De Brabandere ci spiega che il sogno di Leibniz e` “fare di un argomentazione un teorema, fare di una discussione un sistema di equazioni e poter proporre al proprio avversario in caso di impasse: Ebbene! Calcoliamo” (Pensiero Magico Pensiero Logico,  LIT edizioni, 2015).

    - -

    Prima di Leibniz un altro filosofo, Hobbes, affermo`:

    - -
    -

    - Reasoning is nothing but reckoning -

    -
    - -

    Di recente il CEO di Nvidia ha tenuto di recente un discorso sul “deep learning”, ovvero “machine learning” arricchito dall’analisi dei Big Data.

    - -

    Secondo me il deep learning e la frase di Hobbes hanno un profondo legame.

    - -

    Ci sono compiti che per un uomo sono molto complicati, come ad esempio la risoluzione di equazioni, che rispondono a delle semplici regole formali. Tradurre queste regole in algoritmi e` molto semplice.

    - -

    Il cervello umano si spinge molto oltre: e` celebre la frase di un giudice della corte suprema americana (Potter Stewart) che nel tentativo di dare una definizione legale per distinguere il materiale pornografico dal non, scrisse: “lo riconosco quando lo vedo”.

    - -

    Ci sono molte operazioni, come quello del riconoscere facce, immagini o testo (come i captcha) che per un umano sono piuttosto triviali.

    - -

    Quale e` la risposta che il deep learning offre a questo problema?

    - -

    Grazie ai Big Data le macchine hanno a disposizione una quantita` enorme di dati, spesso anche categorizzata dagli stessi utenti, che puo` essere sottoposta ad analisi statistica.

    - -

    Nel 2014 Facebook ha presentato un algoritmo chiamato DeepFace che riconosce nel 97% dei casi i volti umani, anche se con poca luce o parzialmente coperti.

    - -

    Project Adam e` un progetto della Microsoft che si occupa di riconoscimento delle immagini e di oggetti ed ha dimostrato la sua potenza riconoscendo con successo un Cardigan Corgi da un Pembroke Corgi (due cani praticamente identici che si distinguono principalmente per la densita` delle ossa).

    - -

    Questa e` la potenza dell’apprendimento e dell’analisi statistica.

    - - - - - - - - - -
    - -
    - reti neurali, fonte -
    - -

    Se davvero riconoscere coincidesse con il ragionare si potrebbe dire che un computer e` capace di pensare; il sogno di Liebniz non si vedrebbe avverato ma il risultato ottenuto e` identico.

    - -

    Ora mi chiedo, quale e` la differenza fra ragionare e pensare?

    - -

    Non e` semplice dare una risposta definitiva, per quanto mi riguarda penso che sono entrambi processi mentali che hanno l’obiettivo di migliorare e aumentare la conoscenza. Quando l’attivita` del pensiero e` logica, ovvero e` diretta verso un obiettivo specifico (non vaga senza meta, come nello stream of consciousness) coincide con il ragionare.

    - -

    Se si potesse dimostrare che un’intelligenza artificiale abbia la facolta` del pensiero ritengo che prima di procedere alla realizzazione di un cosi` maestoso progetto si dovrebbe ragionare su tutte le conseguenze etiche e morali di tali tecnologie. Per alcuni e` un rischio esistenziale, ovvero e` la creazione di un rivale dell’intelligenza umana.

    - -

    Eppure Edsger Dijkstra, un pioniere della ricerca nel campo delle intelligenze artificiali ha affermato che: “chiedersi se un computer possa pensare e` come chiedersi se un sottomarino possa nuotare”.

    - -

    Questo perche`? Un algoritmo di deep learning, un A.I. universale capace di analizzare ogni tipo di dato, rimane comunque un programma senza motivazioni, senza fini se non quelli che il suo creatore gli ha assegnato. Questo programma e` conscio della sua esistenza tanto quanto lo e` un foglio di carta, un documento di Excel o una stampante 3D.

    - -

    Se si dovesse lavorare per creare un cervello “umano” in laboratorio si partirebbe proprio da questo, che e` un requisito necessario, che si potrebbe definire come molto piu` di una semplice “istruzione” che ci porta a dire: “io sono”, e delle volte dubitare anche di questo.

    - -
    - Francesco Mecca -
    - -
    -