Popular recipes tagged "password"http://code.activestate.com/recipes/tags/password/popular/2016-01-13T00:46:40-08:00ActiveState Code Recipesadd password masking ability to getpass.getpass() (Python)
2016-01-13T00:46:40-08:00KingMakhttp://code.activestate.com/recipes/users/4193393/http://code.activestate.com/recipes/579148-add-password-masking-ability-to-getpassgetpass/
<p style="color: grey">
Python
recipe 579148
by <a href="/recipes/users/4193393/">KingMak</a>
(<a href="/recipes/tags/character/">character</a>, <a href="/recipes/tags/display/">display</a>, <a href="/recipes/tags/getpass/">getpass</a>, <a href="/recipes/tags/hiding/">hiding</a>, <a href="/recipes/tags/masking/">masking</a>, <a href="/recipes/tags/msvcrt/">msvcrt</a>, <a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/windows/">windows</a>).
</p>
<p>adding the ability to display a password masking character of the programmer's choice</p>
Random Password Generation (Python)
2014-08-10T15:50:40-07:00Paul Wolfhttp://code.activestate.com/recipes/users/4190553/http://code.activestate.com/recipes/578920-random-password-generation/
<p style="color: grey">
Python
recipe 578920
by <a href="/recipes/users/4190553/">Paul Wolf</a>
(<a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/random/">random</a>, <a href="/recipes/tags/string/">string</a>, <a href="/recipes/tags/strong/">strong</a>).
</p>
<p>Generate a password (or other secure token) using a pattern language similar to regular expressions. We'll use the <code>strgen</code> module that enables a user to generate test data, unique ids, passwords, vouchers or other randomized data very quickly using a template language. The template language is superficially similar to regular expressions but instead of defining how to match or capture strings, it defines how to generate randomized strings.</p>
System Authentication against /etc/shadow or /etc/passwd (Python)
2013-03-11T12:40:10-07:00James Millshttp://code.activestate.com/recipes/users/4167757/http://code.activestate.com/recipes/578489-system-authentication-against-etcshadow-or-etcpass/
<p style="color: grey">
Python
recipe 578489
by <a href="/recipes/users/4167757/">James Mills</a>
(<a href="/recipes/tags/authentication/">authentication</a>, <a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/system/">system</a>).
</p>
<p>Sometimes it's useful to perform System Authentication against a Local System using the /etc/shadow or /etc/passwd password databases. This recipe provides a simple function that does exactly that.</p>
Password Generator (mkpasswd) (Python)
2013-07-31T23:23:02-07:00James Millshttp://code.activestate.com/recipes/users/4167757/http://code.activestate.com/recipes/578468-password-generator-mkpasswd/
<p style="color: grey">
Python
recipe 578468
by <a href="/recipes/users/4167757/">James Mills</a>
(<a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/mkpasswd/">mkpasswd</a>, <a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/secure/">secure</a>).
Revision 3.
</p>
<p>Since everyone is posting one of these, I thought I'd post mine. I wrote this many years ago and use it everywhere.</p>
Simple Python Script to Ask & Validate Password (Python)
2013-01-19T04:04:30-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578427-simple-python-script-to-ask-validate-password/
<p style="color: grey">
Python
recipe 578427
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>This snippet of code was written as part of an article - <a href="http://thelivingpearl.com/2013/01/18/password-protecting-your-python-application/">Password Protecting You Python Application</a></p>
Code To Store Encrypted Password in a File (Python)
2013-01-19T04:07:50-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578430-code-to-store-encrypted-password-in-a-file/
<p style="color: grey">
Python
recipe 578430
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/encryption/">encryption</a>, <a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>This snippet of code was written as part of an article - <a href="http://thelivingpearl.com/2013/01/18/password-protecting-your-python-application/">Password Protecting You Python Application</a></p>
Verify Username and Password Using a File for Storage (Python)
2013-01-31T02:11:24-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578446-verify-username-and-password-using-a-file-for-stor/
<p style="color: grey">
Python
recipe 578446
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/usernames/">usernames</a>).
</p>
<p>This script was written for an article I wrote to check user passwords. It stores data using SHA one-way function. For more information <a href="http://thelivingpearl.com/2013/01/29/authentication-of-users-and-passwords-in-python/">Authentication Of Users And Passwords In Python</a></p>
Verify a Single User Name and Password in Python (Python)
2013-01-31T02:09:58-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578445-verify-a-single-user-name-and-password-in-python/
<p style="color: grey">
Python
recipe 578445
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/usernames/">usernames</a>).
</p>
<p>This script was written for an article I wrote to check user passwords. It stores data using SHA one-way function. For more information <a href="http://thelivingpearl.com/2013/01/29/authentication-of-users-and-passwords-in-python/">Authentication Of Users And Passwords In Python</a></p>
Password Request Code + Reading Password from File (Python)
2013-01-19T04:06:45-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578429-password-request-code-reading-password-from-file/
<p style="color: grey">
Python
recipe 578429
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>This snippet of code was written as part of an article - <a href="http://thelivingpearl.com/2013/01/18/password-protecting-your-python-application/">Password Protecting You Python Application</a></p>
Promot & Verify Encrypted User Password (Python)
2013-01-19T04:10:13-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578431-promot-verify-encrypted-user-password/
<p style="color: grey">
Python
recipe 578431
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/encryption/">encryption</a>, <a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>This snippet of code was written as part of an article - <a href="http://thelivingpearl.com/2013/01/18/password-protecting-your-python-application/">Password Protecting You Python Application</a>. The code requires a file with an encrypted password. The script to generate an encrypted file is <a href="http://code.activestate.com/recipes/578430-code-to-store-encrypted-password-in-a-file/">Code To Store Encrypted Password in a File</a>.</p>
Simple Script to Ask the User for a Password x Times (Python)
2013-01-19T04:05:41-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578428-simple-script-to-ask-the-user-for-a-password-x-tim/
<p style="color: grey">
Python
recipe 578428
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>This snippet of code was written as part of an article - <a href="http://thelivingpearl.com/2013/01/18/password-protecting-your-python-application/">Password Protecting You Python Application</a></p>
Very Simple Password Generator in Python (Python)
2013-01-02T14:28:34-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578395-very-simple-password-generator-in-python/
<p style="color: grey">
Python
recipe 578395
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/password_generator/">password_generator</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>A one liner password generator in python. Was writen as part of an article I wrote on <a href="http://thelivingpearl.com/2013/01/02/generating-and-checking-passwords-in-python/">generating password</a>.</p>
Simple Python Password Generator (Python)
2013-01-02T14:34:20-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578394-simple-python-password-generator/
<p style="color: grey">
Python
recipe 578394
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/password_generator/">password_generator</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>I was coding this for an article a wrote about <a href="http://thelivingpearl.com/2013/01/02/generating-and-checking-passwords-in-python/">generating passwords in python</a>.</p>
Set windows 7 to lock itself (upon timeout) if no internet connection found - security measure (Python)
2012-07-09T20:56:22-07:00commentator8http://code.activestate.com/recipes/users/4182761/http://code.activestate.com/recipes/578200-set-windows-7-to-lock-itself-upon-timeout-if-no-in/
<p style="color: grey">
Python
recipe 578200
by <a href="/recipes/users/4182761/">commentator8</a>
(<a href="/recipes/tags/lock/">lock</a>, <a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/windows_registry/">windows_registry</a>).
Revision 2.
</p>
<p>This script (or exe if using web2py with """setup(windows=['locker2.py']))""") can be run as a task in windows every x minutes and will test for the presence of an internet connection and depending on whether it is found will set windows to lock after a given timeout without user activity.</p>
<p>This was made with help from random code snippets from around the web.</p>
<p>Tested only on windows 7.</p>
Just Another Password Generator (Python)
2012-06-21T15:41:10-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/578171-just-another-password-generator/
<p style="color: grey">
Python
recipe 578171
by <a href="/recipes/users/2608421/">Stephen Chappell</a>
(<a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/passwords/">passwords</a>, <a href="/recipes/tags/password_generator/">password_generator</a>, <a href="/recipes/tags/utility/">utility</a>).
</p>
<p>The following two programs are simple examples of how one might go about creating a password generator. The first one was created several years ago and was designed to return passwords where similarly classed characters would not appear beside each other. It works but gets unbearably slow when passwords exceed about forty characters. The second program was designed with similar requirements runs considerably better. Eight-character passwords appear to have the same randomness to their construction, and this program is considerably faster than the first. Hopefully, these program design differences will be helpful to others trying to write their own password generator.</p>
Password Card Generator (Python)
2012-01-26T02:37:30-08:00userendhttp://code.activestate.com/recipes/users/4179007/http://code.activestate.com/recipes/578027-password-card-generator/
<p style="color: grey">
Python
recipe 578027
by <a href="/recipes/users/4179007/">userend</a>
(<a href="/recipes/tags/card/">card</a>, <a href="/recipes/tags/create/">create</a>, <a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/passwd/">passwd</a>, <a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/secret/">secret</a>).
</p>
<p>This project was inspired by the <a href="http://passwordcard.org" rel="nofollow">passwordcard.org</a> website. I wanted to see if I could do the same thing using Python. Select a password using this convenient card that you carry with you. </p>
Left-handed password generator (Python)
2011-10-31T12:51:14-07:00Alexhttp://code.activestate.com/recipes/users/4179771/http://code.activestate.com/recipes/577930-left-handed-password-generator/
<p style="color: grey">
Python
recipe 577930
by <a href="/recipes/users/4179771/">Alex</a>
(<a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/lefthand/">lefthand</a>, <a href="/recipes/tags/lefthanded/">lefthanded</a>, <a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/passwords/">passwords</a>).
Revision 2.
</p>
<p>Generate passwords that can easily be typed with only the left hand, very simple script</p>
Password Generator (Short Code) (Python)
2011-11-18T03:02:13-08:00Alexander James Wallarhttp://code.activestate.com/recipes/users/4179768/http://code.activestate.com/recipes/577949-password-generator-short-code/
<p style="color: grey">
Python
recipe 577949
by <a href="/recipes/users/4179768/">Alexander James Wallar</a>
(<a href="/recipes/tags/alphabet/">alphabet</a>, <a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/lambda/">lambda</a>, <a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/passwords/">passwords</a>, <a href="/recipes/tags/password_generator/">password_generator</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/secure/">secure</a>, <a href="/recipes/tags/security/">security</a>, <a href="/recipes/tags/short_code/">short_code</a>).
Revision 2.
</p>
<p>This recipe generates a pseudo-random password of a prescribed length. It also lets you specify what characters are not permitted in the password or specify what characters are.</p>
Password Generator (Python)
2011-10-14T13:35:21-07:00Alexander Thomas Cruzhttp://code.activestate.com/recipes/users/4179528/http://code.activestate.com/recipes/577905-password-generator/
<p style="color: grey">
Python
recipe 577905
by <a href="/recipes/users/4179528/">Alexander Thomas Cruz</a>
(<a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/randomization/">randomization</a>).
Revision 4.
</p>
<p>Generates a really strong and secure password. It uses multiple characters and symbols. Remember to score please! It really means a lot to me. Revision 4 includes an input so you can choose how many characters you want your password to have. It is also faster due to a suggestion by Garel Alex. Thanks!</p>
Secure Password Generator (Python)
2011-06-17T15:25:20-07:00amir naghavihttp://code.activestate.com/recipes/users/4177294/http://code.activestate.com/recipes/577759-secure-password-generator/
<p style="color: grey">
Python
recipe 577759
by <a href="/recipes/users/4177294/">amir naghavi</a>
(<a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/random/">random</a>).
</p>
<p>A password generator that uses OS facilities to generate none pseudo random numbers.
the SystemRandom uses CryptGenRandom in Windows and /dev/random in linux and it is so better to use this to create random numbers in cryptography or any other security areas.</p>