Monday 16 May 2016

Emails through Qmail server

I run my own email server. It uses QMail. I realise there are at least two problems there – all of the cool kids have been using Gmail for their email since approximately forever, and who the hell uses QMail anyway?
Like most of these situations, it’s that way for historical reasons. And, of course, I’d love to change the current situation but it works well enough most of the time that the occasional pain it gives me isn’t worth the pain of changing the set-up.
So there I am. One of about three people in the world who are still running an email server using QMail. And that occasionally gives me problems.
One problem is the management of the mailing queues. The tools that QMail gives you for checking the contents of the queues and deleting any unnecessary messages are rather primitive. It seems that everyone uses third-party tools. A couple of years ago, I had a WordPress installation that was compromised and was used to send thousands of email messages to random people. The outgoing queue was full of spam and the incoming queue was full of bounce messages. I stopped QMail and started looking for way to cleanly delete all the bad messages while retaining the tiny number of legitimate ones.
I discovered a program called qmHandle which did exactly what I wanted. It enabled me to remove messages from both queues that matched various criteria and before very long at all, I was back in business (having also cleaned up the WordPress installation and tightening its security).
The qmHandle program was written in Perl. And I always had it in the back of my mind that at some point I’d revisit the program and give something back by fixing it or improving it in some way. A few months ago I found time to do that.
I started by looking at the code. And realised that it had pretty much been written to be as hard to maintain as possible. Ok, that’s probably not true, but it certainly wasn’t written to be particularly easy to understand. What the original author, Michele Beltrame, created was really useful, but it seemed to me that he had made it far harder for himself than he needed to.
So I had found my project. I wanted to hack on qmHandle. But before  I could do that, I needed to rewrite it so that it was easier to work on. That became something that I’d hack on in quite moments over a few weeks. The new version is on Github. I started by importing the original version, so it’s interesting to read the commit history to trace the changes that I made. I think there were three main areas where I improved things.
  1. Splitting most of the logic out into a module. I say “most”, but it’s actually all. The command-line program is now a pleasingly simple:
  2. Improving (by which I mainly mean simplifying) the logic and the syntax. I moved a few variable declarations around (so their scope was smaller) and renamed some so their meaning was more obvious. Oh and I added a couple of useful CPAN modules – Term::ANSIColor and Getopt::Std.
  3. Using Moose. Switching to an OO approach was a big win in general and Moose made this far easier than it would otherwise have been. At some point in the future I might consider moving from Moose to Moo, for performance reasons.
For a few weeks now, I’ve been using the revised version on my email server and it seems to be working pretty much the same as the original version. So it’s time to set it loose on the wider world. This afternoon, Ireleased it to CPAN. I’ve said above that the number of people using QMail to handle their email is tiny. But if you’re in that group and you want a more powerful way to manage your mail queues, then the new version of qmHandle might well be useful to you.
There are a few things that I know I need to do.
  1. More tests. The main point of moving most of the code into a module was to make it easier to test. Now it’s time to prove that. The current test suite is tiny. I need to improve that.
  2. Configuration. Currently the configuration is all hard-coded. And different systems might well need different configuration (for example, the queues might be stored in a different directory). There needs to be a simple way to configure that.
  3. Bug fixes and improvements. This was, after all, why I started doing this. I don’t know what those might be, but I’m sure there are ways to improve the program.
I hope at least someone finds this useful.

177 Hacking E-Books Collection

177 Hacking E-Books Collection

