Firefox Flicks - Watch and enjoy

Firefox has evolved from Mozilla to be a robust, secure and standards compliant, cross platform free web browser that it is today. And the ever increasing market share of this popular browser is proof enough that it is well received by people who are introduced to it. But what it lacked all along was a good marketing campaign which can be used to make more people aware of its advantages over competition.

Enter firefoxflicks.com. The aim of this project is to create a 30 second ad that introduces firefox to the millions of main stream web users. Recently they ran a competition which invited people to submit a 30 second ad promoting firefox web browser and the best among the submissions were to win a prize.

And the results are out. The winners of the competition are DareDevil, Wheee, Fox Fever, This is Hot and Give me the soap. And my favorites among these are 'This is Hot' for the superior animation and the message it conveys and 'Wheee' for plain humor.


Video: This is hot



Video: Wheee


By the way if you haven't noticed yet, this site is best viewed in firefox :).

iptraf - A reliable network monitoring software for GNU/Linux

Linux has no dearth in utilities which aid a user in getting a snapshot of the network traffic which course through ones machine especially when one is connected to the internet. Some of them which come to my mind are the ubiquitous 'tcpdump' and 'ethereal'. tcpdump is installed by default by any GNU/Linux distribution. But many others need to be specifically downloaded and installed by the user in order to use them.

One such software which aids the user in keeping an eye on the exchange of IP packets to and from ones machine is IPTraf. This is a curses based menu driven utility which intercepts packets on the network and gives out information about it. Usually, such network monitoring software are run on gateways where the computer acts as a router to the outside world. But it can also be used by a home user who is connected to the net to monitor the going ons in ones machine.

To start using IPTraf, one has to first install it; which on a debian system is as simple as executing the command:
# apt-get install iptraf
Once the software is installed, one can start it to monitor the network. Unfortunately, you should have root privileges to run the software. In ubuntu, it means inserting the word 'sudo' before the command as follows:
$ sudo iptraf
Once the above command is executed, the user is shown a curses based menu where one can choose to start monitoring either the local interface or the traffic through any of the network cards installed on ones machine.

Fig: iptraf Configuration Menu

I found this network monitoring software really useful and an eye opener at the same time. For instance, I have disabled almost all the services on my machine. But I found that within just 15 minutes of getting online, IPTraf logged at least 6 attempts at connecting to my machine via SSH. Of course they could have been the result of a probe by someone using nmap to see which all ports were open on my machine. So much for obscurity while on the net.

Also this easy to use software has additional options such as enabling reverse DNS lookup in the options menu in which case, the logs will contain the DNS name instead of the IP address where ever possible and the service name instead of the port number. For example, when some traffic is generated when I connect to the yahoo.com website from my web browser, iptraf will show it as yahoo.com:www which denotes that I am connecting to the port 80 of yahoo website. It will also give a count of the number of packets transferred to and from the yahoo web server to my machine all in real time.

Same is the case with when someone tries to probe ones machine. Each and every IP packet is intercepted, the IP information of each packet decoded and the result displayed in real time. There is option to save the logs to a file which by default resides in the /var/log/iptraf directory. Even though I found it most useful for monitoring my ethernet traffic, that is not all that this nifty tool monitors. It can additionally monitor ppp, loopback, SLIP, FDDI, and ISDN interfaces.

Fig: Iptraf monitoring the eth0 device on my machine

Some of the information of the intercepted packets that is decoded by iptraf are as follows:
  • Source address and port
  • Destination address and port
  • Packet count
  • Byte count
  • Packet size
  • Window count and
  • Flag status
I would like to dwell a bit on the flag status shown by iptraf. Each TCP packet that is intercepted is associated one or more flags which convey some information like which side had initiated the connection, when the connection is closed and so on. The flags are as follows :
  • S - A SYN (or synchronisation) is taking place in preparation for connection establishment. If only an S--- is present, then the source is trying to establish a connection. But if there is an S-A- then this is an acknowledgement of a previous connection request.
  • A - Acknowledgement of a previously received packet
  • P - A request to push all the data to the top of the receiving queue.
  • U - The packet contains urgent data
  • RESET - The source machine indicated in this direction reset the entire connection.
  • DONE - The connection is done sending data in this direction and has sent a FIN (finished) packet but has not yet been acknowledged by the other host.
  • CLOSED - The FIN has been acknowledged by the other host.
  • - - A dash indicates the flag is not set.
So if I see any unusual SYN activity (S---) , then I can fairy assume that my machine is under a SYN attack.

