├── .firebase ├── hosting.YnVpbGQ.cache └── hosting.cHVibGlj.cache ├── .firebaserc ├── .gitignore ├── README.md ├── firebase.json ├── package-lock.json ├── package.json ├── public ├── android-chrome-192x192.png ├── android-chrome-512x512.png ├── apple-touch-icon.png ├── favicon-16x16.png ├── favicon-32x32.png ├── favicon.ico ├── firefav.png ├── index.html ├── logo192.png ├── logo512.png ├── manifest.json └── robots.txt ├── src ├── App.js ├── App.test.js ├── LoadingButton.js ├── SignIn.js ├── config.js ├── index.css ├── index.js ├── logo.svg ├── reportWebVitals.js └── setupTests.js └── wina /.firebase/hosting.YnVpbGQ.cache: -------------------------------------------------------------------------------- 1 | android-chrome-192x192.png,1619317119624,c0f241e1f6c95008188f5d3b73d5988bed9debedb1c1603c8458fae195d64e5c 2 | android-chrome-512x512.png,1619317119651,9aef3ebce16b113b4cf3ad7a9af4cb9d4c4e7b4f4767ac380557c971bec28b2b 3 | apple-touch-icon.png,1619317119678,fe7bd3b80c8ed05158a489792c750733b57f8637dd4289e69f3dcbd3c4af9af8 4 | favicon-16x16.png,1619317119711,b2ef6fe4379ad86b3edee9ee69dff93e2b742b6173b94b91b3edf6dd5098e1a0 5 | favicon-32x32.png,1619317119740,678b0d28dd532cb5f001fb715f4aa90c18ed51fb4303537c84353506bd7a68be 6 | favicon.ico,1619317124891,107e6d6056684c68bcbcf1f7449570155bfb1c956255a81f9d0041619835df2d 7 | firefav.png,1619316806664,043b82c8dd8b0523a44d6fe4df706cb36eff302073e5d2f07b3174b97a752c3a 8 | logo192.png,499162500000,3ee59515172ee198f3be375979df15ac5345183e656720a381b8872b2a39dc8b 9 | logo512.png,499162500000,ee7e2f3fdb8209c4b6fd7bef6ba50d1b9dba30a25bb5c3126df057e1cb6f5331 10 | manifest.json,1619356422669,99466a14afa44b4308a9eaf6e89855db0277c799c29a9eba565674ddc429573a 11 | robots.txt,499162500000,bfe106a3fb878dc83461c86818bf74fc1bdc7f28538ba613cd3e775516ce8b49 12 | static/css/2.86a5f087.chunk.css,1619794906721,02e09191a17ca6f448a379a83c6389adc6fbfedc8a8537a594f11d30d4d8ba5e 13 | asset-manifest.json,1619794906730,b338f188158e656433e5421242daa4661ff5ee3ffdc0861defa188103d2bf3bf 14 | index.html,1619794906730,5b7321f82c444f169260d4f14b2ebe1c36fbc1809138fb86cbc3f37dd0e79d75 15 | static/css/main.6dea0f05.chunk.css,1619794906721,c499cef8b35c8caab7450541cedc21daa38efe1be0cc8e177b8e1ed3fe3a21ce 16 | static/css/2.86a5f087.chunk.css.map,1619794906727,4a639abfc5453d60d2bfb9beb06b59e63faf9c9e1d5cc1de560aa2a87eb0e9db 17 | static/css/main.6dea0f05.chunk.css.map,1619794906725,3ab83225cf1664f4cc84e22963e3d093c935fb6a5634f1dcf099a70ffc58d1b8 18 | static/js/2.15ec0929.chunk.js.LICENSE.txt,1619794906721,1c3435ae8fd2470cab2cc0c59fc7cf51e61ff2ac5784f0b4a22f5feff8253a88 19 | static/js/3.4cfc7a13.chunk.js,1619794906721,5a5e900126e4b8abe0b12b54ea553c528104c6e4e9a13b1f3a2e8ff934024b3a 20 | static/js/3.4cfc7a13.chunk.js.map,1619794906730,87d4b26452774775d23a759042cd0b5b29c7c6ed2440673eadb45f4302115bed 21 | static/js/runtime-main.d41e1676.js,1619794906721,5df41f80586c4ac047a33978d0584f3bfb63fa577aefe36ae2a83ac4d71cd5bd 22 | static/js/runtime-main.d41e1676.js.map,1619794906730,a1371a185ef8e148f7912012f5e2bb1cbdef4f30106516446380b66e6ffe165c 23 | static/js/main.750a9625.chunk.js,1619794906721,8320622abb57691a3e57329d421bb61277223fd23ca8588a5bf61b044c34a1d0 24 | static/media/roboto-cyrillic-400-normal.3605d18d.woff2,1619794906721,be3b5fe5f394dbfd0dadffe05a0f4e4cccc31a5caf44d966b84b752d6096a07e 25 | static/media/roboto-cyrillic-ext-400-normal.dd55ea0a.woff2,1619794906721,3d42f08d89a26c99edbdd4933ed49962a8affd0bb33dc874d148d1e745e7fa1f 26 | static/media/roboto-greek-ext-400-normal.bc7ace6e.woff2,1619794906721,7196a885bd3d609ccb3895d05c108f22c36760638aecc4f09feaf37d12577468 27 | static/media/roboto-greek-400-normal.352cc77a.woff2,1619794906725,11bf2c29acabfea6b3ee5b731f7c31df43faa585be556c6bd3e23f93dee4403e 28 | static/js/main.750a9625.chunk.js.map,1619794906727,9566cb63b091a27bb53517fe3be4e71717c04c2fb6b2d57e5a36cabe1dd9b840 29 | static/media/roboto-latin-ext-400-normal.dcc07bcf.woff2,1619794906721,c89213b3bcd21e368b330cabbca887024d2ac6ab88e1cb211aefd4fc8736b633 30 | static/media/roboto-latin-400-normal.176f8f5b.woff2,1619794906721,1596ae174c081773f1166bb0f34344564390a8ea01d7e4e5bbae6dc0f4af851c 31 | static/media/roboto-vietnamese-400-normal.52cebac0.woff2,1619794906721,36266a116330efbc4b3ee52d6061c0f37d7101a55f7a0b613096412e50aa121c 32 | static/media/roboto-all-400-normal.b5a0a0df.woff,1619794906716,636f3ea5f4b9d5d0731a796f609cd10be426891bcc1406c964d566e083f99827 33 | static/js/2.15ec0929.chunk.js,1619794906725,f862cb15ec890d6d0dea953cd80806def9c9325b1240bd02c3d58057c751692c 34 | static/js/2.15ec0929.chunk.js.map,1619794906730,f6d6de32ecfc055e39204d3d24f76f3777f3a5c0e39da567392ffd7726ae67d3 35 | -------------------------------------------------------------------------------- /.firebase/hosting.cHVibGlj.cache: -------------------------------------------------------------------------------- 1 | manifest.json,499162500000,aff3449bdc238776f5d6d967f19ec491b36aed5fb7f23ccff6500736fd58494a 2 | robots.txt,499162500000,bfe106a3fb878dc83461c86818bf74fc1bdc7f28538ba613cd3e775516ce8b49 3 | index.html,1619192057132,73b301f756c2f16aa8bd6cba3cae532278abd8fff1fa3e4e984a8da8036b217b 4 | favicon.ico,499162500000,eae62e993eb980ec8a25058c39d5a51feab118bd2100c4deebb2a9c158ec11f9 5 | logo512.png,499162500000,ee7e2f3fdb8209c4b6fd7bef6ba50d1b9dba30a25bb5c3126df057e1cb6f5331 6 | logo192.png,499162500000,3ee59515172ee198f3be375979df15ac5345183e656720a381b8872b2a39dc8b 7 | -------------------------------------------------------------------------------- /.firebaserc: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "default": "passwordhell" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Password From Hell 2 | 3 | This site is live to play at [passwordfromhell.com](https://passwordfromhell.com/). I'd Recomend playing it first to get an idea of the password requirements. After that the relvant parts of the game can be found in [SignIn.js](src/SignIn.js). I've commented each section to help if you're looking to learn before you do I'd reccomend reading or little bit about regular expressions (regEx) or you won't understand most of it. 4 | 5 | ## The games creation 6 | 7 | I was inspired to make this by the sites who despite holding no sensisitve information, are still arrogant enough to think their website needs you to come up with a 12 character password and update it every 6 months. 8 | 9 | The game itself was made in react using material ui. This is the style framework google uses so it allowed me to get thier exact sign in form as a template. Using react for this is really overkill but getting the sign in form looking absolutely perfect is essential for such a small project so I went for it. 10 | 11 | 12 | -------------------------------------------------------------------------------- /firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "public": "build", 4 | "ignore": [ 5 | "firebase.json", 6 | "**/.*", 7 | "**/node_modules/**" 8 | ], 9 | "rewrites": [ 10 | { 11 | "source": "**", 12 | "destination": "/index.html" 13 | } 14 | ] 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "password-hell", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@material-ui/core": "^4.11.3", 7 | "@material-ui/lab": "*", 8 | "@testing-library/jest-dom": "^5.12.0", 9 | "@testing-library/react": "^11.2.6", 10 | "@testing-library/user-event": "^12.8.3", 11 | "firebase": "^8.4.2", 12 | "fontsource-roboto": "^4.0.0", 13 | "lodash": "^4.17.21", 14 | "react": "^17.0.2", 15 | "react-dom": "^17.0.2", 16 | "react-scripts": "4.0.3", 17 | "string-unified": "^2.0.0", 18 | "web-vitals": "^1.1.1" 19 | }, 20 | "scripts": { 21 | "start": "react-scripts start", 22 | "build": "react-scripts build", 23 | "test": "react-scripts test", 24 | "eject": "react-scripts eject" 25 | }, 26 | "eslintConfig": { 27 | "extends": [ 28 | "react-app", 29 | "react-app/jest" 30 | ] 31 | }, 32 | "browserslist": { 33 | "production": [ 34 | ">0.2%", 35 | "not dead", 36 | "not op_mini all" 37 | ], 38 | "development": [ 39 | "last 1 chrome version", 40 | "last 1 firefox version", 41 | "last 1 safari version" 42 | ] 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /public/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jacobmakes/PasswordFromHell/09eeeccb924a2a27cd92933192cc79d7818eb90c/public/android-chrome-192x192.png -------------------------------------------------------------------------------- /public/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jacobmakes/PasswordFromHell/09eeeccb924a2a27cd92933192cc79d7818eb90c/public/android-chrome-512x512.png -------------------------------------------------------------------------------- /public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jacobmakes/PasswordFromHell/09eeeccb924a2a27cd92933192cc79d7818eb90c/public/apple-touch-icon.png -------------------------------------------------------------------------------- /public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jacobmakes/PasswordFromHell/09eeeccb924a2a27cd92933192cc79d7818eb90c/public/favicon-16x16.png -------------------------------------------------------------------------------- /public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jacobmakes/PasswordFromHell/09eeeccb924a2a27cd92933192cc79d7818eb90c/public/favicon-32x32.png -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jacobmakes/PasswordFromHell/09eeeccb924a2a27cd92933192cc79d7818eb90c/public/favicon.ico -------------------------------------------------------------------------------- /public/firefav.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jacobmakes/PasswordFromHell/09eeeccb924a2a27cd92933192cc79d7818eb90c/public/firefav.png -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 28 | 29 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | Password Hell 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 |
49 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jacobmakes/PasswordFromHell/09eeeccb924a2a27cd92933192cc79d7818eb90c/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jacobmakes/PasswordFromHell/09eeeccb924a2a27cd92933192cc79d7818eb90c/public/logo512.png -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Password Hell", 3 | "name": "Password from Hell", 4 | "icons": [ 5 | { 6 | "src":"/android-chrome-192x192.png", 7 | "sizes":"192x192", 8 | "type":"image/png" 9 | }, 10 | { 11 | "src":"/android-chrome-512x512.png", 12 | "sizes":"512x512", 13 | "type":"image/png" 14 | } 15 | ], 16 | "start_url": ".", 17 | "display": "standalone", 18 | "theme_color": "#000000", 19 | "background_color": "#ffffff" 20 | } 21 | 22 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | 2 | import Container from '@material-ui/core/Container'; 3 | import SignIn from './SignIn'; 4 | 5 | 6 | function App() { 7 | 8 | 9 | return ( 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 |
20 | 21 | 22 |
23 | ); 24 | } 25 | 26 | export default App; 27 | -------------------------------------------------------------------------------- /src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /src/LoadingButton.js: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import clsx from 'clsx'; 4 | import { chainPropTypes } from '@material-ui/utils'; 5 | import { capitalize } from '@material-ui/core/utils'; 6 | import { withStyles } from '@material-ui/core/styles'; 7 | import Button from '@material-ui/core/Button'; 8 | import CircularProgress from '@material-ui/core/CircularProgress'; 9 | 10 | export const styles = () => ({ 11 | /* Styles applied to the root element. */ 12 | root: {}, 13 | /* Styles applied to the root element if `loading={true}`. */ 14 | loading: {}, 15 | /* Styles applied to the loadingIndicator element. */ 16 | loadingIndicator: { 17 | position: 'absolute', 18 | visibility: 'visible', 19 | display: 'flex', 20 | }, 21 | /* Styles applied to the loadingIndicator element if `loadingPosition="center"`. */ 22 | loadingIndicatorCenter: { 23 | left: '50%', 24 | transform: 'translate(-50%)', 25 | }, 26 | /* Styles applied to the loadingIndicator element if `loadingPosition="start"`. */ 27 | loadingIndicatorStart: { 28 | left: 14, 29 | }, 30 | /* Styles applied to the loadingIndicator element if `loadingPosition="end"`. */ 31 | loadingIndicatorEnd: { 32 | right: 14, 33 | }, 34 | /* Styles applied to the endIcon element if `loading={true}` and `loadingPosition="end"`. */ 35 | endIconLoadingEnd: { 36 | visibility: 'hidden', 37 | }, 38 | /* Styles applied to the startIcon element if `loading={true}` and `loadingPosition="start"`. */ 39 | startIconLoadingStart: { 40 | visibility: 'hidden', 41 | }, 42 | /* Styles applied to the label element if `loading={true}` and `loadingPosition="center"`. */ 43 | labelLoadingCenter: { 44 | visibility: 'hidden', 45 | }, 46 | }); 47 | 48 | const LoadingIndicator = ; 49 | 50 | const LoadingButton = React.forwardRef(function LoadingButton(props, ref) { 51 | const { 52 | children, 53 | classes, 54 | className, 55 | disabled = false, 56 | loading = false, 57 | loadingIndicator = LoadingIndicator, 58 | loadingPosition = 'center', 59 | ...other 60 | } = props; 61 | 62 | return ( 63 | 93 | ); 94 | }); 95 | 96 | LoadingButton.propTypes /* remove-proptypes */ = { 97 | // ----------------------------- Warning -------------------------------- 98 | // | These PropTypes are generated from the TypeScript type definitions | 99 | // | To update them edit the d.ts file and run "yarn proptypes" | 100 | // ---------------------------------------------------------------------- 101 | /** 102 | * The content of the component. 103 | */ 104 | children: PropTypes.node, 105 | /** 106 | * Override or extend the styles applied to the component. 107 | */ 108 | classes: PropTypes.object, 109 | /** 110 | * @ignore 111 | */ 112 | className: PropTypes.string, 113 | /** 114 | * If `true`, the component is disabled. 115 | * @default false 116 | */ 117 | disabled: PropTypes.bool, 118 | /** 119 | * If `true`, the loading indicator is shown. 120 | * @default false 121 | */ 122 | loading: PropTypes.bool, 123 | /** 124 | * Element placed before the children if the button is in loading state. 125 | * @default 126 | */ 127 | loadingIndicator: PropTypes.node, 128 | /** 129 | * The loading indicator can be positioned on the start, end, or the center of the button. 130 | * @default 'center' 131 | */ 132 | loadingPosition: chainPropTypes(PropTypes.oneOf(['start', 'end', 'center']), (props) => { 133 | if (props.loadingPosition === 'start' && !props.startIcon) { 134 | return new Error( 135 | `Material-UI: The loadingPosition="start" should be used in combination with startIcon.`, 136 | ); 137 | } 138 | if (props.loadingPosition === 'end' && !props.endIcon) { 139 | return new Error( 140 | `Material-UI: The loadingPosition="end" should be used in combination with endIcon.`, 141 | ); 142 | } 143 | return null; 144 | }), 145 | }; 146 | 147 | export default withStyles(styles, { name: 'MuiLoadingButton' })(LoadingButton); -------------------------------------------------------------------------------- /src/SignIn.js: -------------------------------------------------------------------------------- 1 | 2 | import Avatar from '@material-ui/core/Avatar'; 3 | import LoadingButton from './LoadingButton'; 4 | import CssBaseline from '@material-ui/core/CssBaseline'; 5 | import TextField from '@material-ui/core/TextField'; 6 | import Link from '@material-ui/core/Link'; 7 | import Grid from '@material-ui/core/Grid'; 8 | import Box from '@material-ui/core/Box'; 9 | import Typography from '@material-ui/core/Typography'; 10 | import { makeStyles } from '@material-ui/core/styles'; 11 | import Container from '@material-ui/core/Container'; 12 | import { useState } from 'react'; 13 | import {split as Lsplit } from "string-unified"; 14 | import Dialog from '@material-ui/core/Dialog'; 15 | import DialogContent from '@material-ui/core/DialogContent'; 16 | import DialogContentText from '@material-ui/core/DialogContentText'; 17 | import DialogTitle from '@material-ui/core/DialogTitle'; 18 | import { ana } from './config' 19 | 20 | function Copyright() { 21 | return ( 22 | 23 | {'Copyright © '} 24 | 25 | Jacob Turner 26 | {' '} 27 | {new Date().getFullYear()} 28 | {'.'} 29 | 30 | ); 31 | } 32 | 33 | const useStyles = makeStyles((theme) => ({ 34 | paper: { 35 | marginTop: theme.spacing(8), 36 | display: 'flex', 37 | flexDirection: 'column', 38 | alignItems: 'center', 39 | }, 40 | avatar: { 41 | margin: theme.spacing(1), 42 | backgroundColor: theme.palette.secondary.main, 43 | }, 44 | form: { 45 | width: '100%', // Fix IE 11 issue. 46 | marginTop: theme.spacing(1), 47 | }, 48 | submit: { 49 | margin: theme.spacing(3, 0, 2), 50 | }, 51 | })); 52 | 53 | 54 | 55 | export default function SignIn() { 56 | const classes = useStyles(); 57 | const [pass, setPass] = useState(''); 58 | const [errmsg, setErrmsg]=useState('') 59 | const [hardMode, setHardMode]=useState('text') 60 | const [hasWon, setHasWon]=useState(false) 61 | const [open, setOpen]=useState(false) 62 | const[hm,setHm]=useState('Hard Mode?') 63 | let hardwin= false; 64 | 65 | 66 | const handleChange = (event) => { 67 | setPass(event.target.value); 68 | }; 69 | 70 | const handleSubmit = e =>{ 71 | e.preventDefault(); 72 | let newerr=checkpass(pass) 73 | setErrmsg(newerr); 74 | if(newerr==='checking password'){win();} 75 | 76 | } 77 | const hardClicked = e =>{ 78 | if(!errmsg){hardwin=true;} 79 | 80 | if(hardMode ==='text'){setHardMode('password'); setHm('Easy mode?');} 81 | else{setHardMode('text'); setHm('Hard mode?');} 82 | 83 | } 84 | function win(){ 85 | setHasWon(true); 86 | setTimeout(()=>{ 87 | setOpen(true); 88 | setHasWon(false);} 89 | ,3000); 90 | 91 | } 92 | function handleClose() { 93 | setOpen(false); 94 | } 95 | 96 | 97 | return ( 98 | 99 | 100 |
101 | 102 | 103 | 104 | Sign in 105 | 106 |
107 | 108 | 123 | 124 | 132 | Sign In 133 | 134 | 135 | 136 | 137 | {hm} 138 | 139 | 140 | 141 | 142 | 143 |
144 | 145 | 146 | 147 | 153 | {"Secure password chosen"} 154 | 155 | 156 | We'll E-mail you in 3 weeks to reset your password to a more secure one. 157 | 158 | 159 | 160 |
161 | ); 162 | } 163 | const top1000 = ['puzzle', 'game', 'password hell', 'impossible puzzle', 'password requirements', 'password','123456','12345678','1234','qwerty','12345','dragon','baseball','football','letmein','monkey','696969','abc123','mustang','michael','shadow','master','jennifer','111111','2000','jordan','superman','harley','1234567','hunter','fuckyou','trustno1','ranger','buster','thomas','tigger','robert','soccer','fuck','batman','test','pass','hockey','george','charlie','andrew','michelle','love','sunshine','jessica','6969','pepper','daniel','access','123456789','654321','joshua','maggie','starwars','silver','william','dallas','yankees','123123','ashley','666666','hello','amanda','orange','biteme','freedom','computer','thunder','nicole','ginger','heather','hammer','summer','corvette','taylor','fucker','austin','1111','merlin','matthew','121212','golfer','cheese','princess','martin','chelsea','patrick','richard','diamond','yellow','bigdog','secret','asdfgh','sparky','cowboy','camaro','anthony','matrix','falcon','iloveyou','bailey','guitar','jackson','purple','scooter','phoenix','aaaaaa','morgan','tigers','porsche','mickey','maverick','cookie','nascar','peanut','justin','131313','money','samantha','panties','steelers','joseph','snoopy','boomer','whatever','iceman','smokey','gateway','dakota','cowboys','eagles','chicken','black','zxcvbn','please','andrea','ferrari','knight','melissa','compaq','coffee','booboo','johnny','bulldog','xxxxxx','welcome','james','player','ncc1701','wizard','scooby','charles','junior','internet','mike','brandy','tennis','banana','monster','spider','lakers','miller','rabbit','enter','mercedes','brandon','steven','fender','john','yamaha','diablo','chris','boston','tiger','marine','chicago','rangers','gandalf','winter','barney','edward','raiders','johnson','chester','london','midnight','blue','fishing','000000','hannah','slayer','11111111','rachel','redsox','thx1138','asdf','marlboro','panther','zxcvbnm','arsenal','oliver','qazwsx','mother','victoria','7777777','jasper','angel','david','winner','crystal','golden','butthead','viking','jack','iwantu','shannon','murphy','angels','prince','cameron','girls','madison','wilson','carlos','willie','startrek','captain','maddog','jasmine','butter','booger','angela','golf','lauren','rocket','tiffany','theman','dennis','liverpoo','flower','forever','green','jackie','muffin','turtle','sophie','danielle','redskins','toyota','jason','sierra','winston','debbie','giants','packers','newyork','jeremy','casper','bubba','112233','sandra','lovers','mountain','united','cooper','driver','tucker','helpme','pookie','lucky','maxwell','bear','gators','5150','222222','jaguar','monica','fred','happy','hotdog','gemini','lover','777777','canada','nathan','victor','florida','88888888','nicholas','rosebud','metallic','doctor','trouble','success','stupid','tomcat','warrior','peaches','apples','fish','qwertyui','magic','buddy','dolphins','rainbow','gunner','987654','freddy','alexis','braves','2112','1212','cocacola','xavier','dolphin','testing','bond007','member','calvin','voodoo','7777','samson','alex','apollo','fire','tester','walter','beavis','voyager','peter','bonnie','rush2112','beer','apple','scorpio','jonathan','skippy','sydney','scott','red123','power','gordon','travis','beaver','star','jackass','flyers','232323','zzzzzz','steve','rebecca','scorpion','doggie','legend','ou812','yankee','blazer','bill','runner','birdie','bitches','555555','parker','topgun','asdfasdf','heaven','viper','animal','2222','bigboy','4444','arthur','baby','private','godzilla','donald','williams','lifehack','phantom','dave','rock','august','sammy','cool','brian','platinum','jake','bronco','paul','mark','frank','heka6w2','copper','billy','garfield','willow','little','carter','albert','69696969','kitten','super','jordan23','eagle1','shelby','america','11111','jessie','house','free','123321','chevy','bullshit','white','broncos','surfer','nissan','999999','saturn','airborne','elephant','marvin','shit','action','adidas','qwert','kevin','1313','explorer','walker','police','christin','december','benjamin','wolf','sweet','therock','king','online','brooklyn','teresa','cricket','sharon','dexter','racing','gregory','0000','teens','redwings','dreams','michigan','magnum','87654321','nothing','donkey','trinity','digital','333333','stella','cartman','guinness','123abc','speedy','buffalo','kitty','pimpin','eagle','einstein','kelly','nelson','nirvana','vampire','xxxx','playboy','louise','pumpkin','snowball','test123','girl','sucker','mexico','beatles','fantasy','ford','gibson','celtic','marcus','cherry','cassie','888888','natasha','sniper','chance','genesis','hotrod','reddog','alexande','college','jester','passw0rd','smith','lasvegas','carmen','slipknot','3333','death','kimberly','1q2w3e','eclipse','1q2w3e4r','stanley','samuel','drummer','homer','montana','music','aaaa','spencer','jimmy','carolina','colorado','creative','hello1','rocky','goober','friday','scotty','abcdef','bubbles','hawaii','fluffy','mine','stephen','horses','thumper','5555','pussies','darkness','asdfghjk','pamela','boobies','buddha','vanessa','sandman','naughty','douglas','honda','matt','azerty','6666','shorty','money1','beach','loveme','4321','simple','poohbear','444444','badass','destiny','sarah','denise','vikings','lizard','melanie','assman','sabrina','nintendo','water','good','howard','time','123qwe','november','xxxxx','october','leather','young','101010','extreme','hard','password1','vincent','lacrosse','hotmail','spooky','amateur','alaska','badger','paradise','maryjane','crazy','mozart','video','russell','spitfire','anderson','norman','eric','cherokee','cougar','barbara','long','420420','family','horse','enigma','allison','raider','brazil','blonde','jones','55555','dude','drowssap','jeff','school','marshall','lovely','1qaz2wsx','jeffrey','caroline','franklin','molly','snickers','leslie','nipples','courtney','diesel','rocks','eminem','westside','suzuki','daddy','passion','hummer','ladies','zachary','frankie','elvis','reggie','alpha','suckme','simpson','patricia','147147','pirate','tommy','semperfi','jupiter','redrum','freeuser','wanker','stinky','ducati','paris','natalie','babygirl','bishop','windows','spirit','pantera','monday','patches','brutus','houston','smooth','penguin','marley','forest','cream','212121','flash','maximus','bobby','bradley','vision','pokemon','champion','fireman','indian','softball','picard','system','clinton','cobra','enjoy','lucky1','claire','claudia','boogie','timothy','marines','security','dirty','admin','wildcats','dancer','hardon','veronica','abcd1234','abcdefg','ironman','wolverin','remember','great','freepass','bigred','justice','francis','hobbes','kermit','pearljam','mercury','domino','9999','denver','brooke','rascal','hitman','mistress','simon','tony','bbbbbb','friend','peekaboo','budlight','electric','sluts','stargate','saints','brittany','bigman','zombie','swimming','duke','qwerty1','babes','scotland','disney','rooster','brenda','mookie','swordfis','candy','duncan','olivia','hunting','blink182','alicia','8888','samsung','bubba1','whore','virginia','general','passport','aaaaaaaa','liberty','arizona','jesus','abcd','newport','skipper','rolltide','balls','happy1','galore','christ','weasel','242424','wombat','digger','classic','bulldogs','poopoo','accord','popcorn','turkey','jenny','amber','bunny','mouse','007007','titanic','liverpool','dreamer','everton','friends','chevelle','carrie','gabriel','psycho','nemesis','burton','pontiac','connor','eatme','lickme','roland','mitchell','ireland','lincoln','arnold','spiderma','patriots','goblue','devils','eugene','empire','asdfg','cardinal','brown','shaggy','froggy','qwer','kawasaki','kodiak','people','phpbb','light','54321','kramer','chopper','honey','whynot','lesbian','lisa','baxter','adam','snake','teen','ncc1701d','qqqqqq','airplane','britney','avalon','sandy','sugar','sublime','stewart','wildcat','raven','scarface','elizabet','123654','trucks','wolfpack','pervert','lawrence','raymond','redhead','american','alyssa','bambam','movie','woody','shaved','snowman','tiger1','chicks','raptor','1969','stingray','shooter','france','stars','madmax','kristen','sports','jerry','789456','garcia','simpsons','lights','ryan','looking','chronic','alison','hahaha','packard','hendrix','perfect','service','spring','srinivas','spike','katie','252525','oscar','brother','bigmac','suck','single','cannon','georgia','popeye','tattoo','texas','party','bullet','taurus','sailor','wolves','panthers','japan','strike','flowers','pussycat','chris1','loverboy','berlin','sticky','marina','tarheels','fisher','russia','connie','wolfgang','testtest','mature','bass','catch22','juice','michael1','nigger','159753','women','alpha1','trooper','hawkeye','head','freaky','dodgers','pakistan','machine','pyramid','vegeta','katana','moose','tinker','coyote','infinity','inside','pepsi','letmein1','bang','control']; 164 | 165 | 166 | function checkpass(t){ //t password input as a string 167 | 168 | // we'll use t = '👨🏾‍🍳pÂs👩🏿‍🦳' as our example string 169 | 170 | //complex unicode characters are made up of the basic elements and modifiers 171 | //for example: Â has the base A and the ◌̂ that modifies it. 172 | 173 | const au =t.split(''); 174 | //this basic split function. splits the string into an array of unicode characters and modifiers 175 | //example output: ["\ud83d","\udc68","\ud83c","\udffe","‍","\ud83c","\udf73","p","A","̂","s","\ud83d","\udc69","\ud83c","\udfff","‍","\ud83e","\uddb3"] 176 | //5 characters turn into 18 177 | 178 | const a = [...t]; 179 | //this es6 version does slightly better but still can't manage complex emojis 180 | //["👨","🏾","‍","🍳","p","A","̂","s","👩","🏿","‍","🦳" ] length 12 181 | // black chef becomes: man, black skin, frying pan 182 | 183 | const abest= Lsplit(t, ''); 184 | //this 3rd party library is the best I could find but still struggles to split some emojis 185 | //[ "👨🏾‍🍳", "p", "Â", "s", "👩🏿‍", "🦳" ] length 6 186 | 187 | console.log(t,a,au,abest); 188 | 189 | const ar = abest.reverse(); 190 | let lowcount=0; //lower case 191 | let letcount=0; //all letters 192 | 193 | //regular expressions or regex are a way to search through text 194 | // /A/ matches a capital A. [a-z] matches all lower case letters 195 | 196 | a.forEach(e=>{ if(e.match(/[a-z]/)){ lowcount++;}}); 197 | a.forEach(e=>{ if(e.match(/[a-zA-Z]/)){ letcount++;}}); 198 | 199 | 200 | ana.logEvent('sign in clicked'); //google analytics 201 | if(a.length<6){return 'Your password must be at least 6 characters long'} 202 | if(a.length>255){return 'Your password cannot be longer than 255 characters'} 203 | if(t.match(/\s/u)){return 'Your password cannot contain spaces'} 204 | // in reg ex some letters have special functions when escaped with a backslash. \s means white space 205 | if(lowcount <1){return 'Your password must contain a lower case letter'} 206 | if(!t.match(/\d/u)){return 'Your password must contain a number'} //notice ! for if no number matches 207 | if(!t.match(/[A-Z]/u)){return 'Your password must contain a capital letter'} 208 | ana.logEvent('symbol reached'); //google analytics 209 | if(!t.match(/[^a-zA-Z0-9]/u)){return 'Your password must contain a symbol'} 210 | // here ^ acts like the regex not ! symbol 211 | if(t.match(/I/u)){return 'Your password cannot contain a capital I'} 212 | if(t.match(/A/u)){return 'Your password cannot contain a capital A'} 213 | if(a.length<10){return 'Your password must be at least 10 characters long'} 214 | if(t.match(/(.)\1/u)){return 'Your password cannot contain two identical characters in a row'} 215 | //the dot . means a match for any character 216 | //brackets () means a group 217 | // an escaped number \1 refers to that group. 218 | //so this expression says any letter can be the first character and then if the following character is the same match it 219 | if(ar.length>43){return 'Your password cannot be longer than 43 characters'} 220 | if(top1000.find(e=>t.includes(e)) !==undefined){return 'Your password cannot contain a common password'} 221 | if(letcount <8 ){return 'Your password must contain at least 8 letters'} 222 | if(!t.match(/[\u0370-\u03FF]/u)){return 'Your password must contain a greek letter'} 223 | //unicode has a series of character blocks. The range here is all the greek letters 224 | //notice the /u, this means match unicode characters 225 | ana.logEvent('greek letter completed'); //google analytics 226 | if(!t.match(/[🌍-🛌🏿]/u)){return 'Your password must contain an emoji'} 227 | //this doesn't actually include all emojis because they are spaced out throughout unicode 228 | ana.logEvent('emoji completed'); 229 | if(!t.match(/8675309/u)){return 'Your password needs Jenny\'s number'} 230 | ana.logEvent('jenny completed'); 231 | if(au.includes('\uddb1')){return 'Your emojis cannot have curly hair'} 232 | if(au.includes('\uddb0')){return 'Your emojis cannot have ginger hair'} 233 | if(au.includes('\uddb3')){return 'Your emojis cannot have white hair'} 234 | //The au variable is the array of word split completely into unicode characters and modifiers 235 | //this means the hair colour modifier is split from the single emoji character and can be checked 236 | 237 | 238 | if(au.join('') !== ar.join('') ){return 'Your password must be a palindrome'} 239 | //because this relies on exact splitting our example won't actually work 240 | //[ "👨🏾‍🍳", "p", "Â", "s", "👩🏿‍", "🦳" ] 241 | // reversed: ["👩🏿‍", "🦳", "s", "Â", "p", "👨🏾‍🍳"] 242 | ana.logEvent('palindrome completed'); 243 | 244 | let numOr0 = n => isNaN(n) ? 0 : parseInt(n); 245 | if(t.match(/[A-Z](?=(.{0,2}[A-Z]))/u)){return 'Capital letters cannot be anywhere near eachother'} 246 | // ?= means after the matched letter 247 | // {0,2} means you can have between 0 and 2 of the letter before. Here it's a dot, so it could be any letter. 248 | //followed by [A-Z] any capital letter. So it matches any capital letters with 2 or less of characters between them. 249 | //there is also a match before regex you shouldn't use because it breaks your code on iphones 250 | //a simpler way of doing this might be /[A-Z].{0,2}[A-Z]/ 251 | ana.logEvent('capital space completed'); 252 | if(a.reduce((d, b) => numOr0(d) + numOr0(b),0) !==100){return 'All the digits in your password must add to 100'} 253 | ana.logEvent('sum100 complete'); 254 | if(!t.match(/42/u)){return 'Your password must contain the meaning of life'} 255 | if(lowcount !==1 ){return 'Your password cannot contain more than one lower case letter'} 256 | if(!au.includes('\udfff')|| !au.includes('\udffe')||!au.includes('\udffd')||!au.includes('\udffc')||!au.includes('\udffb')) 257 | {return 'Your emojis aren\'t diverse enough'} 258 | //this works the same way as hair colour but checks for one of each skin colour. 259 | 260 | 261 | ana.logEvent('diverse complete'); 262 | if(!t.match(/𰻝/u)){return 'Your password must contain shaanxi noodles'} 263 | //some unicode characters are so rare they don't seem to render anytngi other than a blank box 264 | //on any devices, but that sqaure still holds the correct unicode. 265 | 266 | ana.logEvent('WIN'); 267 | return 'checking password' 268 | 269 | } -------------------------------------------------------------------------------- /src/config.js: -------------------------------------------------------------------------------- 1 | import firebase from 'firebase/app'; 2 | import 'firebase/analytics'; 3 | 4 | // Your web app's Firebase configuration 5 | // For Firebase JS SDK v7.20.0 and later, measurementId is optional 6 | var firebaseConfig = { 7 | apiKey: "AIzaSyD5QzSzMvRymXW5PYD2nlwiwc85NPdUKRw", 8 | authDomain: "passwordhell.firebaseapp.com", 9 | projectId: "passwordhell", 10 | storageBucket: "passwordhell.appspot.com", 11 | messagingSenderId: "632242473335", 12 | appId: "1:632242473335:web:a776207254bcc3a1747972", 13 | measurementId: "G-2NT09L3QJY" 14 | }; 15 | 16 | // Initialize Firebase 17 | firebase.initializeApp(firebaseConfig); 18 | const ana = firebase.analytics(); 19 | 20 | export { ana }; -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | import 'fontsource-roboto'; 7 | 8 | 9 | ReactDOM.render( 10 | 11 | 12 | , 13 | document.getElementById('root') 14 | ); 15 | 16 | // If you want to start measuring performance in your app, pass a function 17 | // to log results (for example: reportWebVitals(console.log)) 18 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 19 | reportWebVitals(); 20 | -------------------------------------------------------------------------------- /src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /wina: -------------------------------------------------------------------------------- 1 | S👨🏿👨🏽‍🍳👨🏼‍🍳DϿ👨🏾‍🍳👨🏻‍🍳6S42𰻝D8675309a9035768D𰻝24S6👨🏻‍🍳👨🏾‍🍳ϿD👨🏼‍🍳👨🏽‍🍳👨🏿S 2 | if(t.match(/(?<=([A-Z].{0,2}))[A-Z]/u)){return 'Capital letters cannot be anwhere near eachother'} --------------------------------------------------------------------------------