Here I am giving you a huge list of hacking e-books. All are available in E-Book (Pdf and Chm) format. Most of them are copyrighted and could not be download free from every country. Downloading illegal copy is prohibited in many countries in the world. But, if you do not bother to collect any illegal ebook, then search through internet using the titles below.


  1. Hacking The Windows Registry.pdf
  2. Hugo Cornwall - The Hacker's Handbook .pdf
  3. Hacking into computer systems - a beginners guide.pdf
  4. Hacking_IIS_Servers.pdf
  5. Addison-Wesley Professional.Honeypots- Tracking Hackers.pdf
  6. Wiley.The Database Hacker's Handbook- Defending Database Servers.chm
  7. John Wiley &amp_ Sons.Hacking GMail (ExtremeTech).pdf
  8. Hacking.Guide.V3.1.pdf
  9. A-List Publishing.Hacker Linux Uncovered.chm
  10. Hacker'S.Delight.chm
  11. Hacker.Bibel.pdf
  12. HackerHighSchool.pdf
  13. Hacker's Desk Reference.pdf
  14. A Beginners Guide To Hacking Computer Systems.pdf
  15. Addison Wesley - Hackers Delight 2002.pdf
  16. addison wesley - web hacking - attacks and defense.chm
  17. Addison Wesley, The Outlook Answer Book Useful Tips Tricks And Hacks (2005) Bbl Lotb.chm
  18. amazon-hacks.chm
  19. Anti-Hacker ToolKit - McGraw Hill 2E 2004.chm
  20. Attacking the DNS Protocol.pdf
  21. Auerbach.Practical.Hacking.Techniques.and.Countermeasures.Nov.2006.pdf
  22. Auerbach.Pub.The.Hackers.Handbook.The.Strategy.Behind.Breaking.into.and.Defending.Networks.Nov.20.pdf
  23. bsd-hacks.pdf
  24. ceh-official-certified-ethical-hacker-review-guide-exam-312-50.9780782144376.27422.pdf
  25. Certified Ethical Hacker (CEH) v3.0 Official Course.pdf
  26. Computer - Hackers Secrets - e-book.pdf
  27. cracking-sql-passwords.pdf
  28. Crc Press - The Hacker'S Handbook.pdf
  29. Credit.Card.Visa.Hack.Ucam.Cl.Tr.560.pdf
  30. DangerousGoogle-SearchingForSecrets.pdf
  31. database hacker handbook.chm
  32. Dummies - Hack How To Create Keygens (1).pdf
  33. ebay-hacks-100-industrial-strength-tips-and-tools.pdf
  34. ebook.oreilly.-.windows.xp.hacks.sharereactor.chm
  35. eBooks.OReilly.-.Wireless.Hacks.100.Industrial.-.Strength.Tips.and.Tools.chm
  36. ethical hacking, student guide.pdf
  37. excel-hacks.chm
  38. For.Dummies.Hacking.for.Dummies.Apr.2004.eBook-DDU.pdf
  39. For.Dummies.Hacking.Wireless.Networks.For.Dummies.Sep.2005.eBook-DDU.pdf
  40. google-hacks.pdf
  41. Google Earth for Dummies.pdf
  42. Hack IT Security Through Penetration Testing.pdf
  43. Hack Proofing - Your Network - Internet Tradecraft.pdf
  44. Hack Proofing Linux A Guide to Open Source Security - Stangler, Lane - Syngress - ISBN 1-928994-34-2.pdf
  45. Hack Proofing Sun Solaris 8.pdf
  46. Hack Proofing Your E-Commerce Site.pdf
  47. Hack Proofing Your Identity In The Information Age.pdf
  48. Hack Proofing Your Network Second Edition.pdf
  49. Hack Proofing Your Network_First Edition.pdf
  50. Hack Proofing Your Web Applications.pdf
  51. Hacker Disassembling Uncovered.chm
  52. hacker ethic.pdf
  53. Hacker Linux Uncovered.chm
  54. Hacker Web Exploitation Uncovered.chm
  55. Hacker'S.Delight.chm
  56. hacker-disassembling-uncovered.9781931769228.20035.chm
  57. Hackers Beware.pdf
  58. Hackers Secrets Revealed.pdf
  59. Hackers Secrets.pdf
  60. Hackers, Heroes Of The Computer Revolution.pdf
  61. Hackers_Secrets.pdf
  62. Hacker_s_Guide.pdf
  63. Hacking - Firewalls And Networks How To Hack Into Remote Computers.pdf
  64. Hacking - The Art of Exploitation.chm
  65. Hacking Cisco Routers.pdf
  66. Hacking Exposed - Network Security Secrets & Solutions, 2nd Edition.pdf
  67. Hacking Exposed Network Security Secrets & Solutions, Third Edition ch1.pdf
  68. Hacking For Dummies 1.pdf
  69. Hacking For Dummies 2.pdf
  70. Hacking For Dummies.pdf
  71. Hacking GMail.pdf
  72. Hacking IIS Servers.pdf
  73. Hacking into computer systems - a beginners guide.pdf
  74. Hacking the Code - ASP.NET Web Application Security Cookbook (2004) .chm
  75. hacking the windows registry .pdf
  76. Hacking Windows XP.pdf
  77. Hacking-ebook - CIA-Book-of-Dirty-Tricks1.pdf
  78. Hacking-Hacker's Guide.pdf
  79. Hacking-Hackers Secrets Revealed.pdf
  80. Hacking-Hugo Cornwall-The Hacker's Handbook .pdf
  81. Hacking-The Hacker Crackdown.pdf
  82. Hacking.For.Dummies.Access.To.Other.People's.System.Made.Simple.pdf
  83. Hacking.Guide.V3.1.pdf
  84. Hackproofing Oracle Application Server.pdf
  85. hacks.sfv
  86. Hack_Attacks_Revealed_A_Complete_Reference_With_Custom_Security_Hacking_Toolkit.chm
  87. Hack_IT_Security_Through_Penetration_Testing.chm
  88. Halting.The.Hacker.A.Practical.Guide.To.Computer.Security.chm
  89. How to Crack CD Protections.pdf
  90. John Wiley & Sons - Hacking For Dummies.pdf
  91. John.Wiley.and.Sons.Hacking.Windows.XP.Jul.2004.eBook-DDU.pdf
  92. John.Wiley.and.Sons.Hacking.Windows.XP.Jul.2004.eBook.pdf
  93. John.Wiley.and.Sons.The.Art.of.Intrusion.The.Real.Stories.Behind.the.Exploits.of.Hackers.Intruders.and.Deceivers.Feb.2005.ISBN0764569597.pdf
  94. Jon.Erickson.Hacking.The.Art.Of.Exploitation.No.Starch.Press.2003.chm
  95. linux-server-hacks.pdf
  96. Linux-Server.Hacks-OReilly.pdf
  97. little_black_book_oc_computer_viruses.pdf
  98. mac-os-hacks.chm
  99. McGraw Hill - Web Applications (Hacking Exposed).pdf
  100. McGraw-Hill - Hacking Exposed, 3rd Ed - Hacking Exposed Win2.pdf
  101. McGraw.Hacking.Exposed.Cisco.Networks.chm
  102. McGraw.Hill.HackNotes.Linux.and.Unix.Security.Portable.Reference.eBook-DDU.pdf
  103. McGraw.Hill.HackNotes.Network.Security.Portable.Reference.eB.pdf
  104. McGraw.Hill.HackNotes.Network.Security.Portable.Reference.eBook-DDU.pdf
  105. McGraw.Hill.HackNotes.Web.Security.Portable.Reference.eBook-.pdf
  106. McGraw.Hill.HackNotes.Web.Security.Portable.Reference.eBook-DDU.pdf
  107. McGraw.Hill.HackNotes.Windows.Security.Portable.Reference.eB.pdf
  108. McGraw.Hill.HackNotes.Windows.Security.Portable.Reference.eBook-DDU.pdf
  109. Mind Hacks - Tips & Tricks for Using Your Brain.chm
  110. network-security-hacks.chm
  111. No.Starch.Press.Hacking.The.Art.Of.Exploitation.chm
  112. O'Reilly - Online Investing Hacks.chm
  113. O'Reilly.-.Network.Security.Hacks.chm
  114. O'Reilly.Windows.Server.Hack.chm
  115. O'Reilly.Windows.Server.Hack.rar
  116. online-investing-hacks.chm
  117. OReilly Google Hacks, 1st Edition2003.pdf
  118. OReilly - Flickr Hacks Tips and Tools for Sharing Photos Online (Feb 2006).chm
  119. OReilly - Google Hacks.pdf
  120. Oreilly Access Hacks Apr 2005.chm
  121. Oreilly, Paypal Hacks (2004) Ddu.chm
  122. OReilly,.Digital.Video.Hacks.(2005).DDU.LotB.chm
  123. OReilly,.IRC.Hacks.(2004).DDU.chm
  124. oreilly,.visual.studio.hacks.(2005).ddu.lotb.chm
  125. Oreilly.Amazon.Hacks.eBook.LiB.chm
  126. oreilly.firefox.hacks.ebook-lib.chm
  127. OReilly.Google.Hacks.2nd.Edition.Dec.2004.ISBN0596008570.chm
  128. OReilly.Google.Maps.Hacks.Jan.2006.chm
  129. Oreilly.Linux.Desktop.Hacks.Mar.2005.eBook-LiB.chm
  130. OReilly.Linux.Server.Hacks.Volume.Two.Dec.2005.chm
  131. OReilly.Network.Security.Hacks.chm
  132. OReilly.PayPal.Hacks.Sep.2004.eBook-DDU.chm
  133. OReilly.PC.Hacks.Oct.2004.eBook-DDU.chm
  134. OReilly.Perl.Hacks.Tips.and.Tools.for.Programming.Debugging.and.Surviving.May.2006.chm
  135. OReilly.Skype.Hacks.Tips.and.Tools.for.Cheap.Fun.Innovative.Phone.Service.Dec.2005.chm
  136. OReilly.SQL.Hacks.Nov.2006.chm
  137. OReilly.Statistics.Hacks.May.2006.chm
  138. OReilly.Ubuntu.Hacks.Tips.and.Tools.for.Exploring.Using.and.Tuning.Linux.Jun.2006.chm
  139. OReilly.VoIP.Hacks.Tips.and.Tools.for.Internet.Telephony.Dec.2005.chm
  140. oreilly.windows.xp.hacks.2nd.edition.feb.2005.lib.chm
  141. OReilly.Word.Hacks.Oct.2004.eBook-DDU.chm
  142. OSB.Ethical.Hacking.and.Countermeasures.EC.Council.Exam.312.50.Student.Courseware.eBook-LiB.chm
  143. O_Reilly_-_Windows_XP_Hacks.chm
  144. PC Games - How to Crack CD Protection.pdf
  145. prentice hall - pipkin - halting the hacker- a practical guide to computer security, 2nd edition.chm
  146. Que - UNIX Hints Hacks.chm
  147. Que.Certified.Ethical.Hacker.Exam.Prep.Apr.2006.chm
  148. Security and Hacking - Anti-Hacker Tool Kit Second Edition.chm
  149. SoTayHacker1.0.chm
  150. Spidering Hacks-100 Industrial Strength Tips & Tools 2003.chm
  151. SQL Hacks.chm
  152. SQLInjectionWhitePaper.pdf
  153. Syngress - Hack Proofing Linux (2001).pdf
  154. Syngress - Hack Proofing Your Identity in the Information Age - 2002.pdf
  155. Syngress - Hacking a Terror Network. The Silent Threat of Covert Channels.pdf
  156. Syngress -- Hack Proofing Your Wireless Network.pdf
  157. Syngress Hack Proofing Your Identity in the Information Age.pdf
  158. Syngress.Buffer.Overflow.Attacks.Dec.2004.eBook-DDU.pdf
  159. Syngress.Hack.the.Stack.Oct.2006.pdf
  160. Syngress.Hacking.a.Terror.Network.Nov.2004.ISBN1928994989.pdf
  161. The Little Black Book Of Computer Virus.pdf
  162. the-database-hackers-handbook-defending-database-servers.9780764578014.25524.chm
  163. The_20Little_20Black_20Book_20of_20Computer_20Viruses.pdf
  164. tivo-hacks.100-industrial-strength-tips-and-tools.pdf
  165. u23_Wiley - Hacking GPS - 2005 - (By Laxxuss).pdf
  166. Websters.New.World.Websters.New.World.Hacker.Dictionary.Sep.2006.pdf
  167. Wiley.Hacking.Firefox.More.Than.150.Hacks.Mods.and.Customizations.Jul.2005.eBook-DDU.pdf
  168. Wiley.Hacking.Google.Maps.and.Google.Earth.Jul.2006.pdf
  169. Wiley.Hacking.GPS.Mar.2005.ISBN0764598805.pdf
  170. Wiley.Lifehacker.Dec.2006.pdf
  171. Wiley.The.Database.Hackers.Handbook.Defending.Database.Servers.chm
  172. Win XP Hacks oreilly 2003.chm
  173. Windows Server Hacks.chm
  174. WinXP SP1 Hack.pdf
  175. Xbox-hack - AIM-2002-008.pdf
  176. Yahoo.Hacks.Oct.2005.chm
  177. Hackers Beware Defending Your Network From The Wiley Hacker.pdf
