Sunday, August 19, 2012

send email through gmail from command line (useful for batch files, windows task manager, remote monitoring)

I wrote send-mail-gmail.stex.py, an open source small and simple python script to send mail through gmail from command line, via smtp.gmail.com, using TLS authentication, on port 587.

Download it from http://code.google.com/p/infoarch-scripts/downloads/list

The python script should work in Windows, Linux, Mac and doesn't need any other program/server, etc.

In the download package you'll find also a batch file to send scheduled mail from the Windows Task Manager (I had problems executing directly from Task Manager the python script with arguments).



Script history :
I tried to use the cygwin "email" program without installing a MTA, with no success, then I searched for a python solution and I found the page http://www.daniweb.com/software-development/python/code/380881/python-3-and-python-2-send-email-through-gmail, that inspired me to write this script.

Other solutions to send mail from command line (not tested) :

Wednesday, September 21, 2011

How to install in multiboot Win XP on a Windows Vista machine hiding partitions between OS and resolving the problem of Win XP Installed on drive D

How to install in multiboot Win XP on a Windows Vista machine (then, installing XP after Vista), hiding partitions and resolving the problem of Windows XP Installed on drive D (tested on an Acer Extensa 5620)

Come installare in multiboot Win XP su una macchina Windows Vista (quindi, installando XP dopo Vista), nascondendo le partizioni e risolvendo il problema di Windows XP installato sul drive D (testato su un Acer Extensa 5620)

0) backup all your valuable data and read all the istructions before starting. if you aren't a braveheart and want something more simple but less useful (i.e. Win XP 'll be installed in the D drive) follow other tutorials as http://www.howtogeek.com/howto/windows-vista/install-windows-xp-on-your-pre-installed-windows-vista-computer/


*) boot Windows Vista

1) Create free space for Windows XP with GParted
1.1) download it from http://gparted.sourceforge.net/download.php
1.2) create a live usb with Tuxboot http://gparted.sourceforge.net/liveusb.php#windows-method-a
1.3) reboot
1.4) run a live usb with GParted
1.5) reduce the space of Vista
1.6) create a partition for XP (10gb are ok)
1.7) format the space for XP as FAT32 (don't worry, the space 'll be reformatted by XP)

*) reboot in Vista

2) remaster a Win XP install disk with nLite adding the required drivers
2.1) download nLite from http://www.nliteos.com/download.html
2.2) download the driver AHCI_Intel_v7.5.0.1017_Vista_XP.zip and Chipset_Intel965_v8.2.0.1012_Vista_XP.zip from ftp://ftp.support.acer-euro.com/notebook/extensa_5620/driver/
2.3) unzip the AHCI driver, and unpack (not install) it with the command line "setup.exe -a -pc:\"
2.4) unzip the Chipset driver, and unpack (not install) it with 7zip
2.5) check what controller you have from System Preferences
2.6) remaster the Win XP cd adding the two drivers, and create with nLive a new cd

3) update with the last BIOS
3.1) download it from http://support.acer-euro.com/drivers/notebook/ex_5620.html
3.2) install running the command "CLB-121.EXE" as administrator
3.3) reboot and check if the hard drive is in AHCI mode (if not, set it)

4) install Plop Boot Manager
4.1) Download Plop from http://download.plop.at/files/bootmngr/plpbt-5.0.13.zip
4.2) install it following the instructions "7. Harddisk install using the Windows boot menu (NT, 2K, XP, VISTA, Win7)" ( http://www.plop.at/en/bootmanager.html#wininst ). Following the instructions, to execute the program "InstallToMBR" as Administrator, open CMD as admin (START > cmd + CTRL + SHIFT + ENTER) and then run the program from the command line.
4.3) reboot
4.4) create in Plop a profile for Windows Vista and XP (hiding Windows XP to Vista and hiding Vista to XP) following the instructions "22. Windows XP and Windows Vista dual boot with hidden (cleared) partitions" ( http://www.plop.at/en/bootmanager.html#ex1 )
4.5) activate in Plop the Win XP profile
4.6) reboot with CTRL + ALT + CANC

5) install Windows XP from cd

6) reboot with Windows Vista CD and restore MBR
6.1) open the command prompt
6.2) launch the command "BOOTREC.EXE /FixMbr"
6.3) launch the command "BOOTREC.EXE /FixBoot"

7) recover hidden Vista partition with TestDisk
7.1) run live Ubuntu ( http://www.ubuntu.com/download/ubuntu/download ) from an usb key
7.2) install the package TestDisk ( http://www.cgsecurity.org/wiki/TestDisk ) : "sudo apt-get install testdisk"
7.3) run TestDisk : "sudo testdisk"
7.4) recover the partition with the sequence : > Create Log > select the disk > partition type INTEL > ANALYSE > QUICK SEARCH > set active partition with LEFT + ENTER to continue > WRITE

