diff --git a/.GITIGNORE b/.GITIGNORE index 20f04177..7292e5e5 100644 --- a/.GITIGNORE +++ b/.GITIGNORE @@ -1,7 +1,3 @@ node_modules __pycache__ -build - -exported.txt -hash.md -pass.md +build \ No newline at end of file diff --git a/README.md b/README.md index 2f6745f0..a487f78d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ # Authme -- A 2FA app for desktop built with Electron. +- A simple 2FA app for desktop built with Electron and Node.js. + +# How to use + +- Check out `extract/README.md` # Build @@ -8,17 +12,18 @@ # NPM Pacages used +### Dev + - electron - electron-packager +### Main + +- auto-launch - bcrypt - cryptr - speakeasy -# How to use - -- Check out `extract/readme.txt` - # License - MIT diff --git a/app/application/index.html b/app/application/index.html index b46d5170..f522ae17 100644 --- a/app/application/index.html +++ b/app/application/index.html @@ -1,15 +1,17 @@ + + Authme Authme - - - + + + - - + + @@ -382,7 +384,7 @@

Time

-

Authme 1.0.0

+

Authme 1.1.0

diff --git a/app/application/index.css b/app/application/src/css/index.css similarity index 100% rename from app/application/index.css rename to app/application/src/css/index.css diff --git a/app/application/convert.js b/app/application/src/js/convert.js similarity index 100% rename from app/application/convert.js rename to app/application/src/js/convert.js diff --git a/app/application/index.js b/app/application/src/js/index.js similarity index 100% rename from app/application/index.js rename to app/application/src/js/index.js diff --git a/app/application/save.js b/app/application/src/js/save.js similarity index 100% rename from app/application/save.js rename to app/application/src/js/save.js diff --git a/app/confirm/dragonfly@1.1.0.css b/app/confirm/dragonfly@1.1.0.css deleted file mode 100644 index e15c1fd3..00000000 --- a/app/confirm/dragonfly@1.1.0.css +++ /dev/null @@ -1,579 +0,0 @@ -/* Dragonfly CSS */ -/* 1.1.0 */ -/* Created by: Levminer */ - -/* vars */ -:root { - --df_red: rgb(222, 10, 10); - --df_gray: rgb(42, 36, 36); - --df_white: rgb(255, 255, 255); - --df_black: rgb(0, 0, 0); -} - -/* body */ -body { - color: var(--df_white); - box-sizing: border-box; - display: flex; - flex-direction: column; - min-height: 100vh; -} - -/* selection */ -::selection { - color: var(--df_black); - background: var(--df_white); -} - -/* all */ -* { - font-family: Arial, Helvetica, sans-serif; - margin: 0; - padding: 0; - outline: none; -} - -/* links */ -.link1:link { - color: var(--df_red); - font-size: 2rem; - text-decoration: underline; - transition: 0.2s ease-in; -} - -.link1:hover { - color: var(--df_white) !important; - text-decoration: underline dashed !important; -} - -.link1:visited { - color: var(--df_red); - text-decoration: underline; -} - -.link2:link { - color: var(--df_red); - font-size: 2rem; - text-decoration: none; - transition: 0.2s ease-in; -} - -.link2:hover { - color: var(--df_white) !important; - text-decoration: none !important; -} - -.link2:visited { - color: var(--df_red); - text-decoration: none; -} - -/* buttons */ -.button1 { - color: var(--df_white); - background: var(--df_red); - border: 1px solid var(--df_red); - font-size: 1.25rem; - padding: 15px 30px; - border-radius: 30px; - cursor: pointer; - text-decoration: none; - transition: 0.2s ease-in; -} - -.button1:hover { - border: 1px solid var(--df_red); - background: var(--df_gray); - color: var(--df_red); -} - -.button2 { - color: var(--df_red); - background: var(--df_gray); - border: 1px solid var(--df_red); - font-size: 1.25rem; - padding: 15px 30px; - border-radius: 30px; - cursor: pointer; - text-decoration: none; - transition: 0.2s ease-in; -} - -.button2:hover { - border: 1px solid var(--df_white); - background: var(--df_gray); - color: var(--df_white); -} - -/* headings */ - -h1, -h2, -h3, -h4 { - margin: 2rem; - font-weight: 600; -} - -h1 { - font-size: 4rem; -} - -h2 { - font-size: 3rem; -} - -h3 { - font-size: 2rem; -} - -h4 { - font-size: 1rem; -} - -/* text */ -.text1, -.text2, -.text3, -.text4 { - margin: 1rem; -} - -.text1 { - font-size: 2rem; -} - -.text2 { - font-size: 1.75rem; -} - -.text3 { - font-size: 1.5rem; -} - -.text4 { - font-size: 1rem; -} - -/* popup */ -.popup { - padding: 15px; - background-color: var(--df_red); - color: var(--df_white); - text-align: center; - font-weight: bold; - display: block; -} - -.popup-close1 { - margin-left: 15px; - color: var(--df_white); - font-weight: bold; - float: right; - font-size: 20px; - line-height: 20px; - cursor: pointer; - transition: 0.2s ease-in; -} - -.popup-close2 { - margin-right: 15px; - color: white; - font-weight: bold; - float: left; - font-size: 20px; - line-height: 20px; - cursor: pointer; - transition: 0.2s ease-in; -} - -.popup-close1:hover { - color: var(--df_gray); -} - -.popup-close2:hover { - color: var(--df_gray); -} - -.popup-link:link { - text-decoration: underline; - color: var(--df_white); - transition: 0.2s ease-in; -} - -.popup-link:hover { - text-decoration: underline !important; - color: var(--df_gray) !important; -} -.popup-link:visited { - text-decoration: underline; - color: var(--df_white); -} - -/* navbar */ - -/* nav */ -header { - display: flex; - justify-content: space-between; - align-items: center; - padding: 10px 10%; - font-size: 20px; -} - -.navbar-logo { - cursor: pointer; - color: var(--df_red); - text-decoration: none; - font-weight: bold; - transition: 0.2s ease-in; -} - -.navbar-logo:hover { - cursor: pointer; - color: white; - text-decoration: none; - font-weight: bold; -} - -.navbar-link a, -.navbar-button { - font-family: Arial, Helvetica, sans-serif; - font-weight: 500; - text-decoration: none; -} - -.navbar-link { - list-style: none; - display: flex; -} - -.navbar-link li { - padding: 0px 20px; -} - -.navbar-link li a { - transition: 0.2s ease-in; - color: var(--df_white); - text-decoration: none; -} - -.navbar-link li a:hover { - color: var(--df_red); -} - -.navbar-button { - color: white; - padding: 10px 25px; - background-color: var(--df_red); - border: none; - border-radius: 50px; - cursor: pointer; - transition: 0.2s ease-in; - border: 1px solid var(--df_red); -} - -.navbar-button:hover { - background: var(--df_gray); - border-radius: 50px; - border: 1px solid var(--df_red); - color: var(--df_red); -} - -/* inputs */ -.input1 { - color: var(--df_white); - background: var(--df_red); - border: 1px solid var(--df_red); - font-size: 1rem; - padding: 15px 30px; - border-radius: 30px; - cursor: text; - text-align: center; - transition: 0.2s ease-in; -} - -.input1:hover { - color: var(--df_red); - background-color: var(--df_gray); - border: 1px solid var(--df_red); -} - -.input1::placeholder { - color: var(--df_white); -} - -.input2 { - color: var(--df_red); - background: var(--df_gray); - border: 1px solid var(--df_red); - font-size: 1rem; - padding: 15px 30px; - border-radius: 30px; - cursor: text; - text-align: center; - transition: 0.2s ease-in; -} - -.input2:hover { - color: var(--df_white); - background-color: var(--df_gray); - border: 1px solid var(--df_white); -} - -.input2::placeholder { - color: var(--df_red); -} - -/* selects */ -.select1 { - color: var(--df_white); - background: var(--df_red); - border: 1px solid var(--df_red); - font-size: 1rem; - padding: 15px 30px; - border-radius: 30px; - cursor: pointer; - text-align: center; - transition: 0.2s ease-in; - -webkit-appearance: none; -} - -.select1:hover { - color: var(--df_red); - background-color: var(--df_gray); - border: 1px solid var(--df_red); -} - -.select2 { - color: var(--df_red); - background: var(--df_gray); - border: 1px solid var(--df_red); - font-size: 1rem; - padding: 15px 30px; - border-radius: 30px; - cursor: pointer; - text-align: center; - transition: 0.2s ease-in; - -webkit-appearance: none; -} - -.select2:hover { - color: var(--df_white); - background-color: var(--df_gray); - border: 1px solid var(--df_white); -} - -/* radio */ -.radio1 { - background-color: var(--df_red); - color: var(--df_white); - border: 1px var(--df_red) solid; - -webkit-appearance: none; - display: inline-block; - position: relative; - height: 20px; - width: 20px; - border-radius: 50px; - cursor: pointer; - transition: 0.2s ease-in; -} - -.radio1:checked::before { - font-family: 15px Open Sans, sans-serif; - position: absolute; - left: 5px; - top: 1px; - content: "\02143"; - transform: rotate(40deg); - font-weight: bolder; -} - -.radio1:hover { - background-color: var(--df_gray) !important; - border: 1px var(--df_red) solid; - color: var(--df_red); -} - -.radio1:checked { - background-color: var(--df_red); -} - -.radio2 { - background-color: var(--df_gray); - color: var(--df_red); - border: 1px var(--df_red) solid; - -webkit-appearance: none; - display: inline-block; - position: relative; - height: 20px; - width: 20px; - border-radius: 50px; - cursor: pointer; - transition: 0.2s ease-in; -} - -.radio2:checked::before { - font-family: 15px Open Sans, sans-serif; - position: absolute; - left: 5px; - top: 1px; - content: "\02143"; - transform: rotate(40deg); - font-weight: bolder; -} - -.radio2:hover { - background-color: var(--df_gray) !important; - border: 1px var(--df_white) solid; - color: var(--df_white); -} - -.radio2:checked { - background-color: var(--df_gray); -} - -/* checkbox */ -.checkbox1 { - background-color: var(--df_red); - color: var(--df_white); - border: 1px var(--df_red) solid; - -webkit-appearance: none; - display: inline-block; - position: relative; - height: 20px; - width: 20px; - border-radius: 5px; - cursor: pointer; - transition: 0.2s ease-in; -} - -.checkbox1:checked::before { - font-family: 15px Open Sans, sans-serif; - position: absolute; - left: 5px; - top: 1px; - content: "\02143"; - transform: rotate(40deg); - font-weight: bolder; -} - -.checkbox1:hover { - background-color: var(--df_gray) !important; - border: 1px var(--df_red) solid; - color: var(--df_red); -} - -.checkbox1:checked { - background-color: var(--df_red); -} - -.checkbox2 { - background-color: var(--df_gray); - color: var(--df_red); - border: 1px var(--df_red) solid; - -webkit-appearance: none; - display: inline-block; - position: relative; - height: 20px; - width: 20px; - border-radius: 5px; - cursor: pointer; - transition: 0.2s ease-in; -} - -.checkbox2:checked::before { - font-family: 15px Open Sans, sans-serif; - position: absolute; - left: 5px; - top: 1px; - content: "\02143"; - transform: rotate(40deg); - font-weight: bolder; -} - -.checkbox2:hover { - background-color: var(--df_gray) !important; - border: 1px var(--df_white) solid; - color: var(--df_white); -} - -.checkbox2:checked { - background-color: var(--df_gray); -} - -/* divs*/ -.center { - background-color: var(--df_gray); - position: relative; - top: 200px; - text-align: center; - padding-top: 30px; - margin: 130px auto; - height: 300px; - width: 600px; - border-radius: 30px; -} - -.left { - background-color: var(--df_gray); - position: relative; - top: 200px; - float: left; - text-align: center; - padding-top: 30px; - margin: 50px auto; - margin-left: 25px; - height: 300px; - width: 600px; - border-radius: 30px; -} - -.right { - background-color: var(--df_gray); - position: relative; - top: 200px; - float: right; - text-align: center; - padding-top: 30px; - margin: 50px auto; - margin-right: 25px; - height: 300px; - width: 600px; - border-radius: 30px; -} - -.left-center { - background-color: var(--df_gray); - position: relative; - top: 200px; - float: left; - text-align: center; - padding-top: 30px; - margin: 50px auto; - margin-left: 175px; - height: 300px; - width: 600px; - border-radius: 30px; -} - -.right-center { - background-color: var(--df_gray); - position: relative; - top: 200px; - float: right; - text-align: center; - padding-top: 30px; - margin: 50px auto; - margin-right: 175px; - height: 300px; - width: 600px; - border-radius: 30px; -} - -footer { - margin: auto; - margin-top: 50px; - width: 100%; - text-align: center; -} diff --git a/app/confirm/index.html b/app/confirm/index.html index 45fab981..ed21af72 100644 --- a/app/confirm/index.html +++ b/app/confirm/index.html @@ -4,10 +4,10 @@ Authme - + - - + + @@ -21,7 +21,7 @@