Do not forget to ensure any legal issue in your own country.

A Beginner’s Guide to Linux


Linux Guide
There are many valid and compelling reasons to opt for Linux as the operating system for a desktop computer, the most important being that it can be tailored to the user’s needs and tastes. This article, aimed at noobs, describes the salient features of the Linux operating system.
Linux was designed for the sole purpose of providing desktop users with an affordable but functional operating system in a world where the most commonly used OS comes with a high price tag.
Linux was originally created in 1991 by Linus Torvalds, a Finnish student from the University of Helsinki, for his own personal computer, and with zero plans for expansion beyond one platform. However, Linux grew to become adaptable with several computer architectures and now runs on every platform imaginable.
Linux has fascinated developers ever since it was created and, as a result, its open source code has seen several contributions from more than 12,000 programmers.
The Linux kernel (the main part of the OS located at the core) has been released under the GNU General Public License (GPL) version 2.
Linux kernel architecture
The Linux kernel operates on a monolithic architecture, which basically means that the complete operating system works on the kernel space and on the solo supervisor mode. Monolithic kernels have several pros and cons, some of which include:
Pros
  • Direct and faster approach for hardware to access programs
  • Simplicity and ease of in-process communication
  • Quick processing of requests
Cons
  • Lack of security due to processes running solely on supervision mode
  • Enormous memory and installation footprints
