Posts filed under 'Software'

UNIX time about to reach 1234567890

In a few days, the UNIX time will reach quota 1234567890.
You can try and see the exact second in which this event will happen on your machine by running in a shell:
perl -e 'print scalar localtime(1234567890),"\n";'
For all of those (like me) who live in GMT+1 (CET) the output should be:

$ perl -e ‘print scalar localtime(1234567890),”\n”;’
Sat Feb 14 00:31:30 2009

I assure you that I will be eagerly waiting for that moment.
(whatever the reason)

Thanks Slashdot for reminding me.

Add comment February 9th, 2009

Sandboxing FAIL @ Polito

Gli studenti del Politecnico di Torino già conoscono le mitiche macchinette blu (i “totem”) che permettono di stampare statini, certificati ed eseguire semplici operazioni di segreteria. I medesimi studenti sanno anche che detti computer sono sandboxed, cioè le azioni che l’utente può compiere sono limitate a quelle che i sistemisti considerano accettabili: browser personalizzato con accesso alla sola rete interna, applet Java dedicati per l’uso dei servizi di segreteria, eccetera…
Uhm… ne siete davvero sicuri? 🙂



Mentre ero lì che stampavo statini per gli esami di questo periodo è comparso un piccolo pop-up che mi chiedeva s’io volessi aggiornare Adobe Acrobat Reader all’ultima versione disponibile. Avrei potuto lasciarmi scappare un’occasione del genere? Ancora una volta, no 🙂 Sono andato avanti nell’esplorazione, assieme agli amici della compagnia della nerdizia (di Strategia ed Innovazione).
Rispondendo affermativamente alla richiesta si è aperta una pagina del sito della Adobe. Innanzitutto abbiamo scaricato l’aggiornamento suggerito, che ci ha dato accesso alla finestra dei downloads di Firefox (ancora sandoboxato). La finestrella riporta un collegamento al Desktop; cliccandoci abbiamo fatto comparire la barra delle applicazioni di Windows, che però non rispondeva ai comandi.
Finestra downloads di Firefox

Non ci siamo arresi.
La ricerca nel sito della Adobe era gestita da Google, quindi in basso alla pagina c’era un altro link al sito del motore di ricerca; il target del link era molto probabilmente _blank, quindi si è aperta una nuova finestra di Firefox, con tutti i menu e le barre al loro posto.
Google sulle macchinette

Una volta avuto accesso a quello è stato facile. Innanzitutto abbiamo provato siti di vario genere, come Youtube (segue foto con in bella vista un video sui LOLCATS).
Lolcats su Youtube

Seguendo i suggerimenti di mamma Google, abbiamo scaricato ed installato con successo Google Chrome (vedere sotto per un’immagine), dimostrando che l’utente costantemente loggato gira con i privilegi di amministratore. Ed a quel punto la barra delle applicazioni ha iniziato a rispondere ai click. Abbiamo aperto il menu Start ed un prompt dei comandi (per gradire), come dimostrato nella prima foto del repertorio.

Lezione del giorno: un altro punto a sfavore del sistema informatico del Poli (questa volta la parte hardware, ma si somma alla precedente figuraccia); un punto, invece, guadagnato dagli infaticabili smanettoni di Ingegneria Informatica 😛

AGGIORNAMENTO: all’uscita dal laboratorio, alla fine dello studio, siamo ripassati davanti al totem. La pagina web non era quella che avevamo lasciato, ma il sistema era ancora in uno stato di palese vulnerabilità. Amanti come siamo della ricorsione, abbiamo scattato un’ulteriore foto, questa volta in Chrome, visitando un sito… molto particolare 🙂

Blog in Chrome

8 comments January 27th, 2009

udp2tcp-0.0.2 released

A new version of udp2tcp has been released today. Changes include:

  • Usage of GCC function attributes
  • Refactoring of the folders scheme to a better one
  • Refactoring of the filters code and migration to a different scheme
  • Addition and improvement of the command-line parsing function
  • Makefile enables debug info in the object files

Link to the project:
Download here:

Add comment June 15th, 2008

udp2tcp-0.0.1 released

Some days ago the DNS server of my dormitory stopped working, so I (we, me and all my colleagues) lost most of the network functionality. As the DNS port is blocked by the dormitory firewall, I could not rely on external servers to resolve names, so… ? Fortunately, I had already established an SSH tunnel towards the outside world, so I wondered if I could use it to solve my problem. If only I could re-route the local DNS requests over the TCP tunnel…

Well, I was not able to force my system to resolve names over TCP, so I needed a “UDP to TCP, and back” translation mechanism. Briefly, udp2tcp was born! 😉

I registered the project udp2tcp on Sourceforge (link to the project) and its first version (0.0.1) can be downloaded here:

