Colored debug macro

Whenever you start developing on C++, the first thing you think is that it is an ugly, boring and archaic environment. After a while you realize the power and wonders that you can achieve with this programming language, and why it is still so widespread.

Today we are going to see how to generate some simple macros, which we can include in our most typical libraries, to be able to show the colored debug output, and thus differentiate between each output of our program in a more simple way.

Read more...

Compiling Aztrino

Aztrino

Aztrino is one of the firmwares for the Azbox Me and MiniMe decoders based on the Neutrino platform. In order to develop on this environment, we first have to install some packages and start the configuration.

To begin, we prepare the environment, for example, from Ubuntu 12.04, at least you will have to run:

apt-get install cmake gperf

git clone git://gitorious.org/neutrino-hd/aztrino-buildsystem-cs.git

cd buildsystem-cs/

mkdir download

We edit the configuration file, executing

Read more...

Create a web browser in 10 lines of code

One of the advantages of Python code is the large number of libraries that are available, in this case we are going to use QtWebKit, with which we can easily create a browser or embed it within our application. We edit a file, for example pybrowser.py with the following content

#!/usr/bin/env python

import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.QtWebKit import *

app = QApplication(sys.argv)

web = QWebView()
web.load(QUrl("http://www.thempra.net"))
web.show()

sys.exit(app.exec_())
Y ya solo nos queda lanzar nuestro mini-navegador:
python pybrowser.py
A partir de aquí se ha de trabajar con los botones, barra de navegación , ......
Read more...

Reading brain waves (EEG)

Next Saturday, August 18, I will be at MUNCYT in La Coruña, with a talk on how to take brain wave readings with low-cost Electroencephalograms (EEG).  I will present the Theeg project and then Jose Angel Mateo will give a presentation on the DotNetClub.

Agenda

10:00-10:15 Presentation of the event and speakers. 10:15-11:00 ‘Theeg: Reading other people’s minds’ Theoretical session. 11:00-11:45 ‘Theeg: Reading other people’s minds’ Practical session. 11:45-12:00 Coffee break

12:00-12:45 ‘IEEE-UNED Microsoft DotNet Club’. 12:45-13:00 Farewell and closing.

Read more...

Development environment for Azbox Me with Enigma2

Given the complexity and library dependencies that we are going to discuss, I recommend that the installation be carried out on a virtual machine, in this case we will use Ubuntu Server 12.04 LTS .

1. Preparing in environment

Once we have created the virtual machine (allocate about 100 GB of space, not all of them will be used, but it is better to have plenty of space), we proceed to install the libraries we need:

Read more...

Add new virtual disk in XEN \"hot\

It is usual that after several years the space forecasts in a virtual machine are exceeded, in many cases because the project for which it has been destined is being a success and requires a larger storage size. What in principle may be a joy, also involves extra effort, since if the machine is in production, and we have more users, it means that we cannot turn off the machine for an hour to perform maintenance tasks. Thanks to XEN we can change the virtual hard disk without having excessive problems

Read more...

Session theft in HTTPS

Yesterday we had a discussion in Entornos about security when accessing your Gmail account, or anyone with HTTPS, alleging that any web application protected by encryption SSL is safe, and impossible to breach, especially with new double authentication. Nothing could be further from the truth.

An interesting tool is floating around the net called “Surf Jack”, which demonstrates a security flaw when accessing from unsecured locations. The proof-of-concept tool allows testers to steal session cookies on HTTP and HTTPS sites that do not set the secure flag. You can download the tool from here and a document with more details on the topic.

Read more...

SSHFS, mounting directories via ssh

Secure SHell FileSystem (SSHFS) is a file system for Linux (and other operating systems with a FUSE implementation, such as Mac OS X), capable of displaying files on a remote system as if it were just another folder on your computer using secure access.

In this way, a user can work on a series of files on another computer as if it were in local mode. For its operation, only the installation of an SSH server is necessary on the remote machine. Once it is perfectly configured on the local machine, we proceed to the SSHFS installation:

Read more...

Compile from *.po to *.mo and vice versa

In a world as globalized as the one we live in, the development of any application must involve translation into as many languages ​​as possible. To do this, we are provided with various tools and standardized formats that simplify the task of working with these languages.

.PO files (Portable Object)

