Showing posts from March, 2017

Install Netflix in RK3188 without google play

To access to any android application, you can use to get the apk file and install it without google play.
In my case I have a CYX_809III_RK3188, is a HDMI Stick for your TV and runs Android 4.4.2
If you try install on it the last Netflix version, you will see this message:

There is a problem parsing the package
To avoid it, you need to found a Netflix version compatible with your device. I used to search every versions of Netflix. In my case, the last version that works on my device is Netflix 3.11 Enjoy it!

How to upgrade networkx to developer version in Linux

Weight functions are only available on networkx development version.
To install it you need to do the following:

git clone
cd networkx
sudo python install

ERROR: Failure: ImportError (No module named coverage)
ImportError: No module named pandas

To fix it, install these libraries and re-run nesetest:

sudo pip install pandas coverage
Ran 3045 tests in 33.191s


If you run your python console you can ask for networkx version as follows:

Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import networkx
>>> print networkx.__version__


But, if you run your code it still be using version 1.1 Now you need to remove the previous version and re-install the last ve…

How to connect a2dp bluetooth headset on Ubuntu 16.04

The bluetooth stereo headset on Ubuntu has been in trouble for some time.
To solve it, I have read different techniques but in several you have to edit and configure files.
I found a quick and easy way to connect and enable the a2dp function (stereo) on your headset with just execute one file.

You can download it from the github project or directly:

Just execute it with python3 and select your mac address device that you want to connect.
If you use pavucontrol, you can see on configuration tab, that your device appears with a High Fidelity Playback (A2DP Sink) profile.
Enjoy it!

npm ERR! Failed at the node-sass@3.13.1 postinstall script 'node scripts/build.js'.

Deal with npm is a big headache.
I have npm 3.53 and node 8.0.0-pre
Today I has been fighting with run npm install and I had this error:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN You are using a pre-release version of node and things may not work as expected
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: iltorb@1.0.13 (node_modules/iltorb):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: iltorb@1.0.13 install: `node-gyp rebuild`
npm ERR! errno 1
npm ERR! node-sass@3.13.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-sass@3.13.1 postinstall scrip…

multicast join failed: No such device

If you try to generate multicast traffic with iperf, this message could probably appear, especially if you are using mininet:

multicast join failed: No such device 

To solve it, you need to create an entry in the route table for multicast traffic like this:

ip route add dev eth0

On the server side use:

iperf -s -u -B -i 1

On the client side use:

iperf -c -i -i 1 -l 100 -b 1k

Enjoy it!

fatal: Unable to find remote helper for 'https'

A common issue with git is when you try clone a project (nodejs in my case) appears this error:

git clone
Cloning into 'node'...
fatal: Unable to find remote helper for 'https'

I was reading different solutions, like replace https by git, but the errors is still here:

git clone git://
Cloning into 'node'...
fatal: unable to connect to[0:]: errno=Connection timed out

Other recurrent solution is to install openssl libraries for curl (to read https protocol):

sudo apt-get install libcurl4-openssl-dev

Now, you must install git again:

tar xvf git-2.12.0.tar.gz
cd git-2.12.0
make -j8
sudo make install

Enjoy it!

How to install go 1.8 on Ubuntu 16.04

If install golang in Ubuntu 16.04 throught synaptic, you will install version 1.6 and maybe you will see the following problems:

cannot find package "" in any of:
/usr/lib/go-1.6/src/ (from $GOROOT)
/src/ (from $GOPATH)
exit status 1
exit status 1

To avoid it, is better install it from the source:

sudo tar -zxvf go1.8.linux-amd64.tar.gz -C /usr/local/
mkdir ~/go
echo 'export GOROOT=/usr/local/go' >> ~/.bashrc
echo 'export GOPATH=$HOME/go' >> ~/.bashrc
echo 'export PATH=$PATH:$GOROOT/bin:$GOPATH/bin' >> ~/.bashrc
source ~/.bashrc

Enjoy it!

How to get the difference between the last two values in influxdb

If you are measuring traffic, probably your are writting OVS data as accumulative bytes.
This is an extract of my influxdb data

You can get the newest two values with the following sentence:

influx -execute "SELECT value FROM packets_in WHERE dp_name='s3' AND port_name='port1' ORDER BY time DESC LIMIT 2" -database=faucet -precision=rfc3339

name: packets_in
time                 value
----                 -----
2017-03-16T20:00:23Z 326
2017-03-16T20:00:13Z 302

If you want to get the difference between them (326-302), you need the lastest influxdb version (here a post about how to upgrade your current version).
With the DIFFERENCE command, you can do it:

influx -execute "SELECT DIFFERENCE(value) * -1 FROM packets_in WHERE dp_name='s3' AND port_name='port1' ORDER BY time DESC LIMIT 1" -database=faucet -precision=rfc3339

name: packets_in
time                 difference
----                 ----------
2017-03-16T20:00:13Z 24

Enjoy it!

How to upgrade Influxdb 0.10.0 to 1.2.2 in Ubuntu 16.04