IPTraf can display a statistical breakdown of the network packets sorted by the packet size or according to the TCP/UDP port which gives a fair idea of the network traffic to and from ones machine.

Fig: Statistical breakdown of network packets

Iptraf also supports a rich set of command line options which makes it ideal for use from within a script. True, you have an even powerful network monitor in ethereal but in my opinion, iptraf provides a right balance of functionality and simplicity which makes it an ideal tool for home users who want to monitor their network.

Book Review: Beginning PHP and MySQL 5 from Novice to Professional, 2nd Edition

PHP and MySQL use is so prevalent that now-a-days it is hard to miss seeing a website on the net which has been built using these technologies. And it is not a mere coincidence that most of the PHP/MySQL websites are hosted on Linux based servers. The beauty of PHP is in its open nature and the rich set of libraries and modules which imparts a lot of power and flexibility to the programmer. Similarly MySQL is a free database which is ideal for use as a backend for any website. And not surprisingly there are a plethora of books in the market which explains these two topics. One such book is "Beginning PHP and MySQL 5 from Novice to Professional" authored by W.Jason Gilmore and published by APress.

Spread over 860 pages and divided into a whooping 37 chapters, this book covers the PHP Language and MySQL database in detail. As the name indicates, the book endeavors to hand hold a newbie in the various aspects of PHP programming like the language constructs and progressively brings him to the level of a professional. The first 21 chapters of the book solely concentrates on PHP where the author explains with the aid of examples how to write good programs in PHP.

The author starts the narration by giving a brief history of PHP and then moves on to explain all the syntax constructs of this language in great detail. Arrays, functions and classes have each been provided separate chapters of their own. Usually I have found many books related to programming jumping straight into describing the language syntax and about writing code. But this book has a dedicated chapter each covering how to setup and configure PHP and MySQL on ones machine irrespective of the OS being used which breathes some fresh air to this subject. PHP language has a very good similarity with C/C++ at-least in the syntax. And in the sixth chapter, the author explains the Object Oriented Concepts like object cloning, inheritance and polymorphism of this language with clarity.

The maturity of any programming language is gauged by the type of traps that it has developed to check the errors and exceptions that might be generated dynamically when a program is run. PHP has a rich set of features for handling errors. Earlier versions of PHP already took care of notifying errors through configuration directives and support for logging. But one thing this robust language lacked was support for exception handling. And from PHP ver 5.0 onwards, this feature has also been included in it. The 8th chapter in this book titled Errors and Exception Handling explains all these important concepts in detail. The fact that the author has provided snippets of code to illustrate each concept that is explained goes a long way in understanding this topic.

Another of PHPs strengths is in its support of a rich set of regular expressions and string manipulation functions. Using regular expressions, one can match just about any string or a sub-set of it and even do manipulations to the matched string on the fly. The string matching functions form the backbone of many user input validations. In the 9th chapter titled "String and Regular Expressions", the author explains with the aid of code how to use the rich set of string manipulation functions available in PHP to get the desired results.

The 10th chapter dwells completely on working with files and operating systems where the author explains in his inimitable style different ways of reading from and writing to files. All the frequently used file manipulation functions are explained in this chapter with the aid of examples.

The first 12 chapters of the book concentrates on explaining the PHP language to the readers. In the next 4 chapters, the author moves into practical aspects like explaining how to mix PHP with HTML elements, user authentication , handling file uploads, sending and receiving email using PHP code and so on. I found the section where the author explains how to build specialized programs such as a port scanner, subnet converter and bandwidth tester all with the aid of PHP code really fascinating. The author introduces the reader to some of the MySQL concepts in this part of the book like connecting to a database and reading data from database but the more detailed aspects of database manipulation are left for later chapters which deals with MySQL in more depth.

The 21st chapter titled Secure PHP programming throws light on topics related to enhancing security while coding in PHP such as enabling safe mode for people who run PHP in a shared-server environment, PHP's encryption capabilities, securely configuring PHP via its configuration parameters and so on.

From the 22nd chapter onwards, the book takes an all together different turn and moves into explaining the database concepts which plays an important part in any dynamically generated website. More specifically, the succeeding chapters concentrate on explaining the configuration and use of MySQL 5.0 and how one can use PHP to interact with the MySQL database. The chapter titled Introducing PDO throws light on the abstraction layer used between PHP and MySQL. I especially liked the 26th chapter where the author lists the different MySQL clients which are available to the user like mysql, mysqladmin, mysqlshow and so on. In fact, each and every tool which comes bundled with the mysql server is explained thoroughly with the aid of examples. But that is not all, this chapter also explains how to configure a mysql database using third party clients like PHPMyAdmin, MySQL Query Browser, MySQL Administrator and Navicat. In the section on securing MySQL, the author goes into the finer nuances of the topic. For example, with the aid of commands, the author explains how to make sure that the user connects with the database over secure sockets layer (SSL) or ways of encrypting the MySQL database traffic which is an eye opener.