However, kernel developers did a good job by overcoming the flaws associated with the monolithic kernel by modelling modules of the kernel, which can be both loaded and unloaded at any time. Modules that are able to support features such as low level virtualisation can also enable you to replace your kernel without rebooting the entire system, although this happens only in rare cases.
Common features of the Linux kernel
Let’s look at some of the common features of the Linux kernel.
Multi-user support: A Linux system supports several user accounts at once as well as multiple users logged in on a single system at a given period of time. Users also enjoy the privilege of arranging their environment in a way that suits them best with the aid of customisable desktop icons and menus. Additionally, to ensure privacy, user accounts are password protected (at the discretion of the user).
Multi-tasking capabilities: With a Linux OS, several programs are capable of running at the same time, both on the interface and at the background. The ability to run several programs at once enables the Linux kernel to act as a server, with background processes (also known as daemons) responding to user requests.
Graphical user interface (GUI): Linux supports a powerful framework for working with graphical applications called the X Windows System or simply X, which ensures that X-based GUIs receive adequate support and run flawlessly. Other than X, you are also provided with an X-based desktop setting to give your GUI processes a lively look and feel.
Hardware management and support: Every kind of device and hardware that you connect to your desktop has pre-configured support from Linux. All removable devices such as CD-ROMs, sound and memory sticks, tapes and so on, can be supported by Linux.
Networks: Linux is popular at ensuring all client computers on a LAN or on the Internet are provided with adequate networking services. Custom tailored software is readily available, which enables Linux to don different hats including that of a file server, mail server, Web server, etc.
Application compatibility and support: One of the key features of Linux is its compatibility with a wide array of application programming interfaces (APIs) and POSIX, which allow support for more varieties of freeware and shareware software. Almost every kind of GNU software is compatible with Linux, though some may require slight modifications.
Advantages of Linux
Cost: Unlike other operating systems which come with a huge price tag and monthly fees, Linux can be obtained for zero cost. Again, while other OSs like Microsoft only allow one licence per system, it is the opposite with Linux, which allows distribution over series of computers.
Security and robustness: Since it was created, right up to the present day, the Linux OS has withstood malware, ad ware and virus vulnerabilities. The case is the complete opposite with other commercially available operating systems like Microsoft Windows.
Freedom: One of the reasons why we love Linux is the freedom that comes with it. With Linux, you have the liberty to control each aspect of the operating system, including the desktop interface, windows manager and task bars.
Software: With Linux, you are able to use different software for different tasks, all at once. Interestingly, because Linux supports free and open source software, you can modify the source code when and how you want to.
The disadvantages of Linux
Not easy to master: Mastering the Linux operating system requires time and patience as well as a willingness to learn. Otherwise you may have to hire the services of a dedicated Linux coach, which may be costly.
Compatibility issues: By being free, Linux has put itself at a disadvantage by not being able to catch up with new hardware. Although developers are trying their best to ensure that Linux meets the compatibility requirements of new hardware, they can do little when people are provided with several other operating systems as an alternative.
Lacks some key features: Although Linux is good in most respects, it lacks some key features which are readily available in other operating systems.
Not compatible with several Windows programs: Linux may be great in its own right; however, one major setback with it is that it is not compatible with all programs. It lacks the equivalent to many popular Windows programs, due to which users opt for other operating systems.
While open source technology has its perks, it is not altogether better than other operating systems due to the limited support it receives.
In conclusion, the Linux operating system continues to evolve and widen its support for several architectures and frameworks. Installation of Linux on your PC is a bit of a technical process but after you are done, you will be able to enjoy using it.

