enricorossi.org

Enrico Rossi


View p7m file with openssl

How to view the content of a .p7m file Normally a .p7m file is what in openssl terms is a DER file 1 (note: it work also with cms command). openssl smime -verify -in smime.p7m -inform der -noverify -signer cert.pem -out textdata where: -verify to tell openssl that you will feed a signed mail message on input and outputs the signed data. -noverify do not verify the signers certificate of a signed message.

Read more...

Rsyslog with remote log and rotation by date

How to configure a debian (Wheezy) rsyslog daemon to receive logs from remote system, store them in a separate directory/file and the daily rotate these files with date-like extension. What we want: /var/log/ ├── alternatives.log ├── alternatives.log.1 . . . ├── remote │ ├── remote1_host_IP │ │ ├── remote1_host.log │ │ ├── remote1_host.log-20141202.gz │ │ ├── remote1_host.log-20141203.gz │ │ └── remote1_host.log-20141204 │ ├── remote2_host_IP │ │ ├── remote2_host.log │ │ ├── remote2_host.

Read more...

Yet another bricked fonera recovered

I have been asked to recover another lost password/bricked fonera and upload an openwrt firmware. I generally do not spend much time in trying to recover the system using the normal network system, since I have all the tools to connect to the internal serial port and go directly into the RedBoot system. This is how I did it, most kept as a note for the next fonera I’m sure will come :)

Read more...

Urllib3 json cookie

Login with a Json authentication into an https server with TLSv1 only SSL connection capabilities. Python has 3 different urllib library in order to manipulate http connections, which unfortunately are not the evolution of the same project. Plus there are others libraries based on these as well. The urllib2 has a great cookie handling capabilities with the cookielib, but it cannot change the SSL connection’s propriety easily, see internet for overriding the socket connection proprieties.

Read more...

Python kivy scrollable popup and static button

How to create a kivy Popup window with a scrollable content but a fixed close button. Tested on debian jessie, python 2.7 and kivy library 1.7.2. The idea is to have a popup to show some large text which need to scroll but the bottom close button should remain fixed. I create a popup object which contains a BoxLayout object. Then the BoxLayout is divided into a scollable object and a button.

Read more...
Previous Page 5 of 16 Next Page