Archive for December, 2008
android on openmoko

new compiled android kernel/filesystem available for openmoko:

http://forum.koolu.org/files/uImage-android-patched_bc2caff9cdef8a16.bin

http://forum.koolu.org/files/androidfs-koolu-1_0.jffs2

tel domain from telnic, another way to build social networking portal

telnic has a different approach in the hysteria of social networking sites. They try to bullshit in a different way their (potential) customers all around the world, so that they can suck out their valuable data drop by drop. Well the first drop is the public phone number. And then the private phone number. And the they will invent new fields they will call them protected, where they will tell you if you already store your phone number, why don’t you store also your credit card number. Then you start to develop your social networking by marking certain people that are known to you. Then if you know so many people, you have to do something in this damm’ virtual world. Then they will propose you to write messages, write blogs, and le voila… that is the new social networking… I wonder what will be the colour of googleface.. I mean of the big guys from google… Well they will take care to offer enough money in time… and suck telnic.

download videos on linux from youtube

There is an alternative to the method I described earlier to find out the links to videos hidden on the tube family portals. The method I described needs admin rights, but you can get the same results using another approach.

To be continued…

download your colourful tube videos on linux

the web is full with different funny virus-full programs that promise you to download videos from different tube sites. I will present you a quite universal way of doing it on unix (linux) machines.

Requisites:

  • tshark
  • sed
  • grep
  • wget

probably you will find sed, grep and wget already installed on your system. For example on Ubuntu you can issue:

user>sudo apt-get install tshark

or on fedora/redhat

root> yum install tshark

If this does not work on your system, go to their website and download the sources.

Tshark provides a super-set of functionalities of that provided by tcpdump. Both tshark and tcpdump are so called network sniffer tools, with their help you can investigate what is happening on your local network. You can output the content of tcp/ip packets in different formats (ps, xml, text). You can select if you want just certain field of certain type of packets. The following command selects the http packets that have destination port 80:

sudo tshark -i eth0  -d tcp.port==80,http

this will contain too much from what we do not want, and will not provide what we want.

sudo tshark -i eth0  -d tcp.port==80,http -T fields -ehttp.host -e http.request.uri

the form above introduces two new flags, -T and -e. The -T specifies the output types. The type field requires field specifiers that are specified with the -e flags. So the form above selects the fields destination host and the uri. This form will provide however lines in form of

www.blahblah.moc        /files/noproblem/file.cgi?lala=cucu&bebe=haha

but also a lot of empty uris, that we are not interested in. The empty uris can be eliminated by piping with the first grep, and the second eliminates the tab (spaces) between the two displayed fields.

sudo tshark -i eth0  -d tcp.port==80,http -T fields -ehttp.host -e http.request.uri | grep -e “[a-zA-Z0-0.\-\/_]” | sed -e ’s/\t//’

this needs a last fix, we need to escape the & characters.

sudo tshark -i eth0  -d tcp.port==80,http -T fields -ehttp.host -e http.request.uri | grep -e “[a-zA-Z0-0.\-\/_]” | sed -e ’s/\t//’ | sed -e ’s/\&/\\&/g’

the latest version will show you all the requests  your browser issues. Now depending on the tube tube site you are using, you have to observe what can be the link to the video. In most of the cases the link contains the word “video” so a last grep with “video” will reduce the number of links suggested.

What you also can do, redirect the output of the latest form to a fail, and on another terminal issue:

tail -f links | xargs -i wget {}

soci c++ on ubuntu 8.10

If you try to build soci-3.0.0 on ubuntu 8.10 you might get some annoying error. I list below the errors and their fixes:

common.h:24: error: ‘std::tm’ has not been declared

fix: add to common.h:

#include <ctime>

errors in file session.cpp:

session.cpp:134: error: ‘strtol’ is not a member of ‘std’

error: ‘INT_MAX’ was not declared in this scope

fix: add to session.cpp

#include <cstdlib>

#include <climits>

in file standard-into-type.cpp:

standard-into-type.cpp:84: error: ‘strncpy’ is not a member of ‘std’

fix:add to standard-into-type.cpp

#include <cstring>

Links related to the soci library:

  • http://soci.sourceforge.net/
  • http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Relational_Database_Access
  • http://www.ddj.com/cpp/188700800?pgno=3
  • http://erdani.org/publications/traits.html