First, you need to remove the old version:

sudo apt-get remove influxdb influxdb-client

Now, to install the newest version you can do it throught a .deb file or from the repositories:

From .deb file:

sudo dpkg -i influxdb_1.2.2_amd64.deb

From repositories:

curl -sL | apt-key add -
source /etc/lsb-release
echo "deb xenial stable" | tee -a /etc/apt/sources.list
apt-get update
apt-get install influxdb

In both cases the following message may appear:

Preparing to unpack .../influxdb_1.2.1-1_amd64.deb ...
Unpacking influxdb (1.2.1-1) over (0.10.0+dfsg1-1) ...
dpkg: error processing archive /var/cache/apt/archives/influxdb_1.2.1-1_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/influx', which is also in package influxdb-client 0.10.0+dfsg1-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
influxdb.service is not …

How to create a Unity icon for Pycharm

As every aplications, you can create a .desktop file to run it from your Desktop.
If you copy this .desktop file in ~/.local/share/applications, you can see it in Unity, but when you run Pycharm the icon that appears doesn't load.

To create an icon here, just open Pycharm and create it clicking on Tools > Create Desktop Entry...

Now, you could load Pycharm with an Unity icon.

Enjoy it!

How to run root python scripts on Pycharm

Mininet needs root privileges ti run. If you run a python mininet script on Pycharm you will see the following message:

*** Mininet must run as root.

To enable root privileges, you need create a new interpreter as follows:

sudo visudo -f /etc/sudoers.d/python Add the following information: <user> <host> = (root) NOPASSWD: <full path to python> For example: boettcher boettcher-server = (root) NOPASSWD: /usr/bin/python Create a script called, containing (with your correct full python path): #!/bin/bash sudo /usr/bin/python "$@" Be sure to make the script executable: chmod +x To change your actual interpreter for this new one, in PyCharm, go to File > Settings > Project Interpreter. Click the gear icon by the current Project Interpreter drop-down, and choose “More…”.

Then click the green plus icon to add a new interpreter (Add Local). Browse to and select it and set it as the interpreter for the project.

Now when y…

Automate mininet to run batch commands

If you prefer to use mininet console instead python API, maybe you will need automate the process to run batch commands.
With source command you can load a file with all commands to execute inside mininet, like this:

source init.cli

This is the content of init.cli:

py "Configuring network"
h1 ifconfig h1-eth0
h2 ifconfig h2-eth0
py "Current network:"
py "Adding switches to the controller"
sh ovs-vsctl set-controller s1 tcp:
sh ovs-vsctl set-controller s2 tcp:

Enjoy it!

How to run ping when STP is ready in a mininet topology

If you have a topology like a mesh or any other with redundant links, you must use Spanning tree protocol (STP) to avoid a while.
To run STP, you can use a controller app or setup your virtual switches to be compatible with STP.

To run as controller:

Run a STP controller app. In my case I use Ryu:
ryu-manager --ofp-tcp-listen-port=6633

To run as virtual switch (OVSSwitch):

You can modify your switch from your terminal (outside mininet) as follows:

ovs-vsctl set bridge s1 stp-enable=true

You can use the same sentence inside a python script like follows:

s1.cmd('ovs-vsctl set bridge s1 stp-enable=true')
Now, to avoid execute ping before STP is ready, you need to see the status port of your switch. You can use the following code to insert in your python script.

while(s1.cmdPrint('ovs-ofctl show s1 | grep -o FORWARD | head -n1') != "FORWARD\r\n"): time.sleep(3) # Avoid initial too long delaytime.sleep(2) info("Running ping\n"…

How to use proxychains to hide your ip address

If you want hide your ip address to emulate different users, a good option is proxychains.
To install it, you need following these steps:

sudo apt-get install tor
git clone
cd proxychains-ng 
make -j4
sudo make install
sudo make install-config
sudo service tor start

You can edit proxychains config file to add more proxies if you want:

vim /usr/local/etc/proxychains.conf

To validate if it's working, you can check out you ip address throught curl:

proxychains4 curl -s '' |grep "IP:" | grep -oE "[0-9\.]*"
[proxychains] config file found: /usr/local/etc/proxychains.conf
[proxychains] preloading /usr/local/lib/
[proxychains] DLL init: proxychains-ng 4.12
[proxychains] Strict chain  ...  ...  ...  OK

Enjoy it!

Full faucet.yaml file configuration

version: 2
        dp_id: 0x0000000000000001   # The id of the datapath to be controlled
        description: "Initial Test Faucet"    # Purely informational
        hardware: "Open_vSwitch"  # used to determine which valve implementation to use
                native_vlan: 100
                name: "port1"   # name for this port, used for logging/monitoring
                acl_in: 1
                description: "Port 1"    # informational
                #native_vlan: 100
                tagged_vlans: [100,2001,2002,2003]
                name: "port2"
                acl_in: 1
                description: "Port 2"
        description: "Test vlan" # informational
        name: "test_vlan"  # used for logging/monitoring
        max_hosts: 3 # Maxium of 3 hosts can go on this VLAN
        name: "trusted n…