Please enter your password to countine to your 2FA codes!


-

Authme 1.0.0

+

Authme 1.1.0

diff --git a/app/confirm/index.css b/app/confirm/src/css/index.css similarity index 100% rename from app/confirm/index.css rename to app/confirm/src/css/index.css diff --git a/app/confirm/index.js b/app/confirm/src/js/index.js similarity index 100% rename from app/confirm/index.js rename to app/confirm/src/js/index.js diff --git a/app/landing/dragonfly@1.1.0.css b/app/landing/dragonfly@1.1.0.css deleted file mode 100644 index e15c1fd3..00000000 --- a/app/landing/dragonfly@1.1.0.css +++ /dev/null @@ -1,579 +0,0 @@ -/* Dragonfly CSS */ -/* 1.1.0 */ -/* Created by: Levminer */ - -/* vars */ -:root { - --df_red: rgb(222, 10, 10); - --df_gray: rgb(42, 36, 36); - --df_white: rgb(255, 255, 255); - --df_black: rgb(0, 0, 0); -} - -/* body */ -body { - color: var(--df_white); - box-sizing: border-box; - display: flex; - flex-direction: column; - min-height: 100vh; -} - -/* selection */ -::selection { - color: var(--df_black); - background: var(--df_white); -} - -/* all */ -* { - font-family: Arial, Helvetica, sans-serif; - margin: 0; - padding: 0; - outline: none; -} - -/* links */ -.link1:link { - color: var(--df_red); - font-size: 2rem; - text-decoration: underline; - transition: 0.2s ease-in; -} - -.link1:hover { - color: var(--df_white) !important; - text-decoration: underline dashed !important; -} - -.link1:visited { - color: var(--df_red); - text-decoration: underline; -} - -.link2:link { - color: var(--df_red); - font-size: 2rem; - text-decoration: none; - transition: 0.2s ease-in; -} - -.link2:hover { - color: var(--df_white) !important; - text-decoration: none !important; -} - -.link2:visited { - color: var(--df_red); - text-decoration: none; -} - -/* buttons */ -.button1 { - color: var(--df_white); - background: var(--df_red); - border: 1px solid var(--df_red); - font-size: 1.25rem; - padding: 15px 30px; - border-radius: 30px; - cursor: pointer; - text-decoration: none; - transition: 0.2s ease-in; -} - -.button1:hover { - border: 1px solid var(--df_red); - background: var(--df_gray); - color: var(--df_red); -} - -.button2 { - color: var(--df_red); - background: var(--df_gray); - border: 1px solid var(--df_red); - font-size: 1.25rem; - padding: 15px 30px; - border-radius: 30px; - cursor: pointer; - text-decoration: none; - transition: 0.2s ease-in; -} - -.button2:hover { - border: 1px solid var(--df_white); - background: var(--df_gray); - color: var(--df_white); -} - -/* headings */ - -h1, -h2, -h3, -h4 { - margin: 2rem; - font-weight: 600; -} - -h1 { - font-size: 4rem; -} - -h2 { - font-size: 3rem; -} - -h3 { - font-size: 2rem; -} - -h4 { - font-size: 1rem; -} - -/* text */ -.text1, -.text2, -.text3, -.text4 { - margin: 1rem; -} - -.text1 { - font-size: 2rem; -} - -.text2 { - font-size: 1.75rem; -} - -.text3 { - font-size: 1.5rem; -} - -.text4 { - font-size: 1rem; -} - -/* popup */ -.popup { - padding: 15px; - background-color: var(--df_red); - color: var(--df_white); - text-align: center; - font-weight: bold; - display: block; -} - -.popup-close1 { - margin-left: 15px; - color: var(--df_white); - font-weight: bold; - float: right; - font-size: 20px; - line-height: 20px; - cursor: pointer; - transition: 0.2s ease-in; -} - -.popup-close2 { - margin-right: 15px; - color: white; - font-weight: bold; - float: left; - font-size: 20px; - line-height: 20px; - cursor: pointer; - transition: 0.2s ease-in; -} - -.popup-close1:hover { - color: var(--df_gray); -} - -.popup-close2:hover { - color: var(--df_gray); -} - -.popup-link:link { - text-decoration: underline; - color: var(--df_white); - transition: 0.2s ease-in; -} - -.popup-link:hover { - text-decoration: underline !important; - color: var(--df_gray) !important; -} -.popup-link:visited { - text-decoration: underline; - color: var(--df_white); -} - -/* navbar */ - -/* nav */ -header { - display: flex; - justify-content: space-between; - align-items: center; - padding: 10px 10%; - font-size: 20px; -} - -.navbar-logo { - cursor: pointer; - color: var(--df_red); - text-decoration: none; - font-weight: bold; - transition: 0.2s ease-in; -} - -.navbar-logo:hover { - cursor: pointer; - color: white; - text-decoration: none; - font-weight: bold; -} - -.navbar-link a, -.navbar-button { - font-family: Arial, Helvetica, sans-serif; - font-weight: 500; - text-decoration: none; -} - -.navbar-link { - list-style: none; - display: flex; -} - -.navbar-link li { - padding: 0px 20px; -} - -.navbar-link li a { - transition: 0.2s ease-in; - color: var(--df_white); - text-decoration: none; -} - -.navbar-link li a:hover { - color: var(--df_red); -} - -.navbar-button { - color: white; - padding: 10px 25px; - background-color: var(--df_red); - border: none; - border-radius: 50px; - cursor: pointer; - transition: 0.2s ease-in; - border: 1px solid var(--df_red); -} - -.navbar-button:hover { - background: var(--df_gray); - border-radius: 50px; - border: 1px solid var(--df_red); - color: var(--df_red); -} - -/* inputs */ -.input1 { - color: var(--df_white); - background: var(--df_red); - border: 1px solid var(--df_red); - font-size: 1rem; - padding: 15px 30px; - border-radius: 30px; - cursor: text; - text-align: center; - transition: 0.2s ease-in; -} - -.input1:hover { - color: var(--df_red); - background-color: var(--df_gray); - border: 1px solid var(--df_red); -} - -.input1::placeholder { - color: var(--df_white); -} - -.input2 { - color: var(--df_red); - background: var(--df_gray); - border: 1px solid var(--df_red); - font-size: 1rem; - padding: 15px 30px; - border-radius: 30px; - cursor: text; - text-align: center; - transition: 0.2s ease-in; -} - -.input2:hover { - color: var(--df_white); - background-color: var(--df_gray); - border: 1px solid var(--df_white); -} - -.input2::placeholder { - color: var(--df_red); -} - -/* selects */ -.select1 { - color: var(--df_white); - background: var(--df_red); - border: 1px solid var(--df_red); - font-size: 1rem; - padding: 15px 30px; - border-radius: 30px; - cursor: pointer; - text-align: center; - transition: 0.2s ease-in; - -webkit-appearance: none; -} - -.select1:hover { - color: var(--df_red); - background-color: var(--df_gray); - border: 1px solid var(--df_red); -} - -.select2 { - color: var(--df_red); - background: var(--df_gray); - border: 1px solid var(--df_red); - font-size: 1rem; - padding: 15px 30px; - border-radius: 30px; - cursor: pointer; - text-align: center; - transition: 0.2s ease-in; - -webkit-appearance: none; -} - -.select2:hover { - color: var(--df_white); - background-color: var(--df_gray); - border: 1px solid var(--df_white); -} - -/* radio */ -.radio1 { - background-color: var(--df_red); - color: var(--df_white); - border: 1px var(--df_red) solid; - -webkit-appearance: none; - display: inline-block; - position: relative; - height: 20px; - width: 20px; - border-radius: 50px; - cursor: pointer; - transition: 0.2s ease-in; -} - -.radio1:checked::before { - font-family: 15px Open Sans, sans-serif; - position: absolute; - left: 5px; - top: 1px; - content: "\02143"; - transform: rotate(40deg); - font-weight: bolder; -} - -.radio1:hover { - background-color: var(--df_gray) !important; - border: 1px var(--df_red) solid; - color: var(--df_red); -} - -.radio1:checked { - background-color: var(--df_red); -} - -.radio2 { - background-color: var(--df_gray); - color: var(--df_red); - border: 1px var(--df_red) solid; - -webkit-appearance: none; - display: inline-block; - position: relative; - height: 20px; - width: 20px; - border-radius: 50px; - cursor: pointer; - transition: 0.2s ease-in; -} - -.radio2:checked::before { - font-family: 15px Open Sans, sans-serif; - position: absolute; - left: 5px; - top: 1px; - content: "\02143"; - transform: rotate(40deg); - font-weight: bolder; -} - -.radio2:hover { - background-color: var(--df_gray) !important; - border: 1px var(--df_white) solid; - color: var(--df_white); -} - -.radio2:checked { - background-color: var(--df_gray); -} - -/* checkbox */ -.checkbox1 { - background-color: var(--df_red); - color: var(--df_white); - border: 1px var(--df_red) solid; - -webkit-appearance: none; - display: inline-block; - position: relative; - height: 20px; - width: 20px; - border-radius: 5px; - cursor: pointer; - transition: 0.2s ease-in; -} - -.checkbox1:checked::before { - font-family: 15px Open Sans, sans-serif; - position: absolute; - left: 5px; - top: 1px; - content: "\02143"; - transform: rotate(40deg); - font-weight: bolder; -} - -.checkbox1:hover { - background-color: var(--df_gray) !important; - border: 1px var(--df_red) solid; - color: var(--df_red); -} - -.checkbox1:checked { - background-color: var(--df_red); -} - -.checkbox2 { - background-color: var(--df_gray); - color: var(--df_red); - border: 1px var(--df_red) solid; - -webkit-appearance: none; - display: inline-block; - position: relative; - height: 20px; - width: 20px; - border-radius: 5px; - cursor: pointer; - transition: 0.2s ease-in; -} - -.checkbox2:checked::before { - font-family: 15px Open Sans, sans-serif; - position: absolute; - left: 5px; - top: 1px; - content: "\02143"; - transform: rotate(40deg); - font-weight: bolder; -} - -.checkbox2:hover { - background-color: var(--df_gray) !important; - border: 1px var(--df_white) solid; - color: var(--df_white); -} - -.checkbox2:checked { - background-color: var(--df_gray); -} - -/* divs*/ -.center { - background-color: var(--df_gray); - position: relative; - top: 200px; - text-align: center; - padding-top: 30px; - margin: 130px auto; - height: 300px; - width: 600px; - border-radius: 30px; -} - -.left { - background-color: var(--df_gray); - position: relative; - top: 200px; - float: left; - text-align: center; - padding-top: 30px; - margin: 50px auto; - margin-left: 25px; - height: 300px; - width: 600px; - border-radius: 30px; -} - -.right { - background-color: var(--df_gray); - position: relative; - top: 200px; - float: right; - text-align: center; - padding-top: 30px; - margin: 50px auto; - margin-right: 25px; - height: 300px; - width: 600px; - border-radius: 30px; -} - -.left-center { - background-color: var(--df_gray); - position: relative; - top: 200px; - float: left; - text-align: center; - padding-top: 30px; - margin: 50px auto; - margin-left: 175px; - height: 300px; - width: 600px; - border-radius: 30px; -} - -.right-center { - background-color: var(--df_gray); - position: relative; - top: 200px; - float: right; - text-align: center; - padding-top: 30px; - margin: 50px auto; - margin-right: 175px; - height: 300px; - width: 600px; - border-radius: 30px; -} - -footer { - margin: auto; - margin-top: 50px; - width: 100%; - text-align: center; -} diff --git a/app/landing/index.html b/app/landing/index.html index 269ff62c..11f2568e 100644 --- a/app/landing/index.html +++ b/app/landing/index.html @@ -4,10 +4,10 @@ Authme - + - - + + @@ -25,7 +25,9 @@

