Skip to main content

Posts

Showing posts from 2016

Command-line password generator for Linux

Linux has its own cryptographic generator which can easily be harnessed by the common user to generate extremely strong passwords. This password generator can be found at /dev/random. /dev/random generates pseudorandom numbers based on the available entropy of the system (see wiki page ). A derivate of /dev/random called /dev/urandom does the same thing but it is more accessible while being slightly (theoretically) less secure. So what stops us from grabbing outout from /dev/urandom using cat ? An output of the content of /dev/urandom will demonstrate that it is practically gibberish with very few usable random characters. The output of cat / dev / urandom should convince the user.  However, it is possible to trim out the unwanted characters and only keep alphabets, numbers, and special characters with a simple filtering by the tr command. cat / dev / urandom | head - c 10 | tr - dc "A-Za-z0-9_!" This command will produce the desired output but it w

Turning normal HDTV into Smart HDTV

One word ChromeCast. That will do it. There is no need to pay a premium for a Smart TV when Chromecast can outperform any of them for a fraction of the cost. Also, there are reports of some Smart TVs stealing user browsing behavior for commercial purposes. The worst was the claim that some TVs secretly listen to the conversation of the people in the room. I cannot verify the truthfulness of these reports but all these are viable possibilities if a malicious app has been secretly installed in the Smart TV. So I would rather play it safe and use Chromecast (since Google has all my data anyways). So we need to buy the Chromecast device and install the Chromecast app on the phone and that will transform the non-smart TV into an entertainment hub. However, just installing the Chromecast app on the phone does not satisfy a power user. Therefore, I chose to explore the possibilities of "Home entertainment". 1. Streaming movies from phone - Install Chromecast app. This is simple a

Setting up Crafty chess engine on Linux/Ubuntu

Crafty installation is pretty simple. The command sudo apt-get install crafty will install crafty at /usr/games/crafty and the book files at /usr/share/crafty/books.bin. If the book files are not installed they can be manually installed by sudo apt-get install crafty-books-medtosmall Sometimes the book are not automatically installed in the home folder and it will result in the following error when crafty is run from the command line. Machine is NUMA, 1 nodes ( 6 cpus/node ) unable to open book file [ ./book.bin ] . book is disabled unable to open book file [ ./books.bin ] . ERROR, unable to open game history file, exiting This implies that we need to import the book.bin and books.bin which contain a vast array of opening moves into the local ~/.crafty directory. For that, we need to run the setup_crafty.sh. However, it needs to be made executable by the normal user first. As root go to the directory /usr/share/doc/crafty and do the following, su cd /usr/s