It is the original file of the translation, of which there is one for each language, it has a specific template format, divided into two parts:

Read more...

Change UID of a user

It may be the case that, for example, in a server migration, you have to concatenate machines, which implies that the users must continue to exist on both servers, but this time on a single machine. This implies that we must change the UID and GID of each of them (at least on one machine) to avoid major problems.

One of the initial trends is to change the identifiers directly in the /etc/passwd files or in the /etc/group, a serious mistake, since for example the files in which said user has permission will be lost, leaving the previous identifier.

Read more...

Backtrack 5 course, auditing the world

omhe_Logo

Backtrack is a LiveCD distribution, as well as an installable one, that compiles a complete range of utilities to audit various systems. Although it is well known for being prepared for auditing Wi-Fi networks, it is more interesting to review the rest of the tools it offers us to work with all technologies. Taking advantage of the fact that Backtrack 5 R1 has just been published, I present to you the Mexican Organization of Ethical Hackers that has published a simple course to get started in understanding this tool, very basic, but useful for those who want to enter this world.

Read more...

inSSIDer, wifi scanner

To do good as well as to do evil, a Wi-Fi network scanner is almost essential, and although the shell attracts a lot, seeing moving colors has attracted us all since childhood.

inSSIDer is a beautiful, simple scanner, although with a technical visualization, and above all multiplatform.

When setting up a Wi-Fi network, whether your home or a more extensive one, it is advisable to view the frequency spectrum that covers said area. And since today our eyes are not capable of switching to Wi-Fi mode, with this program we can make the task easier in a graphic and simple way.

Read more...

Auditfi 1.0, auditing your Wi-Fi network from Android

A few weeks ago, my colleague Craswer and I bet how easy it would be to implement the security flaw in the Neikokz generators, on the Jazztel and Telefonica or Movistar routers, and in less than an hour, we obtained the result that we present to you. Now, by popular request we have decided to upload it to the Market.

Although there are several programs to audit the security of your router, here we leave you the Auditfi (Wifi Audit**) which is not only prettier, “the best”, but we accept your feedback to improve it based on your needs.

Read more...

Office 2007 under Linux (wine)

Although Libreoffice is receiving a big push lately from both Oracle and IBM with the transfer of Symphony, it must be recognized that the ribbons of Ms Office 2007 continue to be of great usability, along with other correction features, and obviously compatibility with docx. Therefore, on certain occasions its use is recommended.

In this case we are going to see how to run it from Debian without excessive problems. First we update to the latest version of Wine

Read more...

Send mail from shell script

There are thousands of ways to send an email from the Linux shell, but in this case we are going to explain how to do it using msmtp, something more complex than other ways, but useful in certain situations.

To do this we edit the msmtp file

#nano ~/.msmtprc

We are going to configure a GMail account, although it is also possible to do this with our SMTP server. We copy the following text

Read more...

Android Privilege Escalation Vulnerability

An escalation of privileges is when a user with limited permissions is able, through some security flaw, to elevate their role until they have more capabilities in the execution of their code, in this case this case reaches the root superuser.

Of the two possible codes, the second accompanies some simple instructions on how to “do evil” to an Android device, from this moment the device is compromised. Imagine this, for example, in an application of dubious origin that you install from the Market, it could obtain and send all your information. Or looking on the bright side, a more open gap to be able to root all versions of Android

Read more...

Backup of XEN machines with LVM

When we find ourselves in a situation of servers in production, it is advisable from time to time to perform a complete backup of the machine on certain specific servers, or we simply want to move said machine to another system but we cannot do it in a traditional way. Next we are going to see a technique in which it is not necessary to turn off the virtual machine, and continue providing service without noticing excessive deterioration of the service, or its crash.

Read more...

Released Meego 1.1

It is now official, and Meego 1.1 can be downloaded, with the expected new features for a wide variety of platforms, running on x86 and ARM, and renewed support for Multitouch devices. It seems that the project, far from dying, is beginning to have good movement, they are already preparing the next version 1.2 for next April. And if you happen to be near Dublin from the 15th-17th of this month of November, you will be able to attend the http://conference2010.meego.com/

Read more...

PgAgent, installation and configuration

PgAgent, in plain words, is like a “cron” but specifically for Postgres databases and a much more powerful level, a great help for carrying out scheduled jobs.