Issues to run

A typicall issue when you run is the following:

sudo ryu-manager --ofp-tcp-listen-port=6633 /home/nboettcher/Downloads/faucet/src/ryu_faucet/org/onfsdn/faucet/

... in __init__ 
self.config_file, self.logname)
TypeError: 'NoneType' object is not iterable

To see the specific conflictive line in your config file (faucet.yaml), you need to check out the faucet log:

$ cat /var/log/ryu/faucet/faucet.log
faucet.config ERROR    Error in file /etc/ryu/faucet/faucet.yaml (while scanning for the next token
found character '\t' that cannot start any token
  in "/etc/ryu/faucet/faucet.yaml", line 15, column 1)

As you can see, yaml files can't use tabulation to ident the content. Replace tabs by spaces.
Don't forget delete empty lines at the end of file.

Enjoy it!

Do you have problems with Aliexpress sign in?

A common issue in Chrome (I don't know if it happends on Firefox or other browser), is that Aliexpress cookies has problems when you want to access to your account.

When you press Access now, the page reloads, but the identification section doesn't shows your name.
To fix it, a solution is clear all cookies, but you can delete only ali* cookies as follows:
Go to chrome://settings/

Filter by ali and click on Remove all shown. Now you can login again without problems Enjoy it!

How to geolocate a Wireless IP Camera (P2P) WIFICAM

Yesterday I read about how to access in a remote Wireless IP Camera (P2P) WIFICAM (this is the link
Fortunately, I had one to test it and validate the bug.

This camera has telnet, but I could never find the password.
If you try the bug, yo can replace telnet by a bash terminal, using and exploit in C or throught the webpage:

Now, when you try access to your camera throught telnet, you will have root access.

Cámara Wifi IP P2P permite acceso a telnet sin password gracias a vulnerabilidad en configuración FTP. — Nicolás Boettcher (@nicoboettcher) March 9, 2017 Also, if you exploit this vulnerability in a random camera, you could know where is it in the world, just with the wireless information.

With this information, you can search it in Wigle databases to get the latitude and longitude.
PyGLE is a wrapper for the WiGLE WiFi mapping API (…

Contiki 3.0 on XM1000

In other post, I installer contiki 3.x on xm1000.
Now, we going to install contiki 3.0 (the lastest version).
First, you need to dowload the lastest code from github:

git clone

Now we need to add xm1000 compatibility to our contiki.
Thanks to DMI  for the xm1000 patch. Without it, you will see the following error:

make: *** No rule to make target 'obj_xm1000/cc2420.o', needed by 'contiki-xm1000.a'.  Stop.

I upgrade his patch with an app to access to the xm1000 sensors.
Download it from

Now, extract it into contiki folder:

tar xzvf xm1000.tar.gz
cd xm1000

Go to the apps folder and execute an script that I create to automate the process:

cd $YOUR_CONTIKI_PATH/platform/xm1000/apps/sensors

Enjoy it!

Running Faucet and Gauge on localhost

In my post about how to configure mininet-ryu-faucet-gauge-influxdb I used faucet in a remote machine (as virtual machine).
Now, I going to explain how to install and configure it in localhost.
First, download it form github:

git clone
cd faucet
sudo python install

Probably, you will see this message:

build/temp.linux-x86_64-2.7/check_libyaml.c:2:18: fatal error: yaml.h: No such file or directory

To avoid it, you need to install yaml:

apt-get install libyaml-dev

If you try to install it again you will see this message:

ERROR:root:Error parsing
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pbr/", line 111, in pbr
    attrs = util.cfg_to_args(path, dist.script_args)
  File "/usr/local/lib/python2.7/dist-packages/pbr/", line 248, in cfg_to_args
    kwargs = setup_cfg_to_setup_kwargs(config, script_args)
  File "/usr/local/lib/python2.7/dist-packages/pbr/", line 382, in…

How to fix a pip3 failed installation

In my case, I was trying to install bluepy from pip3 with the following command:

pip3 install bluepy

But an error appears:

fatal error: glib.h: No such file or directory\n #include <glib.h>\n                  ^\ncompilation terminated.\nMakefile:28: recipe for target 'bluepy-helper' failed\nmake: *** [bluepy-helper] Error 1\nmake: Leaving directory '/tmp/pip-build-djwz1adc/bluepy/bluepy'\n"

Cleaning up...
Command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-djwz1adc/bluepy/';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-p2v5kjik-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-djwz1adc/bluepy
Storing debug log for failure in /root/.pip/pip.log

Usually, we see the outpu after Cleaning up...,…

Fix tiny font on google chrome tabs and boomarks

After a chrome upgrade, maybe you could see a modification on your tabs font size.

To fix it, install the lastest version from this repository, with the following commands:

wget -q -O - | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install google-chrome-beta

As you can see, the font recover it's original size
Enjoy it!