*) boot Vista

8) repeat the step 4) from 4.2) to 4.4)

9) End, all right, all installed, no damage (maybe ;-) !!!

Monday, July 11, 2011

Novatel MiFi 2352 firmware

Ho scoperto questo fantastico prodotto, acquistato in offerta dalla Vodafone a 29 euro compresi 3 mesi di internet...

per acquistare direttamente l'articolo sbrandizzato buttate un occhio sul sito Multiplex Systems ( http://store.mpxsys.com/ ), che fornisce anche firmware aggiornati ovviamente no brand !!! ( http://store.mpxsys.com/novatel-wireless-hspa-mifi-faq ).

aggiornare il firmare permette di superare il limite di 3 connessioni simultanee imposto dalla Vodafone, di settare in maniera stabile la connessione in 3G o GPRS, e altro ancora.

se volete cercare il firmware in giro su internet, fate attenzione a non scaricare fake o versioni contraffatte, manomesse con virus o altro malware.
per vostra info, un firmware valido è quello che si chiama 20418764_MUU_MiFi23x2_FW5.26.2_ML3.00.57_NvtlGeneric_v1.2_pkg.exe e che ha per hash md5 7EFA29BA99F81EC46CA260875E43D9A2 e sha256 D2F66D39A4595E403AB6C146D311774CC4D398A4314670AD32D28293D635550E .


buona navigazione !!!

Sunday, April 17, 2011

Appunti crittografati (aka file di testo crittografati, note sicure, notepad - editor di testo crittografato)

Con l'ultima versione dell'editor libero VIM (per Linux, Windows, OsX), la 7.3, è possibile con facilità e senza bisogno di altri programmi, avere le proprie note crittografate con il potente algoritmo Blowfish (http://it.wikipedia.org/wiki/Blowfish).

VIM è un programma che funziona da DOS o con una interfaccia grafica. I tasti e le sue logiche di funzionamento sono un po' diverse dal normale (come, ad esempio, succede per Emacs), ma per un power user che vuole crittografare le proprie note questo non è certo un problema...

Dopo aver scaricato e installato VIM (vedi links sotto), per avere la propria nota crittografata con Blowfish e non con la crittografia standard di VIM (più fragile, ma di contro più facile da recuperare se si perde la password), la sequenza di comandi è la seguente:
0) lanciare VIM (programma gvim.exe)
1) digitare ":setlocal cm=blowfish" per impostare la crittografia più sicura
2) digitare ":X" e impostare la password utilizzata per i prossimi salvataggi sicuri digitandola due volte
3) digitare "i" per iniziare l'inserimento del testo siuro
4) premere il tasto ESC per uscire dalla modalità inserimento
5) digitare ":w NomeDelVostroFile.txt"
6) digitare ":q" per uscire da VIM
--- per riaprire il file crittografato
0) lanciare VIM (programma gvim.exe)
1) digitare ":o NomeDelVostroFile.txt" per aprire il file
2) inserire la password per il file
3) a questo punto editate liberamente il file, aiutandovi anche con le guide rapide (cheatsheets) per VIM indicate sotto nei links


PS
il file di testo protetto creato con VIM, se aperto con altri programmi, si mostrerà con un file tipo il seguente, nel quale il testo crittografato non si vede, ma si comprende che si tratta di un file crittografato da VIM, perché i primi caratteri sono "VimCrypt" e di seguito c'è l'indicazione dell'algoritmo di protezione utilizzato, nel nostro caso "~02", che è quello più sicuro, a differenza di quello standard meno sicuro che è indicato con "~01".

VimCrypt~02! ÒÜÓ"üø´Òá…ÇâA x«åô­æ|º,¾äï´§ Ù


Links
* homepage VIM http://www.vim.org/
* download versione per Windows http://www.vim.org/download.php#pc . scaricare la versione che si installa automaticamente "Self-installing executable", o la versione portable composta di due files "GUI executable" + "Runtime files" da decomprimere nella stessa directory
* alcune cheatsheet (guide rapide ai tasti di VIM) http://www.viemu.com/vi-vim-cheat-sheet.gif http://www.gentoo.org/images/vicheat-final.png

Thursday, September 10, 2009

EasyPG Assistant User's Manual - Emacs 23.1

Being difficult to find it online I decided to extract and publish the EasyPG Assistant User's Manual found within the package of Emacs 23.1.


References:
- http://epg.sourceforge.jp/
- http://www.emacswiki.org/emacs/EasyPG
- http://www.gnu.org/software/emacs/


Wednesday, September 17, 2008

Press Release: Carlo Ruta condannato per "stampa clandestina"