But I would say the 29th chapter titled PHP's MySQL Extension is the most important chapter in the entire book just because it is in this chapter that the author explains in detail the variety of ways in which one can connect to MySQL database and retrieve or manipulate the data using PHP code.

In the 30th chapter titled PHP's MySQLi Extension, one gets to know how to use the enhanced MySQLi extension to connect to the database. The MySQLi extension contains more enhancements over its predecessor in that it is object oriented, supports prepared statements, provides transactional support, has better debugging capabilities among other things. But the down side as the author puts it is that it requires PHP 5.0 for it to work.

The last six chapters deal with special features of MySQL and how one can write PHP code to use those features. The features like stored routines, MySQL triggers and Views have been provided with a dedicated chapter of their own. And yes, from MySQL ver 5.0, support for views have also been incorporated in the database. And the fact that this book covers these new topics in detail makes this a truly useful book not only for budding programmers but also for the gurus among us.

About the author
W.Jason Gilmore has developed countless PHP and MySQL applications over the past seven years, and has dozens of articles to his credit on this and other topics pertinent to Internet application development. He has had articles featured in, among others, Linux Magazine and Developer.com, and adopted for use within United Nations and Ford Foundation educational programs. Jason is the author of three books, including most recently the best-selling Beginning PHP and MySQL: From Novice to Professional, and, with coauthor Robert Treat, Beginning PHP and PostgreSQL 8: From Novice to Professional. These days Jason splits his time between running Apress’s Open Source program, experimenting with spatially enabled Web applications, and starting more home remodeling projects than he could possibly complete.

Book Specifications
Name : Beginning PHP and MySQL 5 from Novice to Professional - 2nd Edition
ISBN No: 1-59059-552-1
Author : W.Jason Gilmore
Publisher : APress
No. of pages : 860
Cover Price : $44.99 (US)
Rating : Excellent

I really liked the layout of the book. Each section is accompanied by PHP code snippet which shows how it is done. Just because one gets two books at the price of one does not mean that the book is short on detail. In fact the opposite is true and the 860 pages contain all that is needed for coming upto date with the latest version of PHP and MySQL. Of course the inclusion of a couple of pages giving a complete project such as a shopping cart application at the end of the book would have imparted a nice touch especially since this book is targeted mainly at beginners. But that is a minor detail and I guess there are limits to which a books of even this size can cram information. All in all an informative book which gives good value for money.

Mind Map of Linux - Version 2

A few days back, I had posted a mind map of Linux distributions on this blog. And I received a flood of suggestions, criticisms and ideas. And guess what ? I have included (almost) all the ideas and suggestions made and have seriously taken into consideration the criticisms as well. The end result is this updated mind map of GNU/Linux with even more Linux distributions included and some color coding thrown in as well. But the challenge was in making the mind map retain its clarity even after all these changes. At the same time, I also wanted to restrict the size of the resultant image. And I think I have succeeded to a certain extent in this endeavor.

Fig: Mind Map of GNU/Linux distributions (Ver 2). Click on the image.

Suggestions and Ideas I have incorporated ...
  • More Linux distributions added
  • A separate section for multi-lingual Linux distributions
  • Color coding included on a small scale
  • Rectified some mistakes pointed out earlier.
  • The map now has a pure white background. So is much more clear.
And those I have not included ...
  • I have left out a couple of Linux distributions, especially those which are historically significant but which are not under active development like SLS, erstwhile Red Hat, Yggdrasil and so on. This is because I felt the mind map should mirror the state of current Linux distributions rather than be a historical time line of them.
  • Secondly, including these will also make the map more complex and I wanted to retain the simplicity of the mind map. And excluding such historically significant but redundant distributions helped in achieving this.
Hopefully, I will be able to add more Linux distributions as and when I get more inputs and ideas.
The credit for this updated mind map goes to all the readers of this blog who took the time to give suggestions, ideas and point out the mistakes on the previous map. Kudos to you all :) .

Update: You may download the high resolution PNG format of the mind map file here (File size: 206 KB).

Related Reads:
A complete concise history of GNU/Linux
My indomitable thoughts on GNU, Linux, Open Source, Java and free cats and dogs

 
 
 
 
Copyright © Sun solaris admin