Storage Classes in C Programming:

A storage class defines the scope (visibility) and life-time of variables and/or functions within a C Program. They precede the type that they modify. We have four different storage classes in a C program −
  • auto
  • register
  • static
  • extern

The auto Storage Class

The auto storage class is the default storage class for all local variables.
{
   int mount;
   auto int month;
}
The example above defines two variables with in the same storage class. 'auto' can only be used within functions, i.e., local variables.

The register Storage Class

The register storage class is used to define local variables that should be stored in a register instead of RAM. This means that the variable has a maximum size equal to the register size (usually one word) and can't have the unary '&' operator applied to it (as it does not have a memory location).
{
   register int  miles;
}
The register should only be used for variables that require quick access such as counters. It should also be noted that defining 'register' does not mean that the variable will be stored in a register. It means that it MIGHT be stored in a register depending on hardware and implementation restrictions.

The static Storage Class

The static storage class instructs the compiler to keep a local variable in existence during the life-time of the program instead of creating and destroying it each time it comes into and goes out of scope. Therefore, making local variables static allows them to maintain their values between function calls.
The static modifier may also be applied to global variables. When this is done, it causes that variable's scope to be restricted to the file in which it is declared.
In C programming, when static is used on a class data member, it causes only one copy of that member to be shared by all the objects of its class.
#include <stdio.h>
 
