abbot / pwdhash Goto Github PK
View Code? Open in Web Editor NEWStanford PwdHash port to python, usable as library or as a console script.
License: BSD 3-Clause "New" or "Revised" License
Stanford PwdHash port to python, usable as library or as a console script.
License: BSD 3-Clause "New" or "Revised" License
Hi,
under what license is this project published? Can you attach LICENSE.TXT or something like that ("'License :: OSI Approved :: BSD License'," in config.py isn't enough)?
Without this IMO I can't fork it and modify.
Wiktor
pwdhash.py will check my environment and, if I'm running X, will default to copying password to clipboard.
Please offer a command-line option to allow me to force "No, please copy to the screen instead."
Copying from #2, something roughly like:
def mangle(s): return "".join(chr(ord(x) & 0xff) for x in s)
def generate(password, uri):
"""
generate the pwdhash password for master password and uri or
domain name.
"""
realm = extract_domain(uri)
if password.startswith(_password_prefix):
password = password[len(_password_prefix):]
password_hash = b64_hmac_md5(mangle(password), realm)
size = len(password) + len(_password_prefix)
nonalphanumeric = len(re.findall(r'\W', password)) != 0
return apply_constraints(password_hash, size, nonalphanumeric)
➜ ~ echo "test" | xclip -i
➜ ~ pwdhash google.com
Password for google.com:
Password was copied to clipboard.
➜ ~ xclip -o
test
I downloaded pwdhash-master.zip
and unzipped it, but I'm not sure what is the best way to install pwdhash.py
. This is on "Bash on Ubuntu on Windows" (aka "Windows Subsystem for Linux"), which includes python, but no python-setuptools. What do you recommend?
Thank you!
kousu gave at heads up that:
digestmod: A module supporting PEP 247. *OR*
A hashlib constructor returning a new hash object. *OR*
A hash name suitable for hashlib.new().
Defaults to hashlib.md5.
Implicit default to hashlib.md5 is deprecated and will be
removed in Python 3.6.
So instead of relying on MD5 being the default for hashlib, explicitly call hashlib constructor with md5 digest module/object/whatever.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.