This project is still at an early stage, but any suggestion is welcome!

2 comments June 12th, 2008

Set up true NAT networking on Virtualbox

For a couple of years I used Vmware as virtualization solution, because the alternatives weren’t at its level. I used to run Vmware to emulate a WinXP-Pro guest, with IIS, to write an ASP project for a course. Thanks god, the teacher changed his mind and let some of us code in PHP as well. Anyway, recently Vmware went crazy. Whenever I open it, it just disables my Shift and Control keys: only restarting X solves to problem.

So I switched to VirtualBox.

Good news:

  • It’s released under the GPL. And this is a very good thing.
  • It does not mess up with my keyboard. Yay!

Bad news:

  • I have to use the binary image of the program, because the GPL’d version has no USB support (and I need it for another course).
  • Requires the QT libraries to run. Yuck! As I am a Gnome user, I try to avoid QTs as much as possible. Well, nevermind, I’ve packaged them some time ago (when I used the GUI of wpa_supplicant, but this is another story), so I do not have to compile them.
  • There isn’t a true NAT system, as in Vmware.

The last issue drove me crazy. To set up networking in Virtualbox you have three choices (well, actually four, but I do not consider “cable unplugged” a choice 🙂 )

  • You can use a “fake” NAT, but it makes very painful the access to guest resources. You have to manually map your resources onto local ports: this is secure (well… not very secure, actually, as the socket binds to the INADDR_ANY address, and not on the loopback device), but not as friendly as the Vmware solution (that is, NAT the guests and give to the host OS a virtual network interface on the guests LAN).
  • You can use a network bridge. But this is bad, as it exposes your guests to your LAN. The problem could be solved using iptables, but, in my case, it wouldn’t help very much, as I cannot have more than one MAC address per computer (dormitory restrictions).
  • You can configure a local network between guests with no host connectivity. Not really a solution.

I looked for informations on the Net. No solution. So I decided to write a shell script on my own.
(it’s so small that I release it in the public domain 😉 )

Why not? 😛 It combines my Bash and networking skills, and I like writing little tools, so… 🙂

It’s written with the Gentoo subsystem in mind, but it can be ported to other distros with little pain. It’s very easy to set up: edit the beginning of the script, substituting dark with your username and eth1 with the name of the physical interface that you use to connect to the world. Basically, it does the following:

  • Loads/unloads the Virtualbox kernel module
  • Starts/stops the Virtualbox network interface
  • Associates the Virtualbox network interface with the user that runs the Virtualbox guest
  • Enables/disables IP packets forwarding in the whole system
  • Starts/stops the iptables userspace daemon
  • Adds a iptable rule to allow NAT

And that’s it 🙂

UPDATE: I’ve edited and uploaded again the script to resolve the issue at comment #1. If /sbin/ is missing, wrappers functions are defined to handle the console output.

8 comments May 8th, 2008

GPLv3, RMS’s comments on 3rd draft

This week, Richard Stallman gave a speech in Brussels about the recently released 3rd draft of the GPLv3, focusing particularly on the Digital Restrictions Management (RMS’s meaning for DRM) and the NovellMicrosoft deal. The complete transcription of his speech can be found on the FsfEurope website.

Source: Slashdot

Add comment April 5th, 2007

Flash 9 stable on Gentoo Linux

Yeah, that’s it!

Finally the package netscape-flash, version, is stable on x86 and amd64!

I have used the unstable version for 2 weeks and it worked fine for me: finally I watched to the Flash videos without that annoying lag between audio and video stream. The big drawback is that, sometimes, when closing webpages with embedded Flash objects, mozilla-firefox crashes. 🙁

Stabilization bug:

Add comment February 19th, 2007

Windows Vista voice recognition failure

Maybe the world is not ready yet for a voice-only interaction between human beings and computers. Let’s see why.

4 comments February 15th, 2007

BumpTop, a new way to think your desktop

While browsing YouTube website, I accidentally found this video, presenting the prototype of a new 3D desktop manager called BumpTop.

The most interesting feature of BumpTop is the usage of real world physics to rule the movement of the icons; like paper sheets or CD-DVD boxes, you can move or even throw them around, just like you would do on your desk. The usefulness of this approach? None, IMO. It’s just eye-candy, a waste of useful resources and CPU power.

A preview of the video follows:

Add comment February 6th, 2007

Vista limited edition

OMFG… it’s true.

At the first look, I kept staring at it for minutes. I didn’t believe that the story was true, or that someone could even think of buying that crap. What am I talking about, you say? Give a look here, for example.

And, yes, I could write posts more often, if only exams gave me a break, and someone stopped bugging me every ten seconds 🙂 .

Add comment January 22nd, 2007

Next Posts Previous Posts



September 2019
« Feb    


Posts by Month

Posts by Category

What's played in the cave