Reverse on OSX

This articles is a simple collection of programm I use for understanding how a third party programm interact with the system. List symbols of a binary nm -g /bin/ls U __DefaultRuneLocale U ___assert_rtn U ___bzero U ___error U ___maskrune U ___snprintf_chk U ___stack_chk_fail U ___stack_chk_guard # Show shared libraries used by a programm otool -L /bin/ls /bin/ls: /usr/lib/libutil.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.

Read more...

Migration from PyQT4 to PyQT5 at GNS3

The current GNS3 GUI interface use PyQT4. In order to support the retina display we choose to move to PyQT5. The move was not too complicated with the help of a small script. You can see the complete list of PyQT4 / PyQT5 differences here: http://pyqt.sourceforge.net/Docs/PyQt5/pyqt4_differences.html Actually most of recent distributions support PyQT5: Debian Jessie Ubuntu 14.04 and later Arch linux Gentoo Fedora 21 and later In all our code we already not directly include the PyQT4 module but our own qt module responsible of all the imports this save us the need to patch every files for changing the module.

Read more...

Lettre à mon Député

Monsieur le Député, Suite à la lecture de votre article sur le projet de loi sur le renseignement: http://www.jeanluclaurent.fr/Liberticide_a423.html Je tenais à vous faire part de mes inquiétudes concernant ce texte et de mes désaccords. En premier lieu, vous indiquez que vous ne légiférez pas dans l’urgence. Cette affirmation est fausse. En effet, le Gouvernement utilise la procédure accélérée réduisant la possibilité pour vous d’effectuer votre travail de parlementaire dans de bonnes conditions, en particulier sur un texte aussi technique.

Read more...

Développer pour le Jumping Sumo de Parrot sous Mac

Le Jumping Sumo de Parrot est un petit robot qui roule et peut sauter jusquà 80 cm de haut. Il est aussi équipé d’une Webcam. ![Jumping Sumo]({{ site.url }}/images/parrot/sumo.jpg) Voir sur amazon (lien d’affiliation): Parrot MiniDrone Jumping Sumo Noir J’en ai reçu un en décembre et après avoir un peu joué avec l’appli android avec j’ai décidé de jouer avec le SDK fournis par Parrot. Le SDK est en C, ce qui le rend assez facilement portable.

Read more...

Asyncio blocking code

Asyncio is greats piece of software. But all Python code is not compatible. In the following example we will see how to run blocking code from your asyncio code. We will by a simple asyncio application: import asyncio import time @asyncio.coroutine def clock(): while True: print("Current time from asynchronous code: {}".format(int(time.time()))) yield from asyncio.sleep(1) def main(): loop = asyncio.get_event_loop() asyncio.async(clock()) loop.run_forever() if __name__ == '__main__': main() The output is: Current time from asynchronous code: 1422265105 Current time from asynchronous code: 1422265106 And add blocking code:

Read more...

PEP 8 Git pre commit hook

This pre commit hook will check the PEP8 syntax of your Python files and ask you if you want to continue the commit process. In your project directory create a file: .git/hooks/pre-commit and add the execution permission on it. #!/bin/bash echo "Pre-commit started" echo "PEP 8 check" git diff --cached --name-only | grep .py | xargs pep8 if [ $? == 0 ] then exit 0 fi # Allows us to read user input below, assigns stdin to keyboard exec < /dev/tty echo "Do you want to ignore warning?

Read more...