/* function declaration */
void func(void);
 
static int count = 5; /* global variable */
 
main() {

   while(count--) {
      func();
   }
 
   return 0;
}

/* function definition */
void func( void ) {

   static int i = 5; /* local static variable */
   i++;

   printf("i is %d and count is %d\n", i, count);
}
When the above code is compiled and executed, it produces the following result −
i is 6 and count is 4
i is 7 and count is 3
i is 8 and count is 2
i is 9 and count is 1
i is 10 and count is 0

The extern Storage Class

The extern storage class is used to give a reference of a global variable that is visible to ALL the program files. When you use 'extern', the variable cannot be initialized however, it points the variable name at a storage location that has been previously defined.
When you have multiple files and you define a global variable or function, which will also be used in other files, then extern will be used in another file to provide the reference of defined variable or function. Just for understanding, extern is used to declare a global variable or function in another file.
The extern modifier is most commonly used when there are two or more files sharing the same global variables or functions as explained below.
First File: main.c
#include <stdio.h>
 
int count ;
extern void write_extern();
 
main() {

   count = 5;
   write_extern();
}
Second File: support.c
#include <stdio.h>
 
extern int count;
 
void write_extern(void) {
   printf("count is %d\n", count);
}
Here, extern is being used to declare count in the second file, where as it has its definition in the first file, main.c. Now, compile these two files as follows −
$gcc main.c support.c
It will produce the executable program a.out. When this program is executed, it produces the following result −
5

If not understands fully please read bellow:

OR


Storage classes

In C language, each variable has a storage class which decides scope, visibility and lifetime of that variable. The following storage classes are most oftenly used in C programming,
  1. Automatic variables
  2. External variables
  3. Static variables
  4. Register variables

Automatic variables

A variable declared inside a function without any storage class specification, is by default an automatic variable. They are created when a function is called and are destroyed automatically when the function exits. Automatic variables can also be called local variables because they are local to a function. By default they are assigned garbage value by the compiler.
void main()
{
 int detail;
 or 
 auto int detail;    //Both are same
}

External or Global variable

A variable that is declared outside any function is a Global variableGlobal variables remain available throughout the entire program. One important thing to remember about global variable is that their values can be changed by any function in the program.
int number;
void main()
{
 number=10;
}
fun1()
{
 number=20;
}
fun2()
{
 number=30;
}
Here the global variable number is available to all three functions.

extern keyword

The extern keyword is used before a variable to inform the compiler that this variable is declared somewhere else. The extern declaration does not allocate storage for variables.
extern keyword in c

Problem when extern is not used

main()
{
  a = 10;      //Error:cannot find variable a
  printf("%d",a);    
}

Example Using extern in same file

main()
{
  extern int x;  //Tells compiler that it is defined somewhere else
  x = 10;      
  printf("%d",x);    
}

int x;    //Global variable x

Static variables

static variable tells the compiler to persist the variable until the end of program. Instead of creating and destroying a variable every time when it comes into and goes out of scope, static is initialized only once and remains into existence till the end of program. A static variable can either be internal or external depending upon the place of declaraction. Scope of internal static variable remains inside the function in which it is defined. External static variables remain restricted to scope of file in each they are declared.
They are assigned 0 (zero) as default value by the compiler.
void test();   //Function declaration (discussed in next topic)
 
main()
{
 test();
 test();
 test();
}
void test()
{
 static int a = 0;        //Static variable
 a = a+1;
 printf("%d\t",a);
}
output :
1 2 3

Register variable

Register variable inform the compiler to store the variable in register instead of memory. Register variable has faster access than normal variable. Frequently used variables are kept in register. Only few variables can be placed inside register.
NOTE : We can never get the address of such variables.
Syntax :
register int number;