Advanced Linux Programming Resources, code samples and Free Book

March 7, 2007

Link to CodeSourcery“As Linux becomes a more mainstream player in the internet infrastructure market, there is a tremendous need for lucid programming texts that also convey some of the philosophy behind the Linux and GNU movements. This book does an incredible job of covering all that. I think it will be a standard against which other introductory programming texts for Linux (and with all due respect to Richard Stevens, possibly UNIX as well) are measured.” — Adam Goodman, Publisher, Linux Magazine

From the Back Cover

Advanced Linux Programming is intended for the programmer already familiar with the C programming language. Authors Alex Samuel, Jeffrey Oldham, and Mark Mitchell of CodeSourcery, LLC take a tutorial approach and teach the most important concepts and power features of the GNU/Linux system in application programs.

If you’re a developer already experienced with programming for the GNU/Linux system, are experienced with another UNIX-like system and are interested in developing GNU/Linux software, or want to make the transition for a non-UNIX environment and are already familiar with the general principles of writing good software, this book is for you. In addition, you will find that this book is equally applicable to C and C++ programming. Even those progamming in other languages will find this book useful since the C language APIs and conventions are the lingua franca of GNU/Linux.

Download Advanced Linux Programming

Download the full text of the book as PDF files .

The book is published under the Open Publication License, Version 1.0. Please consult the OPL for conditions on redistributing or modifying the book.

Download Code Listings

Download the code listings in this book as a gzipped tar file. Extract the code samples with this GNU/Linux command:

$ tar zxf ALP-listings.tar.gz

If you’re having trouble expanding the gzipped tar file, your web browser may be uncompressing it automatically during the download. If your browser downloads this file as ALP-listings.tar, you have an uncompressed tar file, so omit the z option when expanding it:

$ tar xf ALP-listings.tar

The code samples in this book are covered by version 2 of the GNU General Public License. Please consult the GPL for conditions on using, modifying, and redistributing the code in this book.

Browse Code Listings

You may also browse the code listings on-line.

==========

Resources for Advanced Linux Programming

Here are some places to visit on the Internet to learn more about programming for the GNU/Linux system.

[Read more]

If you liked this article, click here to buy me a beer!

Dear visitor, thanks for dropping by. If you enjoyed reading this post, you may want to subscribe to my RSS feed. It could could win you some great prizes this month. Thanks for visiting!

Ultimate list of free Software for students

December 25, 2006

Free software list for college studentsThe 2007.01 release of Software for Starving Students is now available for download at Softwarefor.org.

Software for Starving Students is a free collection of programs organized for students (but available to anyone). We’ve gathered a list of best-in-class programs onto one CD (one disc for OS X, one for Windows), including a fully-featured office suite, a cutting-edge web browser, multi-media packages, academic tools, utilities and more.

This list provides you access to high quality software, free of charge. These guys, even if something on the list is not open source/free, have permission to distribute it via their compilation CD.

The List of free Software for Microsoft Windows includes

1. 7-zip - rar/zip/ace file archive reaer
2. ant renamer - batch file renamer
3. audacity - audio file editing tool
4. blender - 3D image creator
5. clamwin - free antivirus program although AVG is a much better free Anti Virus Software solution out there
7. deepburner - cd/ dvd burner
8. dia - diagram creation tool (visio copy)
9. eraser - file shredder, data removal tool
10. exact audio copy - audio cd ripper (lossless)
11. filezilla - ftp client and server
12. firefox - best free web browser 

[Read more]

If you liked this article, click here to buy me a beer!

Microsoft releases Windows PowerShell, a powerful replacement for cmd.exe

November 14, 2006

Microsoft released a new and more powerful command line shell and task based scripting technology called Windows PowerShell today. Powershell brings in Unix style shell scripting to Windows Vista as well as Windows XP and Windows 2003 platforms.

Powershell supports features like pipelines(dir | more), allows you to quickly solve storage problems for instance how many 700MB cds are needed to backup 11GB? (11GBMB/700MB) Alex of Windows Vista blog has a more simple definition of Powershell. He describes Powershell as “If you haven’t heard of Windows PowerShell before, think of it as an integrated version of the Windows Command Prompt (cmd.exe) and VBScript.”

You can use it to unleash the power of wildcards and working objects too. Say you wanted to get all the services that start with “a” and then get all the dependent services associated with it, simply typing “PS> get-service w* | format-list DisplayName, DependentServices” should do the job.

History: Before being released as Windows Powershell, it was previously known as Windows “Monad” Shell and MSH or Microsoft Command Shell.

Prerequisites: Windows PowerShell requires the .Net Framework 2.0. You can download Framework 2.0 here

Cool New Features/ can do with Win PowerShell …. I think I will call it Win Pow

1. You can test your commands before committing to them(use feature called Whatif )

2. You can start and stop transcripts of all your commands

3. Can use Win Pow to access applications such as Windows Media Player 11

4. Can configure the much hated User Account Control (set-itemproperty -path HKLM:\SOFTWARE\MICROSOFT\WINDOWS\CurrentVersion\Policies\System -name ConsentPromptBehaviorAdmin -value 0) where a 0 will turn of UAC and 2 will turn it back on.

Look at the example below where I display the services and use powershell as a calender calculator

[Read more]

If you liked this article, click here to buy me a beer!

Software Engineering Challenge from DARPA: build the ultimate speech translation machine

November 8, 2006

