There’s no good solution for that which I know of, and in fact, it would probably require hacking up some well known renderer (Gecko or WebKit mainly).
With Python
The Mozembed only allow to display the web page
(so you need a X server, there are several programs automating this, but its slow and not very elegant).
Well, I came up with my own solution, it’s far from perfect, yet much better. Using QT4?s WebKit renderer and the fake x server (Xvfb - bundled with Xorg) you can have a command line tool
rendering pages perfectly!
Of course this can be converted to C++ easily or probably you can call the WebKit library
directly - maybe i’ll try that in the future. (Or then again, hack QT not to request a X server connection, if that’s
possible).
Run as (for example):
xvfb-run -a ./thumbpage.py 1024x768 http://www.insecure.ws/ insecure
If you need, you can uncomment the full page output (no scaling).
rotapken
made a nicer version of this script with xvfb wrapped in and checking for loading timeout, etc.
With C++
While a better solution would still be to bypass QT and render ‘by hand’ to and image file, or hack QT to do so (without
requiring any X server connection, and using fewer dependency than large QT libraries…), I decided to run my script
again, and I ran into troubles with python-qt4 on some debian systems (and older Fedora system, as a reader pointed
out).
Anyway, I remade the script into half-proper C++ so it uses fewer dependencies, execute faster, but most of all, always
links properly to QT even if the python-qt4 bindings are not working properly.
To compile, you need the QT4 dev package.
This project has also been forked here http://gitorious.org/wkthumb
These are just my notes about the operational security pieces that are relevant to the US’s Mueller report about Russian interference with US elections of 20...
This is a little blurb about how to use namespaces most efficiently at the time of writting.
In particular, systemd-nspawn offers a lot of flexibility, is li...
The Sheeva plug is a relatively old ARM-based (ARMv5, Kirkwood/Feroceron CPU) “plug-style” Linux box, with 512Mb NAND flash, an SDCard reader, and an ethern...
Comments