{"_id":"dumb-passwords","_rev":"3-65666a4058d711d0c52dc60f3da54280","name":"dumb-passwords","description":"Guard your users from security problems that start by having dumb passwords","dist-tags":{"latest":"0.2.1"},"versions":{"0.2.1":{"name":"dumb-passwords","version":"0.2.1","description":"Guard your users from security problems that start by having dumb passwords","main":"index.js","scripts":{"test":"gulp test","istanbul":"istanbul cover _mocha -- --recursive","lint":"eslint --fix ./lib index.js","mocha":"mocha"},"repository":{"type":"git","url":"git+https://github.com/kn9ts/dumb-passwords.git"},"keywords":["stupid","dumb","password","stupid passwords","dumb passwords","common","common passwords","security","user","user password","risks","top 10000 worst passwords"],"author":{"name":"Eugene Mutai","email":"eugenemutai@gmail.com","url":"http://twitter.com/kn9ts"},"license":"MIT","bugs":{"url":"https://github.com/kn9ts/dumb-passwords/issues","email":"eugenemutai@gmail.com"},"homepage":"https://github.com/kn9ts/dumb-passwords#readme","devDependencies":{"chai":"^3.5.0","eslint":"^2.10.2","gulp":"^3.9.1","gulp-coveralls":"^0.1.4","gulp-eslint":"^2.0.0","gulp-istanbul":"^0.10.4","gulp-mocha":"^2.2.0","istanbul":"^0.4.3","mocha":"^2.5.3","run-sequence":"^1.2.1"},"gitHead":"8f911dc9850475443d666211da672e1e62dd4459","_id":"dumb-passwords@0.2.1","_shasum":"efaba4fdc13b27d446d4b11a5f303357649ada32","_from":".","_npmVersion":"2.15.1","_nodeVersion":"4.4.4","_npmUser":{"name":"kn9ts","email":"eugenemutai@gmail.com"},"dist":{"shasum":"efaba4fdc13b27d446d4b11a5f303357649ada32","tarball":"https://registry.npmjs.org/dumb-passwords/-/dumb-passwords-0.2.1.tgz","integrity":"sha512-tk/krAwT6OAT6b/S1LjJ3CbjJwQryUfBOkqTE8jEJiaUFkcvUQ+9Isu3jgmeZiYmdsLfbs5mfj09kY+otRy5KA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAS9Ic04Z2WX3LkVmvKzOG7IlPOjsutGxiCKa81IugN2AiB5dERJhd/AouYD1py8n97kkq34BWDGgC4Q5nK4kbNZhg=="}]},"maintainers":[{"name":"kn9ts","email":"eugenemutai@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/dumb-passwords-0.2.1.tgz_1466590385125_0.3992528615053743"}}},"readme":"[![Coverage Status](https://coveralls.io/repos/github/kn9ts/dumb-passwords/badge.svg?branch=feature%2Ftests)](https://coveralls.io/github/kn9ts/dumb-passwords?branch=feature%2Ftests)\n\n![](http://res.cloudinary.com/dpmk2cnpi/image/upload/v1466589978/dumbPasswords_sxotda.png)\n\n> #### Guard your users from security problems such as being hacked that start by having dumb passwords\n\n### Introduction\n\n`dumb-passwords` is an NPM module that can be used to verify **the user provided password is\nnot one of the top 10,000 worst passwords** as analysed by a respectable IT security analyst. Read\nabout all [ here](https://xato.net/10-000-top-passwords-6d6380716fe0#.473dkcjfm),\n[here(wired)](http://www.wired.com/2013/12/web-semantics-the-ten-thousand-worst-passwords/) or\n[here(telegram)](http://www.telegraph.co.uk/technology/internet-security/10303159/Most-common-and-hackable-passwords-on-the-internet.html)\n\n### Getting Started\n\n#### Installation\n\n```bash\n$ npm install dumb-passwords --save\n```\n\n#### Usage\n\nShort example:\n\n```js\nconst dumbPasswords = require('dumb-passwords');\n\nconst isDumb = dumbPasswords.check('123456'); // true\n// or use:\n// const isDumb = dumbPasswords.checkPassword('123456');\n```\n\nEmbedding it into your [**EXPRESS**](http://expressjs.com/en/4x/api.html#app.post.method) application:\n\n```js\n'use strict';\n\nconst app = require('express')();\nconst dumbPasswords = require('dumb-passwords');\n\n...\n\napp.post('/user/create', (req, res) => {\n  const userPassword = req.body.userPassword;\n\n  if (dumbPasswords.check(userPassword)) {\n    const rate = dumbPasswords.rateOfUsage(userPassword);\n    let message = 'Dear user, that\\'s a dumb password!';\n    message += ' Why? For every 100,000 user accounts on the internet, ';\n    message += rate.frequency + ' are \"protected\" using that same password.';\n    message += ' Hacker\\'s paradise.';\n\n    // DO NOT send this back to your user, it's only for demo purposes\n    res.status(200).send(message);\n  } else {\n    // that password is awesome!\n    // that user SMART! Give them the key to success!\n  }\n});\n\n...\n\napp.listen(8080, () => {\n  console.log('Express server listening on on port 8080');\n});\n\n// expose app\nmodule.exports = app;\n```\n\n\n## API\n\n#### dumbPasswords.check(string) => true or false\n\nCheck if the string provided, representing the user's proposed submitted password is not one of the\n**top 10,000 worst passwords** users use.\n\nreturns `true` if the password is one of them and `false` if the password is not.\n\n#### dumbPasswords.rateOfUsage(string) => {password, frequency}\n\nChecks and returns the recorded usage frequency of the related password per 100,000 user passwords.\n\n```js\ndumbPasswords.rateOfUsage('superman') // { password: 'superman', frequency: 2523 }\n```\n\n### License\n\n##### [MIT](https://mit-license.org/) © [Eugene Mutai](https://github.com/kn9ts) | [Kevin Gathuku](https://github.com/kevgathuku) | [Jeremy Kithome](https://github.com/andela-jkithome)\n\n*__DISCLAIMER:__* _All opinions aired in this repo are ours and do not reflect any company or organisation any contributor is involved with._\n","maintainers":[{"name":"kn9ts","email":"eugenemutai@gmail.com"}],"time":{"modified":"2022-06-16T01:33:23.459Z","created":"2016-06-22T10:13:06.746Z","0.2.1":"2016-06-22T10:13:06.746Z"},"homepage":"https://github.com/kn9ts/dumb-passwords#readme","keywords":["stupid","dumb","password","stupid passwords","dumb passwords","common","common passwords","security","user","user password","risks","top 10000 worst passwords"],"repository":{"type":"git","url":"git+https://github.com/kn9ts/dumb-passwords.git"},"author":{"name":"Eugene Mutai","email":"eugenemutai@gmail.com","url":"http://twitter.com/kn9ts"},"bugs":{"url":"https://github.com/kn9ts/dumb-passwords/issues","email":"eugenemutai@gmail.com"},"license":"MIT","readmeFilename":"README.md"}