After a few server crashes I had to write this very same script each time so I better keep it up here and maybe someone find it useful 1 2 3 4 5 6 7 8 9 10 11 12 13 #!/bin/sh PREFIX=/var/develbackup SVNFOO=/home/svnuser/repos/foo TRACFOO=/home/svnuser/trac-env/foo DATE=$( date +%Y%m%d ) BACKUPDIR=backup-${DATE} mkdir ${PREFIX}/${BACKUPDIR} [...]
This is the first article in a serie about CANBus and higher-level protocols, which are extensibily used in Industrial environtmens along with Embedded Systems. CANBus standard describes only the layer 1 and 2, from an OSI point of view, dealing with physical and datalink activities. On the other hand, CANOpen is a protocol which [...]
Man In Remote Setup After presenting this talk first at RootedCon and a month later at Hackito Ergo Sum the time for releasing the code behind it has arrived. To understand the source code, you only need to have a look at the deployment diagram where the attacker is drawn in red and the [...]
Well, I also do some 2.0 stuff since I have been working in a web project for quite a long time, which I hope to release soon. One problem I found was accessing all the inputs in a form, knowing the ID, even those under divs tag inside the form. Something like the following: <form [...]
The simplest socket server, don’t know why but I always forget how bind is used in python. import socket sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.bind(("127.0.0.1", 1024 + 666)) sock.listen(5) client, details = sock.accept() while 1: data = client.recv(1024) print "data : %s" % repr(data)
Short post to remind myself how to do HTTP requests using python, really easy stuff that I quickly forget. Straight forward example using httplib and urllib from python. In the example I just perform some kind of login request retrieve the session id and then other request sending XML data using POST. Code! Feel free [...]
As a toy project to play a little bit more with Python and accessing Twitter, I came out with the idea of calculating the Internal Fragmentation of user’s tweet. To interface with Twitter services I used the Twitter extension located at http://code.google.com/p/python-twitter/, which has a pretty straightforward API. The script shown below gives you back [...]
Last week I faced a new problem, I had to program a installer for Windows in order to deploy some software we have produced at work. After a quick googling I found NSIS an installer generator, open source and with a simple scripting language. NSIS comes with a compiler which parses the sentences writting in [...]
The problem I faced was the following: Two processes I have to communicate with in order to validate data using stdin/stdout No source code of this programs Windows Platform Since I am a UNIX guy I haven’t ever done anything advanced in Windows so I didn’t have the time to learn how to achive this [...]
I have just published a new paper under the “Good Coding Practices” section, which I think can be useful for someone else. In this article I classify the bugs depending where in the life cycle of development they can be produced. This would be helpful to reduce the bugs which can be produced in the [...]