Please create a password for encryt your 2FA codes!


-

Authme 1.0.0

+
+ Don't require password +

Authme 1.1.0

diff --git a/app/landing/index.css b/app/landing/src/css/index.css similarity index 86% rename from app/landing/index.css rename to app/landing/src/css/index.css index 8ec6cff3..ee59b9f2 100644 --- a/app/landing/index.css +++ b/app/landing/src/css/index.css @@ -51,3 +51,10 @@ body { position: relative; top: 30px; } + +.link1 { + font-size: 1rem !important; + position: relative; + top: 50px; + color: white !important; +} diff --git a/app/landing/index.js b/app/landing/src/js/index.js similarity index 73% rename from app/landing/index.js rename to app/landing/src/js/index.js index 55953542..3cdea2d4 100644 --- a/app/landing/index.js +++ b/app/landing/src/js/index.js @@ -45,6 +45,22 @@ let hash_password = async () => { }) } +//? no password +let no_password = () => { + text.style.color = "green" + text.textContent = "Please wait!" + + fs.writeFile("nrpw.md", "nrpw", (err) => { + if (err) { + console.log("Not require password file don't created!") + } else { + console.log("Not require password Password file created!") + + to_application1() + } + }) +} + //? to_confirm let to_confirm = () => { console.log("Sending to confirm...") @@ -52,3 +68,11 @@ let to_confirm = () => { ipc.send("to_confirm") }, 3000) } + +//? to_application1 +let to_application1 = () => { + console.log("Sending to application1...") + setInterval(() => { + ipc.send("to_application1") + }, 3000) +} diff --git a/app/settings/index.html b/app/settings/index.html new file mode 100644 index 00000000..a02092e2 --- /dev/null +++ b/app/settings/index.html @@ -0,0 +1,29 @@ + + + + + Authme + + + + + + + + + +
+

