Posts

How to troubleshoot a module import problem in a scapy script

If you try to run a Python script importing some module and you get this following issue: NameError: name 'IP' is not defined or ImportError: No module named all check your Python script name. Probably you are using some reserved name from a function. To fix it, rename your Python script for other name, like lala.py (to be sure you are not using a reserved function name). Don't forget delete any .pyc file that can has any conflict with any function name. Here's an example about how to fix it: mv new.py lala.py rm new.pyc python lala.py Enjoy it!

How to login in Spotify throught Facebook

Image
A common issue is when you get this following alert: A facebook error has occurred. Please try again To fix it, you need to enable an alternative password for thirds applications in your facebook security configuration, like follows: Browse to facebook.com, Settings (top right corner) > Security (left hand menu) > App Passwords. There, generate a password for "spotify". Use this password (and your email address to login in facebook) to login to Spotify on your mobile app. Enjoy it!

How to install Netem on a TP-Link TL-WR1043ND router with OpenWRT

Image
To use Netem we need to install traffic control (tc). To do this, we need install the last OpenWRT version (Chaos Chalmer). I tested before on Attitude Adjustment (a previous version) and I couldn't install on it. To install the last version go to this page  and choice your branch (stable or trunk). After install the factory and upgrade binary, run the following commands on your router console (throught ssh): opkg update opkg install tc iptables-mod-ipopt kmod-sched kmod-netem A typical netem example is: tc qdisc change dev eth0 root netem delay 10ms RTNETLINK answers: No such file or directory Remember, load netem first: insmod sch_netem If you have the same problem, run netem with this format: tc qdisc add dev eth0 root handle 1:1 netem delay 10ms Enjoy it!

from: can't read /var/mail/ in Python scripts

If you add a Python file to your PATH, maybe you will see this error: from: can't read /var/mail/$First_Library_Name This happend, because you need to be explicit with application you want to run your script. To fix it, just add in the first line of your script the following line: #! /usr/bin/python Enjoy it!

How to configure Gmail as your default mail client in Ubuntu

Image
It is very easy! Install gnome-gmail and after set it as your default mail client. sudo apt-get install gnome-gmail Enjoy it!

Exception: Could not find a default OpenFlow controller in Mininet

If you try to run a mininet script like this  , maybe you will get this problem if you are under Ubuntu. Exception: Could not find a default OpenFlow controller  This is trigger because your system don't find a default controller . To enable it just add the first line and add the controller argument to net variable like the second line: from mininet.node import OVSController net = Mininet(topo=topo,host=CPULimitedHost, link=TCLink,controller = OVSController) Now, you will get the following error: c0 Cannot find required executable ovs-controller. Please make sure that it is installed and available in your $PATH: (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin) ovs-controller is a legacy name. You need to be sure that you has it. sudo apt-get install openvswitch-testcontroller sudo cp /usr/bin/ovs-testcontroller /usr/bin/ovs-controller If you run it again, you should kill ovs-testcontroller first to avoid this: Exception: Please s...

¿Cómo escribir tildes en QT4 Designer?

Image
Uno de los problemas al tratar de desarrollar una aplicación en español, es que QT4 Designer no permite escribir con tildes. Para solucionar este problema de mala ortografía, se debe desactivar los xmodifiers desde el terminal y luego ejecutar la aplicación: #!/bin/bash unset XMODIFIERS designer-qt4 & Problema resuelto!