makepasswd-1.10/ 40700 145 145 0 6702761243 11625 5ustar lilolilomakepasswd-1.10/CHANGES100600 145 145 466 6702751744 12712 0ustar lilolilo1.10-- Added the --clearfrom option, so you can input a clear text password from a file. 1.07-- Inserted the omitted parsing for the --string option. Cleaned up a bit of documentation. Thanks to netgod of debian.org for hounding me until I fixed this. :) 1.06-- Initial release. makepasswd-1.10/README100600 145 145 604 6467627543 12600 0ustar liloliloAs has been my custom of late, this program is released under the terms of GNU COPYING-2. Don't apply any other version of the GNU license to it. If some legal precedent ends up biting us in the nose, write me and I'll tweak the license accordingly. In that case, or in case you want to laud or castigate me for some imagined slight, feel free to email me at lilo@linpeople.org. lilo makepasswd-1.10/makepasswd100700 145 145 31742 6702761241 14034 0ustar lilolilo#!/usr/bin/perl # # Program information. # $Program = 'mkpasswd'; $Version = '1.10'; $Author = 'Rob Levin '; $Date = "Monday, 7 April 1999 at 22:56 (UCT)"; $Copyright = '1997-1999'; $Description = 'This program is extracted from the author\'s GPL\'ed mkircconf program. '. 'It is used to create and/or encrypt true-random-seeded password strings.'; # # Setup. # use Getopt::Long; use FileHandle; use integer; # # Set default values for options ("" to indicate not-specified). # $Chars = ""; $Clear = ""; $Count = ""; $Crypt = 0; $CryptSalt = ""; $MaxChars = ""; $MinChars = ""; $RandomSeed = ""; $RepeatPass = ""; $Rerandom = ""; $ShowHelp = 0; $String = ""; $Verbose = 0; # # Limit and current value variables for execution. # $Error = 0; $CharMin = 6; $CharMax = 8; $CharFormat = $CharMax + 3; $CountUsed = 1; $PasswordRepeat = 1; $CurrentChar=$CharMin; $Password = ""; $Randomize = 1; $RandSeed = 0; $RerandomCount = -1; $RerandomNow = 1; $SeedValue = 0; # # Crypt() mode set on the basis of options interpreted: # # 0 No related options yet interpreted. # 1 Password generation will be done. # 2 Password generation w/o encryption will be done. # 3 Password generation and encryption will be done. # 4 Encryption w/o password generation will be done. # $CryptMode = 0; # # Default characters for passwords include all lowercase # and uppercase alphabetics, plus numerics 0-9. Uppercase # O and Z and lowercase k and l are omitted to improve # hand-transcription clarity. # $StringUsed = "ABCDEFGHIJKLMNPQRSTUVWXYabcdefghijmnopqrstuvwxyz0123456789"; $ValString = length($StringUsed) - 1; # # Characters for salt construction. # $SaltList="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./"; # # Process the options. # &GetOptions ( 'chars=i' => \$Chars, 'clearfrom=s' => \$Clear, 'count=i' => \$Count, 'crypt!' => \$Crypt, 'cryptsalt=i' => \$CryptSalt, 'help' => \$ShowHelp, 'maxchars=i' => \$MaxChars, 'minchars=i' => \$MinChars, 'randomseed=i' => \$RandomSeed, 'repeatpass=i' => \$RepeatPass, 'rerandom=i' => \$Rerandom, 'string=s' => \$String, 'verbose!' => \$Verbose, ) or do { $Error = 1; }; $#ARGV != -1 and do { print STDERR "$Program: Non-argument options specified: @ARGV\n"; $Error = 1; }; # # If password generation option was specified with --clearfrom, flag it. # $Clear ne "" and do { ( $Chars ne "" or $MaxChars ne "" or $MinChars ne "" or $Count ne "" or $String ne "" ) and do { print STDERR "$Program: Option --clearfrom may not be specified ". "with a password generation option.\n"; print STDERR "$Program: Password generation options are ". "--chars --minchars --maxchars --count --string.\n"; $Error = 1; }; $Crypt or do { print STDERR "$Program: Option --clearfrom may not be specified ". "without option --crypt.\n"; $Error = 1; }; open CLEARFROM, "$Clear" or do { print STDERR "$Program: Could not read $Clear, error: $!\n"; $Error = 1; }; $Clear = ; $Clear =~ s/[\n]*$//; close CLEARFROM; $CryptMode = 4; }; # # If --chars was specified, process it. # $Chars ne "" and do { ($MinChars ne "" or $MaxChars ne "") and do { print STDERR "$Program: May not specify --chars with --minchars or --maxchars.\n"; $Error = 1; }; $CryptMode == 0 and $CryptMode = 1; $CharMin = $Chars; $CharMax = $Chars; $CharFormat = $CharMax + 3; }; # # If --minchars was specified, process it. # $MinChars ne "" and do { $Chars eq "" or do { print STDERR "$Program: May not specify --minchars with --chars.\n"; $Error = 1; }; $CryptMode == 0 and $CryptMode = 1; $CharMin = $MinChars; }; # # If --maxchars was specified, process it. # $MaxChars ne "" and do { $Chars eq "" or do { print STDERR "$Program: May not specify --maxchars with --chars.\n"; $Error = 1; }; $CryptMode == 0 and $CryptMode = 1; $CharMax = $MaxChars; $CharFormat = $CharMax + 3; }; # # Make sure minimum character length is less than or equal to maximum. # $CharMin > $CharMax and do { print STDERR "$Program: Illegal value --minchars=$CharMin is larger than --maxchars=$CharMax.\n"; $Error = 1; }; # # If --count was specified, process it. # $Count ne "" and do { # # Make sure the password count is a positive number. # $Count > 0 or do { print STDERR "$Program: Number of passwords to be made must be positive\n"; $Error = 1; }; # # If so, finish processing it. # $CryptMode == 0 and $CryptMode = 1; $CountUsed = $Count; }; # # If --string was specified, process it. # $String ne "" and do { $CryptMode == 0 and $CryptMode = 1; $StringUsed = $String; $ValString = length($String) - 1; }; # # If --repeatpass was specified, process it. # $RepeatPass ne "" and do { # # If --crypt is not set or --cryptsalt is set, disallow this parameter. # $Crypt or do { print STDERR "$Program: To use --repeatpass, --crypt must also be set.\n"; $Error = 1; }; $CryptSalt and do { print STDERR "$Program: To use --repeatpass, --cryptsalt may not be set.\n"; $Error = 1; }; # # Make sure the password repeat count is a positive number. # ($RepeatPass > 0 and $RepeatPass < 4097) or do { print STDERR "$Program: Password repeat count must be positive and less than 4097.\n"; $Error = 1; }; $CryptMode == 0 and $CryptMode = 1; $PasswordRepeat = $RepeatPass; }; # # If crypt mode is set to `password generation will be done, not yet known if # encryption will be done,' fill in the blanks. If crypt mode is not yet set, # it's going to be `password generation will be done, encryption will not.' # $CryptMode == 1 and do { $CryptMode += ($Crypt + 1); }; $CryptMode == 0 and do { $CryptMode = 2; }; # # If a cryptographic seed value was specified, process it. # $CryptSalt ne "" and do { # # If --crypt wasn't specified, signal the error. # $Crypt or do { print STDERR "$Program: Option --cryptsalt may not be ". "specified without option --crypt.\n"; $Error = 1; }; # # Make sure the seed value is between 0 and 4095, inclusive. # ($CryptSalt > -1 and $CryptSalt <= 4096) or do { print STDERR "$Program: Crypt() seed value must be zero thru 4096\n"; $Error = 1; }; # # If so, save the value. # $SeedValue = $CryptSalt; }; # # If we're not in a password generation mode and --cryptsalt was set to a # nonzero value, then we shouldn't have any randomization options. If we # do in that case, signal error and quit. # $CryptMode == 4 and $SeedValue and do { $Randomize = 0; ($RandomSeed ne "" or $Rerandom ne "") and do { print STDERR "$Program: Options --randomseed and --rerandom may not be ". "specified unless password generation or random seed encryption ". "is performed.\n"; $Error = 1; }; }; # # If a random number seed was specified, check for a valid number and process it. # $RandomSeed ne "" and do { ($RandomSeed > -1 and $RandomSeed <= 2^32) or do { print STDERR "$Program: Random number seed must be zero thru 2^32\n"; $Error = 1; }; $RandSeed = $RandomSeed; }; # # If a rerandomize character count was specified, check for a non-negative # number and process it. # $Rerandom ne "" and do { ($ReRandom > -1) or do { print STDERR "$Program: Rerandomize parameter must be zero or positive\n"; $Error = 1; }; $RerandomCount = $Rerandom; $RerandomCount or $RerandomCount--; }; # # If --help was specified, display the message and terminate with the exit # code in $Error, which will be nonzero if a syntax error occurred. # $ShowHelp and do { $Error and print STDERR "\n"; Help(); exit $Error; }; # # If an error occurred, display help message on STDERR and quit with the # exit code in $Error. # $Error and do { $Error and print STDERR "$Program: For more information, type: $Program --help\n"; exit $Error; }; # # If verbose mode was selected, display the output header. # $PassLabel = $CryptLabel = ""; $Verbose and print " $Program v$Version (c) $Copyright by $Author, last modified $Date All rights reserved by the author, licensed under GPL version 2. "; # # Process the number of passwords specified. Terminate normally. # for ($ctr=0; $ctr < $CountUsed; $ctr++) { ProcessPassword(); } exit(0); # # sub Help: Display help information on STDERR. # sub Help { print STDERR "$Program v$Version, a utility to generate and/or encrypt passwords. Copyright (c) $Copyright by $Author. All rights are reserved by the author. This program may be used under the terms of version 2 of the GNU Public License. Last modified on $Date. Format: $Program [option...] For low (nonzero) values of --rerandom, tap the CONTROL key at random intervals if the program seems to stall. The entropy base for /dev/random is depleted easily. Options are: --chars=N Generate passwords with exactly N characters (do not use with options --minchars and --maxchars). --clearfrom=FILE Use a clear password from FILE instead of generating passwords. Requires the --crypt option; may not be used with options --chars, --maxchars, --minchars, --count, --string, --nocrypt. Trailing newlines are ignored, other whitespace is not. --count=N Produce a total of N passwords (the default is one). --crypt Produce encrypted passwords. --cryptsalt=N Use crypt() salt N, a positive number <= 4096. If random seeds are desired, specify a zero value (the default). --help Ignore other operands and produce only this help display. --maxchars=N Generate passwords with at most N characters (default=8). --minchars=N Generate passwords with at least N characters (default=6). --nocrypt Do not encrypt the generated password(s) (the default). --noverbose Display no labels on output (the default). --randomseed=N Use random number seed N, between 0 and 2^32 inclusive. A zero value results in a real-random seed. --rerandom=N Set the random seed value every N values used. Specify zero to use a single seed value (the default). Specify one to get true-random passwords, but plan on hitting the CONTROL key a lot while it's running. ;) --repeatpass=N Use each password N times (4096 maximum, --crypt must be set and --cryptsalt may not be set). --string=STRING Use the characters in STRING to generate random passwords. --verbose Display labelling information on output. "; } # # sub Random(A, B): Produce a random integer from A to B, inclusive. # sub Random { $RerandomNow--; $RerandomNow == 0 and do { SeedRandom(); $RerandomNow = $RerandomCount; }; $RerandomCount == -1 and do { $RerandomNow = $RerandomCount; }; my $RandomOutputVal=rand($_[1]-$_[0]+1); $RandomOutputVal=$RandomOutputVal+$_[0]; $RandomOutputVal =~ s/\..*$//; $RandomOutputVal; } # # sub SeedRandom: Seed the random number function. # sub SeedRandom { my $i; my $SeedOutput = $RandSeed; $SeedOutput or do { open(RANDOMSEED, "> 6; my $j = $_[0] % 64; my $SaltOut = substr($SaltList, $i, 1).substr($SaltList, $j, 1); $SaltOut; } # # sub CryptPassword(A, B): Encrypt the password provided; keep a running # list of codes used as long as B is true. # sub CryptPassword { my $ThisSeed = $SeedValue; if ($ThisSeed) { $ThisSeed--; } else { $_[1] or do { %UsedSeed = (); }; $ThisSeed = Random(0, 4095); do { $ThisSeed = Random(0, 4095); } until not exists $UsedSeed{$ThisSeed}; $UsedSeed{$ThisSeed} = $ThisSeed; } crypt($_[0], MakeSalt($ThisSeed)); } # # sub ProcessPassword(A): Process the password provided. # sub ProcessPassword { my $i; my $Password = ""; my $CryptedPass = ""; my $PaddedPass = ""; $Password = MakePassword(); $Crypt and $PaddedPass = sprintf "%-$CharFormat"."s", $Password; $Verbose and do { $PassLabel="Password="; $CryptLabel="Encrypted String="; $EmptyPassword=sprintf "%-$CharFormat"."s", ""; $ctr and $Verbose and print "\n"; }; for ($i = 0; $i < $PasswordRepeat; $i++) { if ($Crypt) { $CryptedPass = CryptPassword($Password, $i); print "$PassLabel"."$PaddedPass"."$CryptLabel"."$CryptedPass\n"; $Verbose and $PaddedPass = $EmptyPassword; } else { print "$PassLabel"."$Password\n"; } $Verbose and do { $PassLabel=" "; $CryptLabel=" "; }; } } makepasswd-1.10/makepasswd.1100600 145 145 7172 6702761123 14151 0ustar lilolilo.\" Copyright (C) 1997 Johnie Ingram (johnie@debian.org). .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" This page is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, .\" USA. .\" .TH makepasswd 1 "1998 February 9" "Debian Distribution" "UNIX Reference Manual" .SH NAME makepasswd \- generate and/or encrypt passwords .SH SYNOPSIS .B makepasswd [ .B \--chars .I N ] [ .B \--clearfrom .I file ] [ .B \--count .I N ] [ .B \--crypt | --nocrypt ] [ .B \--cryptsalt .I N ] [ .B \--help ] [ .B \--maxchars .I N ] [ .B \--minchars .I N ] [ .B \--randomseed .I N ] [ .B \--rerandom .I N ] [ .B \--repeatpass .I N ] [ .B \--string .I string ] [ .B \--verbose | --noverbose ] .SH DESCRIPTION .LP .B makepasswd generates true random passwords by using the /dev/random feature of Linux, with the emphasis on security over pronounceability. It can also encrypt plaintext passwords given on the command line. .SH OPTIONS .TP .B --chars N Generate passwords with exactly N characters (do not use with options --minchars and --maxchars). .TP .B --clearfrom FILE Use password from FILE instead of generating passwords. Requires the --crypt option; may not be used with these options: --chars, --maxchars, --minchars, --count, --string, --nocrypt. Trailing newlines are removed but other white space is not. .TP .B --count N Produce a total of N passwords (the default is one). .TP .B --crypt Produce encrypted passwords. .TP .B --cryptsalt N Use crypt() salt N, a positive number <= 4096. If random seeds are desired, specify a zero value (the default). .TP .B --help Ignore other operands and produce only a help display. .TP .B --maxchars N Generate passwords with at most N characters (default = 8). .TP .B --minchars N Generate passwords with at least N characters (default = 6). .TP .B --nocrypt Do not encrypt the generated password(s) (the default). .TP .B --noverbose Display no labels on output (the default). .TP .B --randomseed N Use random number seed N, between 0 and 2^32 inclusive. A zero value results in a real-random seed. .TP .B --rerandom N Set the random seed value every N values used. Specify zero to use a single seed value (the default). Specify one to get true-random passwords, but plan on hitting the CONTROL key a lot while it's running. The Linux entropy device is quickly depleted and keystroke intervals are one source of new randomness. .TP .B --repeatpass N Use each password N times (4096 maximum, --crypt must be set and --cryptsalt may not be set). .TP .B --string STRING Use the characters in STRING to generate random passwords. .TP .B --verbose Display labelling information on output. .SH HISTORY .LP .B makepasswd was originally part of the .B mkircconf program used to centrally administer the Linux Internet Support Cooperative IRC network. It may potentially be of use in any situation where passwords must be secure and need not be memorized by humans. .SH COPYRIGHT .LP Copyright (c) 1997 by lilo . All rights are reserved by the author. This program may be used under the terms of version 2 of the GNU Public License. .SH "SEE ALSO" .LP .BR passwd (5) makepasswd-1.10/COPYING-2.0100600 145 145 43127 6316360420 13274 0ustar lilolilo GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.