To install pgagent, for example from Debian, just run: apt-get install pgagent

Once on the computer we proceed to the real task, its configuration. First we have to make sure that we have the plpgsql language installed:

CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler VALIDATOR plpgsql_validator;

Read more...

Resize Xen partition with LVM

It is not strange that when sizing a virtual machine we have certain project specifications which change over time, and the need to increase disk space may be essential.

At first glance it may seem like a tedious task and you may start to tremble at the possible loss of data, but after a good prayer, a strong coffee and a win these fears disappear, leaving behind some simple steps described below.

Read more...

Authenticate via SSH without password

Recovering old and very useful tutorials for those of us who play with servers, we are going to review how to create SSH keys so as not to have to write the password when authenticating against the server.

First we must be clear about what we are going to do, since applying this configuration would imply that a malicious user with access to your console could access the remote machine. It is not advisable to do this with the root user, but rather with one with few privileges to avoid scares.

Read more...

Android 2.2 (Froyo) for EEEpc and others...

I was somewhat curious this morning about the Android code for x86 platforms, and without a doubt I have had no better option than to compile it myself to see exactly what type of interface and applications I was getting based on what exists in the official repository.

Below I leave you the simple steps to carry out this action, the result is a somewhat slow operating system, but it can probably be solved by adjusting some parameters, I will inform you about the issue.

Read more...

Set up a proxy with SSH and SOCK5

    Since several colleagues have told me about it lately, I have decided to expand an old post, and leave, as a reminder, this post on how to leave via an internet connection other than the one you are using on your computer.

Basically what we are going to do is the following:

OurPC ==> (Internet Provider X) ==> SSH SERVER ==> (Internet Provider Y)

The idea is, if for example we have a blocked connection, or we want to load a website from the office as if we were a client, or simply change IP. What we must do is generate a tunnel which takes us directly to the exit point and from local connect via proxy to this tunnel.

Read more...

Guosthex 1.0, new firmware for the Woxter i-Cube 35 X-div Xp Rec

Since Woxter has decided to leave users who bought this multimedia drive without updates, I have decided to get to work and install the update myself.

1. Device Description

First we have to do an analysis at the hardware level to know what we are dealing with:

Once disassembled we can see that the board is an HMR-700 and the front controls (IR, LCD, buttons, …) are from an HMR-350, these multimedia disks are usually manufactured by a company and sold to others to market it, such as Ellion, O2Media, FanFan, Woxter, …..

Read more...

Programming in Haskell

  Haskell is a general-purpose, purely functional language. And although it is not intended to develop a banking Core in it, it can serve as a means of mental training, or a mere initiative to expand knowledge. For others it may be valid exclusively for passing a certain university subject.

 The most interesting features of Haskell include support for recursive data types and functions, lists, tuples, guards, and pattern matching. The combination of them can result in some almost trivial functions whose version in imperative languages ​​can be extremely tedious to program.

Read more...

[Tip/Trick] Unconfigured keyboard in Gnome

   When dealing with unstable or experimental distributions, in certain updates it is possible that the keyboard is not configured correctly, losing the possibility of including signs entered using “Alt Gr” or even accent marks. It may happen that when trying to configure it from “gnome-keyboard-properties” we get the feeling that it doesn’t pay attention to us.

   The problem lies in a bad initial configuration of the file /etc/X11/xorg.conf in the InputDevice section, since we did not assign the variant, the correct configuration would be:

Read more...

13 km wifi link

What better thing can you do on a Saturday morning than to try the new antenna that has arrived, it is a 24 db eRize. The project has been proposed to link a town 12.9 km away in a straight line with the UCLM Wi-Fi network, obviously with a stable connection. A few years ago we already achieved something similar, but against a high-rise building.

We left early for the specific place and as the weather forecast indicated, fog made vision extremely difficult, to the point that it was more of a trial, error and intuition type to achieve the objective.

Read more...

SSH tunnels through a firewall

Sometimes it is necessary for us to bypass a firewall to perform certain tasks. Usually because we have left work pending and we intend to get home and continue with the task. Unfortunately, today not all companies agree with teleworking, nor do they have their systems prepared for it, this means that we have to find tricks to access our machine.

First, a hole must be opened to establish communications from a PC inside the firewall to another PC, with an ssh server,

Read more...