Authme

+

Settings

+ +

Launch on startup

+

Start the app after operating system loaded.

+ +
+

Clear data

+

Clear password, 2FA codes and other settings

+ +

Authme 1.1.0

+
+ + diff --git a/app/settings/src/css/index.css b/app/settings/src/css/index.css new file mode 100644 index 00000000..4c3738ab --- /dev/null +++ b/app/settings/src/css/index.css @@ -0,0 +1,60 @@ +body { + background: rgb(0, 0, 0); + background: linear-gradient(90deg, rgba(0, 0, 0, 1) 30%, rgba(42, 36, 36, 1) 100%); +} + +.center { + top: 25px; + width: 1000px; + height: 800px; +} + +.button1 { + color: black; + background-color: white; + border-color: white; +} + +.button1:hover { + color: white; + border-color: white; +} + +.input1 { + color: black; + background-color: white; + border-color: white; + width: 250px; +} + +.input1:hover { + color: white; + border-color: white; +} + +#password_input2 { + position: relative; + top: 20px; +} + +#password_label2 { + position: relative; + top: 20px; +} + +#button1 { + position: relative; + top: 45px; +} + +#version { + position: relative; + top: 30px; +} + +.link1 { + font-size: 1rem !important; + position: relative; + top: 50px; + color: white !important; +} diff --git a/app/settings/src/js/index.js b/app/settings/src/js/index.js new file mode 100644 index 00000000..84f8b437 --- /dev/null +++ b/app/settings/src/js/index.js @@ -0,0 +1,122 @@ +const { ipcMain } = require("electron") +const fs = require("fs") +const electron = require("electron") +const ipc = electron.ipcRenderer + +let but0 = document.querySelector("#but0") +let but1 = document.querySelector("#but1") + +//? startup +let startup_state = true + +fs.readFile("saos.md", "utf-8", (err, data) => { + if (err) { + but0.textContent = "Off" + startup_state = true + + after_startup0() + } else { + but0.textContent = "On" + startup_state = false + + after_startup1() + } +}) + +let startup = () => { + if (startup_state == true) { + fs.writeFile("saos.md", "saos", (err) => { + if (err) { + console.log("Start after os started don't created!") + } else { + console.log("Start after os started file created!") + + but0.textContent = "On" + startup_state = false + + after_startup1() + } + }) + } else { + fs.unlink("saos.md", (err) => { + if (err && err.code === "ENOENT") { + return console.log("saos.md not deleted") + } else { + console.log("saos.md deleted") + + but0.textContent = "Off" + startup_state = true + + after_startup0() + } + }) + } +} + +//? data +let data_state = false + +let data = () => { + if (data_state == false) { + but1.textContent = "Are you sure?" + data_state = true + } else { + fs.unlink("nrpw.md", (err) => { + if (err && err.code === "ENOENT") { + return console.log("nrpw.md not deleted") + } else { + console.log("nrpw.md deleted") + } + }) + + fs.unlink("pass.md", (err) => { + if (err && err.code === "ENOENT") { + return console.log("pass.md not deleted") + } else { + console.log("pass.md deleted") + } + }) + + fs.unlink("hash.md", (err) => { + if (err && err.code === "ENOENT") { + return console.log("hash.md not deleted") + } else { + console.log("hash.md deleted") + } + }) + + fs.unlink("saos.md", (err) => { + if (err && err.code === "ENOENT") { + return console.log("saos.md not deleted") + } else { + console.log("saos.md deleted") + } + }) + + but1.textContent = "Exiting app" + after_data() + } +} + +let hide = () => { + after_hide() +} + +//? after_data +let after_data = () => { + ipc.send("after_data") +} + +//? after_startup +let after_startup0 = () => { + ipc.send("after_startup0") +} + +let after_startup1 = () => { + ipc.send("after_startup1") +} + +//? hide +let after_hide = () => { + ipc.send("hide") +} diff --git a/extract/readme.txt b/extract/README.md similarity index 66% rename from extract/readme.txt rename to extract/README.md index a0b9a580..07ce6a79 100644 --- a/extract/readme.txt +++ b/extract/README.md @@ -1,21 +1,28 @@ -Usage: +# Usage: + 1. Export the QR codes from "Google Authenticator" app. 2. Read QR codes with QR code reader. 3. Save the captured QR codes in a text file. Save each QR code on a new line. (The captured QR codes look like "otpauth-migration://offline?data=..."). 4. Call this script with the file as input: -"python extract_otp_secret_keys.py -q example.txt" -Required: +- `python extract_2fa_secret.py example.txt` (Without QR codes) +- `python extract_2fa_secret.py -q example.txt` (With QR codes) + +# Dependencies: + 1. Install with pip: -"pip install protobuf" -Created by: +- `pip install protobuf` (Required) +- `pip install qrcode` (Required for QR codes) + +Edited by: Levminer (https://www.levminer.com) Forked from: -Author: Scito (https://scito.ch) +Scito (https://scito.ch) + +# License: -License: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or @@ -23,8 +30,8 @@ the Free Software Foundation, either version 3 of the License, or This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with this program. If not, see . \ No newline at end of file +along with this program. If not, see . diff --git a/extract/exported.txt b/extract/exported.txt new file mode 100644 index 00000000..189c75c5 --- /dev/null +++ b/extract/exported.txt @@ -0,0 +1,10 @@ + +Name: pi@raspberrypi +Secret: 7KSQL2JTUDIS5EF65KLMRQIIGY +Issuer: raspberrypi +Type: OTP_TOTP + +Name: pi@raspberrypi +Secret: 7KSQL2JTUDIS5EF65KLMRQIIGY +Issuer: raspberrypi +Type: OTP_TOTP diff --git a/extract/extract_otp_secret.py b/extract/extract_2fa_secret.py similarity index 67% rename from extract/extract_otp_secret.py rename to extract/extract_2fa_secret.py index 8c9cf522..09e7d96e 100644 --- a/extract/extract_otp_secret.py +++ b/extract/extract_2fa_secret.py @@ -1,34 +1,3 @@ -""" Usage: -1. Export the QR codes from "Google Authenticator" app. -2. Read QR codes with QR code reader. -3. Save the captured QR codes in a text file. Save each QR code on a new line. (The captured QR codes look like "otpauth-migration://offline?data=..."). -4. Call this script with the file as input: -"python extract_otp_secret_keys.py -q example.txt" - -Required: -1. Install with pip: -"pip install protobuf" - -Created by: -Levminer (https://www.levminer.com) - -Forked from: -Author: Scito (https://scito.ch) - -License: -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . """ - import argparse import base64 import fileinput @@ -87,7 +56,7 @@ def print_qr(data): print(payload) # write to file - file = open("exported.txt", "a") + file = open("exported.md", "a") for otp in payload.otp_parameters: print("\nName: {}".format(otp.name)) @@ -112,4 +81,4 @@ def print_qr(data): if args.qr: if verbose: print(otp_url) - print_qr(otp_url) \ No newline at end of file + print_qr(otp_url) diff --git a/extract/google_2fa_export.py b/extract/google_2fa_export.py index fae23724..7a1d10e7 100644 --- a/extract/google_2fa_export.py +++ b/extract/google_2fa_export.py @@ -405,4 +405,4 @@ _sym_db.RegisterMessage(MigrationPayload.OtpParameters) -# @@protoc_insertion_point(module_scope) \ No newline at end of file +# @@protoc_insertion_point(module_scope) diff --git a/main.js b/main.js index 96161837..0502efac 100644 --- a/main.js +++ b/main.js @@ -1,18 +1,25 @@ const electron = require("electron") +const AutoLaunch = require("auto-launch") const path = require("path") -const { app, BrowserWindow, Menu, shell } = require("electron") +const { app, BrowserWindow, Menu, Tray, shell } = require("electron") const ipc = electron.ipcMain let window0 let window1 let window2 +let window3 let c0 = false let c1 = false + let c2 = false +let c3 = false let ipc0 = false let ipc1 = false +let ipc2 = false + +let autoLaunch let createWindow = () => { window0 = new BrowserWindow({ @@ -36,6 +43,13 @@ let createWindow = () => { }, }) + window3 = new BrowserWindow({ + webPreferences: { + preload: path.join(__dirname, "preload.js"), + nodeIntegration: true, + }, + }) + // DEVTOOLS /* window1.webContents.openDevTools() */ @@ -43,10 +57,12 @@ let createWindow = () => { window1.hide() window2.hide() + window3.hide() window0.loadFile("./app/landing/index.html") window1.loadFile("./app/confirm/index.html") window2.loadFile("./app/application/index.html") + window3.loadFile("./app/settings/index.html") window0.on("close", () => { app.quit() @@ -59,12 +75,15 @@ let createWindow = () => { window2.on("close", () => { app.quit() }) + + window3.on("close", () => { + app.quit() + }) } ipc.on("to_confirm", () => { if (ipc0 == false) { - window1.maximize() - window1.show() + window1.hide() window0.hide() ipc0 = true } @@ -73,14 +92,95 @@ ipc.on("to_confirm", () => { ipc.on("to_application", () => { if (ipc1 == false) { window2.maximize() - window2.show() window1.hide() ipc1 = true } }) +ipc.on("to_application1", () => { + if (ipc2 == false) { + window0.hide() + window2.maximize() + window2.show() + ipc1 = true + } +}) + +ipc.on("hide", () => { + if (c3 == false) { + window3.maximize() + window3.show() + c3 = true + } else { + window3.hide() + c3 = false + } +}) + +ipc.on("after_data", () => { + setTimeout(() => { + app.quit() + }, 1000) +}) + app.whenReady().then(() => { + // autolaunch + autoLaunch = new AutoLaunch({ + name: "Authme Starter", + path: app.getPath("exe"), + }) + + autoLaunch.isEnabled().then((isEnabled) => { + if (!isEnabled) autoLaunch.enable() + }) + + // make tray + let iconpath = path.join(__dirname, "img/icon.png") + + tray = new Tray(iconpath) + const contextMenu = Menu.buildFromTemplate([ + { + label: "Show app", + click: () => { + if (c2 == false) { + window2.maximize() + window2.show() + c2 = true + } else { + window2.hide() + c2 = false + } + }, + }, + { type: "separator" }, + { + label: "Settings", + click: () => { + if (c3 == false) { + window3.maximize() + window3.show() + c3 = true + } else { + window3.hide() + c3 = false + } + }, + }, + { type: "separator" }, + { + label: "Exit app", + click: () => { + app.quit() + }, + }, + ]) + tray.setToolTip("Authme") + tray.setContextMenu(contextMenu) + + // create windows createWindow() + + // menubar const template = [ { label: "File", @@ -95,15 +195,22 @@ app.whenReady().then(() => { type: "separator", }, { - label: "Support", + label: "Settings", click: () => { - shell.openExternal("https://paypal.me/levminer") + if (c3 == false) { + window3.maximize() + window3.show() + c3 = true + } else { + window3.hide() + c3 = false + } }, }, ], }, { - label: "Settings", + label: "Window", submenu: [ { label: "Fullscreen", @@ -132,11 +239,13 @@ app.whenReady().then(() => { window0.webContents.openDevTools() window1.webContents.openDevTools() window2.webContents.openDevTools() + window3.webContents.openDevTools() c1 = true } else { window0.webContents.closeDevTools() window1.webContents.closeDevTools() - window2.webContents.openDevTools() + window2.webContents.closeDevTools() + window3.webContents.closeDevTools() c1 = false } console.log(`DT ${c1}`) @@ -173,3 +282,11 @@ app.whenReady().then(() => { if (BrowserWindow.getAllWindows().length === 0) createWindow() }) }) + +ipc.on("after_startup0", () => { + autoLaunch.disable() +}) + +ipc.on("after_startup1", () => { + autoLaunch.enable() +}) diff --git a/package-lock.json b/package-lock.json index 6f273019..e69bd111 100644 --- a/package-lock.json +++ b/package-lock.json @@ -80,6 +80,11 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, + "applescript": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/applescript/-/applescript-1.0.0.tgz", + "integrity": "sha1-u4evVoytA0pOSMS9r2Bno6JwExc=" + }, "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", @@ -119,6 +124,18 @@ "integrity": "sha1-0IiFvmubv5Q5/gh8dihyRfCoFFA=", "dev": true }, + "auto-launch": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/auto-launch/-/auto-launch-5.0.5.tgz", + "integrity": "sha512-ppdF4mihhYzMYLuCcx9H/c5TUOCev8uM7en53zWVQhyYAJrurd2bFZx3qQVeJKF2jrc7rsPRNN5cD+i23l6PdA==", + "requires": { + "applescript": "^1.0.0", + "mkdirp": "^0.5.1", + "path-is-absolute": "^1.0.0", + "untildify": "^3.0.2", + "winreg": "1.2.4" + } + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -1728,6 +1745,11 @@ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, + "untildify": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-3.0.3.tgz", + "integrity": "sha512-iSk/J8efr8uPT/Z4eSUywnqyrQU7DSdMfdqK4iWEaUVVmcP5JcnpRqmVMwcwcnmI1ATFNgC5V90u09tBynNFKA==" + }, "url-parse-lax": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", @@ -1766,6 +1788,11 @@ "string-width": "^1.0.2 || 2" } }, + "winreg": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/winreg/-/winreg-1.2.4.tgz", + "integrity": "sha1-ugZWKbepJRMOFXeRCM9UCZDpjRs=" + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/package.json b/package.json index b9ff703b..7cf8afe9 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "electron-packager": "^15.0.0" }, "dependencies": { + "auto-launch": "^5.0.5", "bcrypt": "^5.0.0", "cryptr": "^6.0.2", "speakeasy": "^2.0.0" diff --git a/preload.js b/preload.js index 752103ea..2358d2ab 100644 --- a/preload.js +++ b/preload.js @@ -11,3 +11,11 @@ fs.readFile("pass.md", "utf-8", (err, data) => { ipc.send("to_confirm") } }) + +fs.readFile("nrpw.md", "utf-8", (err, data) => { + if (err) { + console.log("The nrpw.md fle dont exist!") + } else { + ipc.send("to_application1") + } +}) diff --git a/app/application/dragonfly@1.1.0.css b/src/dragonfly@1.1.0.css similarity index 100% rename from app/application/dragonfly@1.1.0.css rename to src/dragonfly@1.1.0.css