Pubblico di seguito una Press Release inviatami dallo storico Carlo Ruta sulla sentenza che lo ha condannato per "stampa clandestina" (http://www.leinchieste.com/).

Vi prego di dare la massima diffusione a questa notizia in Italia e all'estero, in quanto tale sentenza è un attacco senza precedenti alla libertà dell'informazione e della rete nel nostro paese.




Press release

Information on the Web. An Italian obscurantist sentence

An Italian blogger and historian, Carlo Ruta, has been condemned for “clandestine press” with justifications that do not belong to the contexts of a democratic country. This is the first case in Europe. It could be the beginning of the end of information on the Web.

An Italian judge, Patricia Di Marco, for the first time in Italy and in Europe has condemned a blogger to a financial sanction for “clandestine press”. This court decision has been formulated on the 8th of May 2008 in Sicily, by Modica’s law court. The justifications of the sentence have been published in August. This is a most serious fact that legitimate the worry and the protest that have been raised in Italy, with firm standing points of parliamentarians, historians, journalists, blogger, lawyers, associations. In such sentence, the judge has written that the tried site,
http://www.accadeinsicilia.net/, a normal blog, was to be considered a daily newspaper, lead clandestinely.

Such fact happens in a difficult context. Some strong powers in Sicily are making whatever is possible in order to hush up Carlo Ruta, who is now the author of
http://www.leinchieste.com/ and of numerous inquiries on the Mafia, politics, the illicit transactions of the finance. In recent months, three Italian law courts have passed judgment four sentences, the historian has been inflicted to pecuniary sanctions and huge compensations.

Far from the reasons of a true democracy, but close to logics that are in force in Tehran and Beijing, the Sicilian sentence make in fact a dangerous breach, offering to governments and to the economic and financial powers, which are more and more afraid of the freedom on the web, a way of hit against uncomfortable bloggers, the sites that publish free information, documentation, inquiries. It is therefore important that the civil mobilization, already imposing in Italy, is extended to all the European countries.

Giovanna Corradini (editor, Italy); Nikos Klitsikas (historian, Greece); Paolo Fior (journalist, Italy); Nello Lo Monaco (geologist, Italy); Vincenzo Gerace (chancellor, Italy); Riccardo Orioles (iournalist, Italy ); Roberto S. Rossi (journalist, Italy); Carlo Gubitosa (journalist writer, Italy); Carla Cau (teacher, Italy ); Serena Minicuci (journalist, Italy); Vincenzo Rossi (journalist, Italy); Teodoro Criscione (student, Italy); Antonella Serafini (journalist, Italy ); Angelo Genovese (student, Italy); Giuseppe Virzì (blogger, Italy); Luisa La Terra (employee, Italy); Marco Benanti (journalist, Italy); Andrea Mangano (student, Italy); Pietro Lo Monaco (student, Italy); Luisa La Terra (employee, Italy)

Please publish. Thank you.

For information:



Freedom emergency in Italy


The Sicilian sentence that has condemned information on the net, regarding it as crime, is provoking protests and alarms on the web and in every “responsible” corner of the country. The reasons are heavy as stones. The principles that have made the history of the democratic thought have been attacked: the same ones for which, in our country, men like the Rosselli’s brothers, Piero Gobetti, Antonio Gramsci, Eugenio Curiel, Giovanni Amendola, have spoilt their engagement and gave their life. The principle of the free expression has been particularly attacked, this principle is representative for all freedoms, it constitutes a hinge of the republican Constitution.


The current Italian government, than is connoting itself more and more in an illiberal sense, cannot avoid the moral duty of answering these days’ protests. Enough with infringes. The wave of indignation will not stop soon, and we are committed to continue as long as possible. The last frontier of democracy, in its most open and advanced form, represented by free expression in the Internet, by the communication that breaks in and bursts out in all directions, that makes citizens protagonists in a new way, is at stake. The Italian Constitution which, as Piero Calamandrei has remembered us, was not born in the parlours neither in the rooms of the power, but on mountains, beside the bodies of the victims of the war, between fires of the cities in revolt, is at stake.


A law is quickly necessary, a law distant from every possibility of misinterpretation, in order to stop the censor and repressive wefts of the strong powers of the country, illiberal and anti-democratic for vocation, in a definitive way. It is also necessary that the legislator understands that the information on the web cannot have principle limitations. The net is a hinge of our time, in which the democracy, with the exercise of confrontation, gets body and voice. It cannot be therefore annihilated, as it happens in Iran and Birmania.


Appeal is then made to the web, to the communication on all levels, to the civil and responsible country, so that the mobilization will continue endlessly, with strong initiatives. The Sicilian sentence, as a blogger has written, could be one of last “pearls” of a necklace that, day after day, is changing in an oxbow. It is about doing whatever possible to avoid this happening. It is necessary to prevent that Italy becomes the pyre of free expression, still remembering that the pyres of ideas may a preparatory stage of open scene regimes.


Carlo Ruta (historian journalist, Ragusa); Letizia Battaglia (photographer, Palermo); Alfio Caruso (writer and journalist, Milan), Paul Barnard (journalist, Rome); Carmine Colacino (research university, Potenza); Nikos klitsikas (historian and writer, Athens); Joseph Casarrubea (historian, Partinico); Pino Nicotri (journalist, Rome); Rocco Sciarrone (Sociology professor, University of Turin); Antonino Monteleone (journalist and blogger, Reggio Calabria); Paola Vallatta (Journalist, Paris); Diana Cimino (student, Palermo), Marisa Conte (Ragusa); Barbara Grimaudo (trainer, Palermo); Invisible Citizens (Association, Palermo), Alessio Di Florio (activist, Pescara); Fabrizio Occhipinti (student, Ragusa); Simona Taschetti (Fiumefreddo of Sicily); Flora Nicole Blasi ( student, Busto Arsizio), Lucio Lanza (Sant'alessio Siculo, Messina); Bruno Chiazzo, used, Florence); Gian Joseph Morici (blogger journalist, Agrigento); Cinzia Montoneri (graphics advertising and blogger, Ragusa); Athos Gualazzi (journalist and blogger, Rome); Joseph Sanarico (used, Turin); Sara Catanese (student, Rosolini); Roberto Copparoni (teacher and journalist, provincial referent of the Greens of Cagliari); Ugo Albano (blogger); Pasquale Incantalupo (Sesto San Giovanni, Milan), Andrea Giompaolo (student, Ragusa), Marco Di Martino (lawyer, Ragusa); PRF federation of Ragusa; Gemma Marino (bank officer retired, Caltagirone); Paul Fior (journalist, Milan); Nello Lo Monaco (geologist, Ragusa); Stefano Moncherini (RAI journalist, Roma), Vincenzo Gerace (Francavilla, Messina); Roberto S. Rossi (journalist, Catania); Editor of "The clandestine" (newspaper, Modica); Riccardo Orioles (journalist, Catania); Giulia Manzini (journalist, Gazzetta di Modena); Carlo Gubitosa (journalist writer, Taranto); Carla Cau (teacher, Ragusa); Serena Minicuci (official Region Calabria, Catanzaro); Vincenzo Rossi (journalist, Catania); Teodoro Criscione (student, Ragusa); Antonella Serafini (journalist, Rome); Patrizia Bellocci (university professor, Florence); Angelo Genovese (student, Ragusa); Joseph Virzì (blogger, Milan); Luisa La Terra (Ragusa); Marco Benanti (journalist, Catania); Andrea Mangano (student, Ragusa); Pippo Gurrieri (journalist, Ragusa); Victor Ciuffa (publisher and Director of Economic Mirror, Rome); Pietro Lo Monaco (student, Ragusa); Luisa La Terra (Ragusa); John Iacono (metodologo, Ragusa); Christmas Salvo (bloggers, Trapani); Supplizi Franca (sociologist, Ragusa) ; Piero Lo Monaco (student, Ragusa); Agnese Knee (cantautrice, Caserta); Daniela Pappalardo (Monterosso Almo, RG), Peter Campoli (Russians, RA); Roberto Ballabeni (Paris); Francis Cyril (journalist, Calabria); Elio Copetti (artist, Venzone, Udine); Aldo Zanchetta (engineer, Gragnano); William Trupia (photographer, Milan), Marco Billeci (student university, Milan). Joseph Crapisi (journalist blogger, Corleone); Pippo Palazzolo (law and economics professor, Ragusa); Nicola Lo Bianco (teacher, Palermo); Luigi Zoppoli (journalist, Turin); Antonio Pavolini (Employee, Roma), Salvatore Gioncardi (actor, Palermo); Piero Paolino (teacher, Modica), A New Perspective (political movement, Modica); Mario Nanni "Maralai" (blogger); Laura Incantalupo (used, Sesto San Giovanni); John Arata (blogger, Turin); Pier Luigi Zanata (journalist, Capoterra, CA); Viviana Salerno (free trader, Comiso); Enrico Natoli (photographer, Rome); contrast (association Antimafia, Roma), Francesco Balistreri (engineering student, Pietraperzia); Giuliano Ottaviano (Professor of Science, Ragusa); Luca Grimaldi (journalist blogger, Salerno); Antonio Giaimo (journalist, Bolivia); Sandra Cangemi (journalist, Milan); Baldassare Criscenzo (free trader, Rome); Mary Virgillito (journalist blogger, Catania).

For adhesion to this appeal (please indicate name, surname, activity, city):

For news and information:

Please publish and spread.