Category: Automation

  • Nudo per far divertire un po’ gli amichetti.

    English abstract: yes, you came here because that thing about "naked4friends.com" is a virus/worm. Of course. At this moment there are still no infos about how to remove it. I don’t have time to test this on my PC. In case you may try to come back tomorrow. In the meantime just close your Windows Live Messenger application in order to avoid further infection of people in your contact list.

    Vorrei capire da dove è sbucato ‘sto virus-o-non-so-cos’è che da ieri sera fa sì che un’infinità di contatti MSN mi rompa i maroni ogni dieci minuti con questo messaggio:

    Emoticon con il tuo volto:-O http://naked4friends.com/?=$indirizzoMSN

    Ma soprattutto mi chiedo com’è possibile che tutti ‘sti babbioni siano stati capaci di farsi infettare così facilmente. Anche perché, in realtà, se vado su quel sito risulta sempre un errore HTTP 403 (Service Unavailable) e non mi fa scaricare nessun file eseguibile "strano".

    Boh.
    Mi informerò.

    [No, non mi metterò a dire la solita solfa tipo «non scaricate quel file!», tanto gli stolti restan sempre stolti e i traumatizzati restan sempre più furbi.]

    Ah, per la cronaca: pare che, per colpa di questo blog, oggi alle 14.30 dovrò spiccicar qualche parola coi cari giuovincelli di Fuori Frequenza (in streaming o via Controradio su 97.3 MHz). E non da solo, ma – attenzione attenzione – con DisasterSofia. Non mi assumo alcuna responsabilità, sappiatelo.

  • ASCII-Art #1. Airstrike over the mourning crowd.

          Che succede?              
                                  Zitto e corri!
          oO                  OO
         .##.                //.
    ______db________________/\__________________

    Perché ormai c’è una rassegnata ostinazione. E se in questo periodo la Grande Sfiga Universale sta lanciando continuamente degli spilli sulle mie gonadi, le dimostrerò che stoicamente resisterò a questi suoi attacchi alle s… Vabbè.

    Potrei raccontarvi di 160 Km percorsi contro i mulini a vento, oppure di auto in sovrapressione, e altre fantastiche avventure. Ma mi limiterò a spiegare l’ultima.
    Una chicca per gli smanettoni.

    Ho alcuni PC messi in rete tra loro in modalità mista (in parte via Ethernet e in parte via Wi-Fi). Di questi mi interessano in particolare due. Uno lo chiamiamo GROOVE (192.168.0.2), ed è quello che regna sovrano, l’ammiraglia della flotta, insomma il più figo (anche perché, oh, l’ho pagato mica poco). L’altro si chiama VECTOR1 (192.168.0.253), altresì detto "il serverino" per via del fatto che, pur essendo vecchiotto, lavora alacremente come server HTTP, FTP, DNS, DHCP e tanti e tanti altri.

    Ora. Dati i nomi a queste due bestiole è necessario spiegare che finora tutti i computer della rete si son sempre visti senza problemi. In particolare Groove guardava Vector1 e Vector1 guardava Groove. Tanto si son visti che alla fine si sono innamorati. Hanno sempre lavorato fianco a fianco. Per esempio, su Vector1 ho i siti, da Groove li modifico, poi punto il browser su Vector1 per visualizzarli. E altre cose così. A questo punto credo anche che abbiano fatto anche un matrimonio via Ethernet, e non vi dico che ho pensato quando ho visto certe collisioni qualche tempo fa sullo switch che li collega.

    Poi Groove è partito per un’operazione chirurgica. Gli dovevano trapiantare per la seconda volta un alimentatore nuovo (e porca miseria quanto m’è costato ndr).

    Al ritorno non è stato più lo stesso.

    Ora Groove vede tutti (ma dico tutti) i computer tranne Vector1. Vector1 vede tutti (ma dico tutti) i computer tranne Groove. Di conseguenza: Groove e Vector1 non si vedono. Non si pingano, qualsiasi richiesta va in timeout, non si vedono con nessun protocollo. Un casino.

    Io so cos’è successo.
    Credetemi, Oxi lo sa che il mio computer ha un’anima.
    E anche parecchio incazzusa.
    È per questo che me lo sento.
    Groove e Vector1 hanno divorziato.
    Hanno divorziato, capite?

    Serio. Mi rivolgo agli smanettoni che passano di qui, tipo quelle faccione da smanettoni di ABS e Bruno (a proposito Bruno, ho riletto poco fa il post con cui ci siamo conosciuti ^^). Secondo voi cos’è successo? Ma soprattutto: chi è che sta facendo lo stronzo dei due? Perché lo stronzo c’è, sicuro.

    /* Considerate che a livello software non è cambiato nulla, e non ho firewall attivi, solo AVG. Nessun filtro IP o cose di questo genere. Ah, può essere utile sapere che sul serverino ho Big Brother, e ogni tanto ho scoperto che tenta una richiesta FTP su Groove… e Groove la vede! Però poi non riesce a rispondere. È come se Groove recepisse un messaggio dall’iperspazio però poi non sapesse a chi indirizzare la risposta. Boh. Dimenticavo: il DHCP però funziona (Vector1 è il server DHCP). */

  • Testa o croce v.2.0

    Avete tante idee per stasera e sono tutte sostanzialmente indifferenti? O magari sapete benissimo cosa fare ma state facendo finta di essere indecisi per convincere gli altri a decidere a caso e tentare la fortuna nella speranza che esca quello che vorreste voi? O dovete scegliere cosa fare della vostra vita ma ritenete più opportuno che sia il caso a deciderlo? O, più semplicemente, siete indecisi fra più di due possibilità?

    Lasciate stare i campionati di testa o croce. Noi abbiamo una soluzione più semplice.

    Il Decisore è un piccolo script PHP che si preoccuperà di prendere le varie opzioni che avete inserito, ordinarle casualmente, e poi di nuovo, e poi di nuovo per un altro numero imprecisato di volte. Dopodiché il computer fa il tocco e chi esce si becca un punto. Poi di nuovo. E di nuovo ancora per tante volte quante ne avrete specificate nel campo "Tentativi".

    Dopodiché usciranno i risultati della giocata con relativo vincitore.
    E voi saprete che fare stasera.

    No, non ringraziatemi. Anzi sì, così il mio ego ne sarà grato. =P

  • Qua la mano, cumbar’… to’, la mano scumbar’!

    Ovvero: volevo inviare una mail a hubrys però ho pensato che: 1) se gli avessi mandato un messaggio privato per spiegarglielo Splinder si sarebbe mangiato il codice HTML che serviva senza far capire una cippa al destinatario, come accadde con Ossimorosa, e 2) alla fine è una cosa che può interessare anche altri.

    Ovvero, ancora: se nel post precedente avevo ricercato quel minimo di comprensibilità, adesso non ci capirete na mazza pe’ ddavero.

    Allora.

    Capita, in una pagina HTML, quale può essere appunto il proprio blog, di avere dei blocchi di testo che occupano un po’ troppo spazio. Ad esempio, c’è chi ha molti link ad altri blog, c’è chi invece mette da parte una lista di link ai vari post che fan parte di una serie (ad esempio la tragica Telecomachia ^^), e così via.

    Ebbene, noi vi possiamo aiutare. Dove noi sta per io e il DHTML, che a sua volta sta per Dynamic HyperText Markup Language, che a sua volta sta semplicemente per combinazione di CSS, Javascript e HTML (anzi, XHTML perché noi siamo fighi e usiamo le ultime novità del mercato).

    Premesse generali, sostanzialmente inutili in questo contesto, ma che posson sempre servire in futuro.

    Il CSS serve a definire molto più facilmente le proprietà di un oggetto HTML. Ad esempio, mettiamo di voler rendere un paragrafo di testo rosso. Senza CSS avremmo scritto:

    <p>
     <font color="red">
      Questo è il testo che diventa rosso.
     </font>
    </p>

    Invece noi che siamo bravi e vogliamo fare i fighi che tra l’altro risparmiano pure un po’ di spazio, scriveremo:

    <p style="color: red;">
     Questo è il testo che diventa rosso.
    </p>

    Voi direte: l’effetto è lo stesso, allora che ci frega? In verità vi dico, questa cosa ha un suo senso, ma se non lo capite in questo post come se fosse una rivelazione divina non ve lo potrò spiegare altrimenti, anche perché se no a quest’ora lavorerei alla Jackson Libri e voi comprereste libri da 700 pagine per la modica cifra di 50 euro (ehi, ci devo pensare…).

    Ok, ve lo dico. La vera utilità del CSS risiede nelle classi. Sono una cosa fighissima: mettiamo il caso di avere 10 paragrafi disseminati qua e là, e noi vogliamo che siano mostrati tutti alla stessa maniera. Per esempio, questi 10 paragrafi, al contrario degli altri, devono essere tutti gialli su sfondo nero.

    Ciao! Sono un paragrafo giallo su sfondo nero!

    Per renderli così dovremmo scrivere qualcosa tipo:

    <p style="background-color: black; color: yellow;">
     Ciao! Sono un paragrafo giallo su sfondo nero!
    </p>
    <p style="background-color: black; color: yellow;">
     Ciao! Sono un altro paragrafo giallo su sfondo nero!
    </p>
    <p style="background-color: black; color: yellow;">
      Me' basta. Fate finta che io sia già il decimo.
    </p>

    Sai che rottura se decidiamo, all’improvviso, di cambiare qualcosa, tipo mettere uno sfondo verde anziché uno sfondo nero? Se invece ci inventiamo una classe, e la chiamiamo, chessò, pippo, ci risparmiamo un altro po’ di rotture. La prima rottura che ci risparmiamo consiste nello scrivere, invece, così:

    <p class="pippo">
     Ciao! Sono un paragrafo giallo su sfondo nero!
    </p>
    <p class="pippo">
     Ciao! Sono un altro paragrafo giallo su sfondo nero!
    </p>
    <p class="pippo">
      Me' basta. Fate finta che io sia già il decimo.
    </p>

    Chiaramente dobbiamo anche spiegare a qualcuno ‘sto pippo che mi rappresenta. Questo lo andiamo a fare all’inizio del codice HTML, nella sezione compresa fra <head> e </head> (intestazione), e più in particolare in uno spazio delimitato da <style type="text/css"> e </style> (che troverete già, bello come il sole e pronto per essere manipolato):

    p.pippo
    {
     background-color: black;
     color: yellow;
    }

    A questo punto, se volessimo cambiare qualcosa, ad esempio appunto lo sfondo, faremo una semplice modifica alla definizione di pippo anziché andare a modificare dieci paragrafi:

    p.pippo
    {
     background-color: black;
     color: green;
    }

    Ok, smettetela di scorrere la pagina: la parte interessante è qui.

    Esiste una proprietà del CSS chiamata display, che può assumere alcuni valori. Quelli che servono a noi sono block e none. Senza scendere nei dettagli, se impostiamo display: block, l’oggetto viene mostrato, se mettiamo invece display: none, l’oggetto c’è ma non si vede.

    Piccolo esempio:

    Fai clic qui per mostrare/nascondere il testo.

    Per prima cosa dobbiamo inserire una piccola funzione Javascript, possibilmente nell’intestazione (cioè, come detto prima, quella sezione del codice HTML compresa fra <head> e </head>). Il codice l’ho rubato a Trentamarlboro, che ringrazio e con cui mi complimento davvero se per caso è lui l’autore, vista l’implementazione semplice ma efficace:

    <script type="text/javascript">
    function toggle(id) {
     if (document.all) {
      if (document.all[id].style.display == 'none') {
       document.all[id].style.display = '';
      } else {
       document.all[id].style.display = 'none';
      }
      return false;
     } else if (document.getElementById) {
      if (document.getElementById(id).style.display == 'none') {
       document.getElementById(id).style.display = 'block';
      } else {
       document.getElementById(id).style.display = 'none';
      }
      return false;
     }
    }
    </script>

    Successivamente dobbiamo modificare tutte quelle parti del codice HTML che vogliamo modificare. Per esempio, prendiamo quello che avrebbe dovuto fare hubrys per la serie della Telecomachia (mi permetto di aggiustarlo un po’ perché in realtà ci sono dei piccoli errori nel codice originale):

    <div class="boxSidebar">
    <h2 class="sectiontitle">Biastemario:</h2>
    <h3>TELECOMACHIA</h3>
    <a href="http://...">Prima puntata</a><br />
    <a href="http://...">Seconda puntata</a><br />
    <a href="http://...">Terza puntata</a><br />
    ...
    </div>

    In questo caso diventa:

    <div class="boxSidebar">
    <h2 class="sectiontitle">Biastermario:</h2>
    <h3>
     <a href="javascript: void(0);" onClick="toggle('biast_telecom');">TELECOMACHIA</a>
     </h3>
    <div id="biast_telecom">
      <a href="http://...">Prima puntata</a><br />
      <a href="http://...">Seconda puntata</a><br />
      <a href="http://...">Terza puntata</a><br />
      ...
    </div>

    In questo modo apparirà più o meno come segue:

    Biastemario:
    TELECOMACHIA

     

    Ok. Attendo notizie.

  • How to remove Win32:dialer-520

    I’ve found a dialer on my system, for which I haven’t found enough info around the Internet. So I’ve thought that it would be useful to share the procedure I’ve followed in order to remove it from a Windows XP computer.

    This dialer is generically called Win32:dialer-520. My antivirus did not find it, so I’ve had to found it heuristically (indeed, I’ve had to look for strange startup items via Spybot Search and Destroy). Looking around on forums I’ve found that some other antivirus are able to discover it, however they can’t delete the related files.

    The problem, in fact, is that this dialer works in a very odd way. It installs a file, in this case called winzwr32.dll, in the %windir%system32 directory (usually C:WINDOWSsystem32). This is a DLL library, so it does not work as a process itself (that is, a standalone program such as explorer.exe), hence it does not compare in the list of processes in Task Manager. A DLL just contains some functions that do something when invocated from another program.

    In other words, this dialer is almost invisible. The only thing that makes you alerted is the fact that it randomly creates a program called xxxxx.tmp.exe (where xxxxx is a sequence of random alfanumeric characters) in the %TEMP% folder, then runs it.
    This program opens a pop-up window asking you to create a modem connection to an unknown ISP, informing you that you’ll have to pay just 15 € per call (whoa!).

    As a natural consequence, I had to find which program called this DLL. This program is winlogon.exe, that is the program that controls the logon and logoff procedures in Windows XP. This process is critical, so it must be loaded before anyone else and must be one of the last to be closed; thus it cannot be closed when someone is logged onto the system. It also can load some DLLs, such has the one that notifies messages through shiny baloons and so on.

    The dialer installer silently adds some keys in the Windows Registry in the following path: HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogonNotifywinzwr32. These keys tell winlogon that it has to open winzwr32.dll, and do some things when system is starting up and some others when it is shutting down. Among these things there is the task of checking if someone deleted these keys, in order to restore them.

    This means that:

    • The winzwr32.dll file cannot be deleted because it’s in use. This file is always loaded, even in Safe Mode.
    • If we try to delete that keys in the registry, in order to avoid letting winlogon load this DLL at next reboot and then be able to delete the file, the DLL will be invocated during the shutdown phase, will discover that the keys are deleted, and will recreate that before rebooting, hence making useless the changes.
    • As winlogon.exe is among the very first things loaded into the system, there is no easy way to tell Windows to delete the file before loading winlogon (better: I’m sure there is one, but I can’t find the way).
    • We would need to unmount the hard disk containing the operating system and plug it into another Windows XP system in order to avoid booting the "infected" system at all, then to be able to delete the unwanted files.

    By luck I’ve found an easier way. But, before explaining it you must be warned. 1) You must be administrator of the computer in order to be able to do that. 2) Please notice that these info are provided for didactical purposes, but you accept to use at your own risk. 3) No liability for any damage due to following these steps.

    If that’s ok, just follow these steps.

    • Go to Start, then Run…, then type regedt32 and go to OK;
    • Follow this path: HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogonNotifywinzwr32;
    • Delete the following values: DLLName, Startup, Shutdown;
    • Right-click on winzwr32, then go to Permissions… and click on Advanced;
    • Select SYSTEM, then click View/Edit…;
    • Set on Deny the following values (hope translation from the Italian version is correct): Set value, Create subkeys, Owner write.
    • Click on OK, then again on OK, then reboot;
    • After rebooting, go to Start, then Run…, then type cmd and go to OK;
    • Type del %windir%system32winzwr32.dll then press Enter. Et voilà! The file has been deleted!

    In order to clean up the system, you should also come back to regedt32 and delete the winzwr32 key (although it now wouldn’t work in any case). Also you may want to delete the *.tmp.exe files located in the %TEMP% folder (usually C:WINDOWSTemp).

    For any further question just ask …and hope I’ll be able to answer.

  • Homemade 3D canvas.

    Although the CSS specifications make it easy to create inset and outset borders (see border-style), we may want to set up "manually" a border around an object giving a 3D effect just thanks to a right setting of the colors of each side of the border.

    Generally, a 3D effect to a square object can be obtained applying an X colour for the background, then an X+1 (brighter) colour for the top and left sides and an X-1 (darker) colour for the bottom and right sides.

    Let’s begin with an example. We’ll just create a paragraph with the following style (hover the mouse to get a description of each row):

    width: 60px;
    padding: 2px;
    color: #FFFFFF;
    background-color: #888888;
    border: 2px solid;
    border-color: #AAAAAA;

    For those of you who never used colours in HTML or CSS, colours are just defined as #RRGGBB, where RR, GG and BB stand for the hexadecimal code of the quantity of Red, Green and Blue that define the colour. The hexadecimal value may go from 00 (=0) to FF (=255), hence: #000000 is black, #FF0000 is red, #00FF00 is green, #0000FF is blue, and #FFFFFF is white. Of course, as each colour can assume 255 hues, we may choose among 16 million colours (255*255*255).

    Anyway: here it is the result.

    Hello.

    As you probably already know, border-color is a shorthand for border-*-color where * can be top, right, bottom or left. This means that this attribute may define either just one colour (that would set the four sides of the border with the same colour) or it may define up to four colours, one for each side.

    Now we have a gray background and a border with a brighter gray (+2). Let’s try to define the colours of the four sides, keeping the original border colour for the top and left sides, and setting a darker (-2) one for the bottom and right sides.

    border-color: #AAAAAA #666666 #666666 #AAAAAA;

    The box comes like this:

    Hello.

    It seems that it is raising from the screen. To inverse the result, just invert the colours!

    border-color: #666666 #AAAAAA #AAAAAA #666666;

    Hello.

    Also you may want to raise it more. There are two things you can do in order to reach this result. The first one is to increase the width of the border:

    border: 3px solid;

    Hello.

    The other way is to make the contrast higher using more "distant" colours:

    border-color: #DDDDDD #333333 #333333 #DDDDDD;

    Hello.

    Of course, this becomes extremely interesting when using DHTML features (that, however, we won’t discuss here). A good thing to do is, for example, to define two classes, eg. Class1 and Class2, that can be alternated by Javascript using onMouseOver and onMouseOut events. Class1 may contain, for instnace, definitions for an inset border and Class2 for an outset variant, or two different sets of colours.

  • Siamo la società dei blog.

    Vero.

    Solo su Splinder ci sono pressapoco 217mila blog aperti. Ok, alcuni belli, alcuni brutti, alcuni abbandonati, alcuni provvidi di interventi interessanti… ma son comunque una marea.

    Pensate in proporzione. Beh, sì, su due piedi è difficile, perciò ve lo dico io in che ordine di grandezza dobbiamo immaginare la blogosfera. Anzi, ve lo dice Technorati: siamo quasi a quota 50 milioni.

    Pensate un po’: 50 milioni di soggetti che parlano di sé, o parlano di un tema specifico, o più semplicemente di quello che gli passa per la testa in quel momento. Ci sono blog di persone normali così come di VIPpps, di aspiranti poeti, scrittori o semplicemente blogstar, di tifosi di una squadra di calcio o dell’altra, di persone interessate alla politica, o ad uno sport, o all’associazionismo, o chissà che altro. Certo, perché prima era da fighi farsi un sito, adesso è molto più figo (e facile) farsi un blog.

    C’è questa tendenza globale a voler comunicare in qualche modo, a voler parlar di sé ad un esterno composto da chissà quante e quali persone. Spesso usiamo il blog come canale per comunicare un messaggio ad una persona in particolare, a volte in modo esplicito, altre volte in modo velato, quasi codificato, in modo tale che sia solo la persona prescelta (e magari qualcun altro) a capirla. Una sorta di lettera elettronica aperta. Altro che SMS.

    Godiamo un po’ nel vedere contatori incrementarsi e spulciare distrattamente le statistiche per scoprire chi ci ha visto. Non per altro, ma perché si sa che spesso sarà anche piacevole rispondergli, e magari trovare un assiduo lettore di un assiduo blog-da-leggere.

    Beh, cari blogger, visto che sta società dei magnaccioni è così grande e così piena di belle speranze, dedico a tutti voi questa notte, sia a voi che sarete passati di qui sia a voi che non saprete mai dell’esistenza di questo post.

    Un abbraccio.