New research in breakthrough technologies is more often than not built to cater to the needs of the military. The internet should serve as a Hall of Fame example in this case. Now, with the current war in Iraq going on, there are only so many translators available to serve on the ground. So, the military is looking for new and improved methods for soldiers to be able to communicate with the locals in their native language. Besides, the military would love software that can listen to say Al-Jazeera or any other Arabic or Chinese broadcasts and translate them into English.

The main components of such a speech translation system and to language learning are reading, writing, listening and speaking. Speech-to-speech translation is a challenging problem, due to poor sentence planning typically associated with spontaneous speech, as well as errors caused by automatic speech recognition. Despite the significant progress made in the last years, performance of text and speech translation technology is still far from being satisfactory.

So, how would a system developed for the military look like? An automatic speech translation system would consist of a speech recognizer, a machine translator, a speech synthesizer and an overall system controlling part.

Block diagram of ETRI's automatic speech translation system

Language translation problems are known to be notoriously hard for computer scientists, but the DARPA sponsored Global Autonomous Language Exploitation - GALE - project may dent the issue given enormous financial backing: IBM with its $6 billion annual research budget, SRI and BBN Technologies with ‘modest’ budgets of a few hundred million each.

But most interestingly speach researchers at Carnegie Mellon University has recently demoed a prototype of a device capable of automatic translation of spoken conversations. The device is dubbed the “Tower of Babel”. Currently the device can handle a small vocabulary of 100-200 words at about 80% accuracy, and accuracy drops off significantly beyond that vocabulary. Unlike the traditional approaches that involve sound processing the device hooks up electrodes to speakers facial muscles in order to recognize the speech from facial movements.

As you can see all these projects are a far cry from what DARPA wants. But given time and money something more advanced would surely come out and eventually would be available for civilian use as well.
Credits:

1. Software and web development blog from Max Fomitchev

2. ETRI automatic speech translation system for traveler aid(PDF)

3. Excellent paper: High quality speech translation for language learning from MIT CS and AI labs
 

If you liked this article, click here to buy me a beer!

How to develop ShellCode, a crucial point of any exploit software

October 20, 2006

It’s not an easy task to find a vulnerable service and find an exploit for it. It’s also not easy to defend against users who might want to exploit your system, if you are a system administrator. However, writing an exploit by yourself, to convert a news line from bug tracker into a working lockpick, is much more difficult. This article is not a guide on writing exploits, nor an overview of popular vulnerabilities. This is a step-by-step guide on developing a shellcode, a crucial point of any exploit software. Hopefully, learning how they work will help conscientious and respectable developers and system administrators to understand how malefactors think and to defend their systems against them.
How an Exploit Works

Take any exploit downloaded from the internet that promises you an easy root shell on a remote machine, and examine its source code. Find the most unintelligible piece of the code; it will be there, for sure. Most probably, you will find a several lines of strange and unrelated symbols; something like this:

[Read more]

If you liked this article, click here to buy me a beer!

How to hide your email address from spammers, a thorough guide

October 20, 2006

Every IT professional worth his/her salt has their own webpage/blog these days. While you may have people from all over the globe dropping a line at your site, Email harvesters are the most unwanted visitors on any website. These email spambots crawl the web via search engines to find and extract email addresses from webpages. E-mail addresses in your blog or webpage are no secret to spam robots. Here’s a guide that should help you protect your email addresses from these spam spiders. Techniques mentioned use text manipulation, Masking, HTML, Flash, CSS, and JS to hide email addresses.
How email spammers operate? Email addresses always contain an @ symbol. Most spambots do a pattern-search for likely combinations of letters (abc@xyz.com) like billgates@microsoft.com or larrypage@google.org in the HTML source of webpages. Often they just search for the @ character and grab all the letters on each side on the assumption that it’s a valid email address.
How to keep your email address available to humans but invisible to email spiders? There are tons of Email Address Protector software that claim to protect your email address in web pages and get rid of junk mail - Don’t waste your money, they only encode your email or generate a javascript snippet. We will discuss manual email encoding techniques here. If a visitor clicks an encryped email link on your website, it will work as normal, but spam robots will not be able to extract the address from the link.

[Read more]

If you liked this article, click here to buy me a beer!

Excellent JS based English to LEET translator

October 20, 2006

 

    Leet is a phrase often used on the Internet, some being online games, message boards, and chat rooms. It comes from the word “elite”, meaning “above everyone else”. It’s most commonly written as “1337″ or “l33t”. It can also be written differently, the numbers 1, 3 and 7 standing for L, E and T respectively.

A Leet Speak Alphabet
* A—4,/-\,/_\
* B—8,|3 and very uncommonly 13
* C—<,{,[,(
* D---|>,|),|},|]
* E—3
* F—|=,ph
* G—[,-
* H---|-|,[-].{-},|=|,[=],{=}
* I—1,|
* J—usually the J is untouched
* K—|< ,1 <
* L---|_,|,1_
* M---|\/|,^^
* O---0,(),[],{}
* P---|o,p,|O
* Q---O, or 9
* R---|2,12
* S---5,$
* T---7,+
* U---|_|
* V---\/
* W---\/\/,(/\), \^/
* X---><,
* Y---j
* Z---Z

Numbers for letters
One of the qualities of leet speak is using numbers to replace letters. Many words have numbers leet speak.
* 1 — L, I (I is more often shown as |, and sometimes as ][)
* 2 — Z (not in common usage)
* 3 — E
* 4 — A
* 5 — S
* 6 — G (not in common usage)
* 7 — T (can also be L)
* 8 — B
* 9 — G
* 0 — O (Occasionally represented by “()”)
Below is a simple javascript I wrote to translate English into leet.

If you liked this article, click here to buy me a beer!

Next Page »