Most viewed recipes tagged "password"http://code.activestate.com/recipes/tags/password/views/2016-01-13T00:46:40-08:00ActiveState Code RecipesPassword Grabber Javascript (JavaScript)
2008-10-26T12:00:08-07:00TheMachineCharmerhttp://code.activestate.com/recipes/users/4167676/http://code.activestate.com/recipes/576542-password-grabber-javascript/
<p style="color: grey">
JavaScript
recipe 576542
by <a href="/recipes/users/4167676/">TheMachineCharmer</a>
(<a href="/recipes/tags/dom/">dom</a>, <a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/security/">security</a>).
Revision 2.
</p>
<p>This is script coded for FUN.
You can get information in the hidden fields of web pages.</p>
Generate a salt (PHP)
2012-07-10T19:52:17-07:00Xavier L.http://code.activestate.com/recipes/users/4171602/http://code.activestate.com/recipes/576894-generate-a-salt/
<p style="color: grey">
PHP
recipe 576894
by <a href="/recipes/users/4171602/">Xavier L.</a>
(<a href="/recipes/tags/crypt/">crypt</a>, <a href="/recipes/tags/generation/">generation</a>, <a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/hash/">hash</a>, <a href="/recipes/tags/pass/">pass</a>, <a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/salt/">salt</a>, <a href="/recipes/tags/secure/">secure</a>, <a href="/recipes/tags/security/">security</a>, <a href="/recipes/tags/string/">string</a>).
Revision 6.
</p>
<p>This function will generate a salt for use with passwords ranging using characters in range a to z, A to Z, 0 to 9 and !@#$%&<em>?. The characters are sorted in a random value and can appear more than one time in the string. This way, this function is more powerful than the *shuffle()</em> function. This means that the salt could also be longer than the character list.</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>
add 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>
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>
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>
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>
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>
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>
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>
Generate an alpha-numeric password salt (PHP)
2010-02-25T14:07:08-08:00Jayesh Shethhttp://code.activestate.com/recipes/users/4173165/http://code.activestate.com/recipes/577071-generate-an-alpha-numeric-password-salt/
<p style="color: grey">
PHP
recipe 577071
by <a href="/recipes/users/4173165/">Jayesh Sheth</a>
(<a href="/recipes/tags/md5/">md5</a>, <a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/random_number/">random_number</a>, <a href="/recipes/tags/salt/">salt</a>).
</p>
<p>Generate an alpha-numeric password salt (with a default of 32 characters)</p>
Random Passwords (Python)
2010-07-27T20:28:17-07:00Danillo Souzahttp://code.activestate.com/recipes/users/4174445/http://code.activestate.com/recipes/577339-random-passwords/
<p style="color: grey">
Python
recipe 577339
by <a href="/recipes/users/4174445/">Danillo Souza</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>).
</p>
<p>Generate strong random passwords of specified length.</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>
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>
pseudo-random string (Python)
2009-04-21T18:56:01-07:00Patrick Ramseyhttp://code.activestate.com/recipes/users/4169944/http://code.activestate.com/recipes/576722-pseudo-random-string/
<p style="color: grey">
Python
recipe 576722
by <a href="/recipes/users/4169944/">Patrick Ramsey</a>
(<a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/random/">random</a>, <a href="/recipes/tags/string/">string</a>).
Revision 3.
</p>
<p>Returns a random, password-suitable string with the specified number of characters.
base64 stores 6 bits in each (8-bit) output character, hence the coefficient.</p>
A nicer password container than str (Python)
2012-06-23T18:00:21-07:00david.gaarenstroomhttp://code.activestate.com/recipes/users/4168848/http://code.activestate.com/recipes/576905-a-nicer-password-container-than-str/
<p style="color: grey">
Python
recipe 576905
by <a href="/recipes/users/4168848/">david.gaarenstroom</a>
(<a href="/recipes/tags/passwd/">passwd</a>, <a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/passwords/">passwords</a>, <a href="/recipes/tags/security/">security</a>).
Revision 3.
</p>
<p>Because I did not want to expose my passwords in plain text whenever an exception was thrown or inside the debugger, I wrote this simple snippet. It's very simple, but can be quite useful nonetheless...</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>
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>
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>