Sunday, November 15, 2009

tidy crashed on Debian 64bit

I'm was working on a python project that invoked a tidy process. We were using the tidy python wrapper utidylib for that, with this code:
import tidy
tidy_obj = tidy.parseString(html, {})
tidy_outstream = StringIO.StringIO()
tidy_obj.write(tidy_outstream)
tidy_html = tidy_outstream.getvalue()
And it worked fine. Almost.
When  invoked it more frequently, i.e. every few seconds, it sometimes succeeded and sometimes crashed, FOR THE SAME HTML INPUT.
Searching the Internet I found that there is a known issue of tidy crashes on Debian 64 bit machines. Too bad.
Looking for an alternate tool to do the same trick I found another python wrapper for tidy that pretends to solve this issue: pytidylib. And the syntax is simpler:
import tidylib
tidy_html, errs = tidylib.tidy_document(html, {})
And guess what ? tidy process no longer crashes !
And while you are reading this, you may find this list of tidy options useful.
Enjoy tidying :-)

Thursday, November 05, 2009

Free Vulnerabilities Detector Tool - Secunia Personal Software Inspector (PSI)

I found this free software that scans your pc and detects software vulnerabilities and code flaws, alerts for installed programs that expose you to security threats and lists the latest security updates and patches you need to install. It also gives you the link to the relevant upgrade.

I scanned my pc and it found some programs needed an update such as: old version of firefox I had installed aside to the latest version I have,  ancient version of Adobe Reader, stale JRE, vulnerable Windows Media Player (6.x ...), .NET framework needed to be patched and some other flaws.

After I found some trojan horses on my machine last week, this is a tool I recommend wholeheartedly.

Secunia Personal Software Inspector (PSI), download here:
http://secunia.com/vulnerability_scanning/personal/