From b8e1ecc4909df46e930f6525116055e01adcfa5c Mon Sep 17 00:00:00 2001 From: brantje Date: Sat, 24 Sep 2016 20:16:57 +0200 Subject: [PATCH] Add password strength scanner --- css/app.css | 6 ++ css/app.css.map | 4 +- js/app/app.js | 4 + js/app/controllers/menu.js | 6 ++ js/app/controllers/settings.js | 88 +++++++++++++++++++ js/templates.js | 22 ++++- .../ng-password-meter/ng-password-meter.js | 6 +- sass/app.scss | 1 + sass/settings.scss | 7 ++ templates/main.php | 3 +- .../forms/settings/general_settings.html | 17 ++++ .../views/partials/forms/settings/tool.html | 45 ++++++++++ templates/views/settings.html | 26 ++++++ templates/views/show_vault.html | 2 +- 14 files changed, 226 insertions(+), 11 deletions(-) create mode 100644 js/app/controllers/settings.js create mode 100644 sass/settings.scss create mode 100644 templates/views/partials/forms/settings/general_settings.html create mode 100644 templates/views/partials/forms/settings/tool.html create mode 100644 templates/views/settings.html diff --git a/css/app.css b/css/app.css index 48ae3815..f021f28f 100644 --- a/css/app.css +++ b/css/app.css @@ -365,6 +365,12 @@ .table { width: 100%; } +.scan-result-table { + margin-top: 10px; } + .scan-result-table .score { + padding-left: 0px; + padding-right: 15px; } + #app-settings-content:not(.ng-hide) { height: 60px; display: inherit !important; diff --git a/css/app.css.map b/css/app.css.map index 3ff53787..e30d491a 100644 --- a/css/app.css.map +++ b/css/app.css.map @@ -1,7 +1,7 @@ { "version": 3, -"mappings": "AAAA,YAAY;EACV,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,IAAI;;AAEb,kBAAkB;EAChB,UAAU,EAAE,OAAoB;EAChC,KAAK,EAAE,IAAI;;AAGb,WAAW;EACT,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,IAAI;;AAEb,iBAAiB;EACf,UAAU,EAAE,OAAoB;EAChC,KAAK,EAAE,IAAI;;AAEb,KAAK;EACH,KAAK,EAAE,kBAA2B;EAClC,MAAM,EAAE,OAAO;;AAEjB,WAAW;EACT,eAAe,EAAE,SAAS;;ACtB5B,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ss","../sass/partials/tabs.scss","../sass/partials/pwgen.scss","../sass/mixins.scss","../sass/vaults.scss","../sass/credentials.scss","../sass/menu.scss","../sass/share_credential.scss","../sass/app.scss"], +"mappings": "AAAA,YAAY;EACV,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,IAAI;;AAEb,kBAAkB;EAChB,UAAU,EAAE,OAAoB;EAChC,KAAK,EAAE,IAAI;;AAGb,WAAW;EACT,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,IAAI;;AAEb,iBAAiB;EACf,UAAU,EAAE,OAAoB;EAChC,KAAK,EAAE,IAAI;;AAEb,KAAK;EACH,KAAK,EAAE,kBAA2B;EAClC,MAAM,EAAE,OAAO;;AAEjB,WAAW;EACT,eAAe,EAAE,SAAS;;ACtB5B,WAAY;EACV,MAAM,EAAE,QAAQ;EAChB,UAAU,EAAE,IAAI;EAChB,OAAO,EAAE,CAAC;EACV,8BAAmB;IACjB,WAAW,EAAE,CAAC;EAEhB,kBAAO;IACL,oCAAoC;IACpC,KAAK,EAAE,IAAI;IACX,mBAAmB,EAAE,CAAC;IACtB,MAAM,EAAE,CAAC;IACT,OAAO,EAAE,mBAAmB;IAC5B,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,OAAO;IACf,YAAY,EAAE,cAAc;IAC5B,kBAAkB,EAAE,6BAA6B;IACjD,eAAe,EAAE,6BAA6B;IAC9C,aAAa,EAAE,6BAA6B;IAC5C,cAAc,EAAE,6BAA6B;IAC7C,UAAU,EAAE,6BAA6B;EAE3C,qBAAU;IACR,gBAAgB,EAAE,kBAAkB;IACpC,KAAK,EAAE,IAAI;;AAIf,cAAe;EACb,MAAM,EAAE,SAAS;EACjB,YAAY,EAAE,IAAI;EAClB,gBAAgB,EAAE,OAAO;EACzB,aAAa,EAAE,CAAC;EAChB,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,KAAK;;AClChB,OAAO;EACL,QAAQ,EAAC,MAAM;EACf,aAAK;IACH,KAAK,EAAE,4BAA4B;I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,KAAK,EAAE,GAAG;EAER,8CAAM;IACJ,KAAK,EAAE,IAAI;EAMf,2CAAa;IACX,UAAU,EAAE,IAAI;;AAItB,MAAM;EACJ,KAAK,EAAE,IAAI;;ACjBb,kBAAkB;EAChB,UAAU,EAAE,IAAI;EAChB,yBAAM;IACJ,YAAY,EAAE,GAAG;IACjB,aAAa,EAAE,IAAI;;ACSvB,mCAAoC;EAClC,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,kBAAkB;EAC3B,OAAO,EAAE,CAAC;EACV,UAAU,EAAE,qBAAqB;;AAEnC,6BAA6B;EAC3B,OAAO,EAAE,kBAAkB;EAC3B,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,CAAC;EACV,UAAU,EAAE,oBAAoB;;AAElC,UAAU;EACR,OAAO,EAAE,IAAI;;AAGb,kBAAI;EACF,WAAW,EAAE,YAAY;EACzB,YAAY,EAAE,YAAY", +"sources": ["../sass/partials/button.scss","../sass/partials/tabs.scss","../sass/partials/pwgen.scss","../sass/mixins.scss","../sass/vaults.scss","../sass/credentials.scss","../sass/menu.scss","../sass/share_credential.scss","../sass/settings.scss","../sass/app.scss"], "names": [], "file": "app.css" } diff --git a/js/app/app.js b/js/app/app.js index a34ea8a7..b0c38c4f 100644 --- a/js/app/app.js +++ b/js/app/app.js @@ -49,6 +49,10 @@ angular templateUrl: 'views/credential_revisions.html', controller: 'RevisionCtrl' }) + .when('/vault/:vault_id/settings', { + templateUrl: 'views/settings.html', + controller: 'SettingsCtrl' + }) .otherwise({ redirectTo: '/' }); diff --git a/js/app/controllers/menu.js b/js/app/controllers/menu.js index 339a1d4d..6d48eb83 100644 --- a/js/app/controllers/menu.js +++ b/js/app/controllers/menu.js @@ -21,6 +21,12 @@ angular.module('passmanApp') return TagService.searchTag($query); }; + $scope.$watch(function(){ + return VaultService.getActiveVault() + }, function(vault){ + $scope.active_vault = vault; + }); + $scope.filtered_tags = []; $rootScope.$on('limit_tags_in_list', function (evt, tags) { $scope.filtered_tags = []; diff --git a/js/app/controllers/settings.js b/js/app/controllers/settings.js new file mode 100644 index 00000000..e51dbddd --- /dev/null +++ b/js/app/controllers/settings.js @@ -0,0 +1,88 @@ +'use strict'; + +/** + * @ngdoc function + * @name passmanApp.controller:SettingsCtrl + * @description + * # SettingsCtrl + * Controller of the passmanApp + */ +angular.module('passmanApp') + .controller('SettingsCtrl', ['$scope', '$rootScope', 'SettingsService', 'VaultService', 'CredentialService', '$location', '$routeParams', function ($scope, $rootScope, SettingsService, VaultService, CredentialService, $location, $routeParams) { + + $scope.tabs = [{ + title: 'General settings', + url: 'views/partials/forms/settings/general_settings.html' + }, { + title: 'Password Tool', + url: 'views/partials/forms/settings/tool.html' + + }]; + + $scope.currentTab = $scope.tabs[1]; + + $scope.onClickTab = function (tab) { + $scope.currentTab = tab; + }; + + $scope.isActiveTab = function (tab) { + return tab.url == $scope.currentTab.url; + }; + + $scope.$watch(function () { + return VaultService.getActiveVault() + }, function (vault) { + console.log(vault); + $scope.active_vault = vault; + }); + + if (!SettingsService.getSetting('defaultVault') || !SettingsService.getSetting('defaultVaultPass')) { + if (!$scope.active_vault) { + $location.path('/') + } + } else { + if (SettingsService.getSetting('defaultVault') && SettingsService.getSetting('defaultVaultPass')) { + var _vault = angular.copy(SettingsService.getSetting('defaultVault')); + _vault.vaultKey = angular.copy(SettingsService.getSetting('defaultVaultPass')); + VaultService.setActiveVault(_vault); + $scope.active_vault = _vault; + + } + } + if ($scope.active_vault) { + $scope.$parent.selectedVault = true; + } + + $rootScope.$on('logout', function () { + $scope.selectedVault = false; + }); + + $scope.startScan = function(minStrength){ + VaultService.getVault($scope.active_vault).then(function(credentials){ + var results = []; + for(var i = 0; i < credentials.length; i++){ + var c = CredentialService.decryptCredential(angular.copy(credentials[i])); + if(c.password && c.password.length > 0 && c.hidden == 0) { + var zxcvbn_result = zxcvbn(c.password); + if(zxcvbn_result.score <= minStrength){ + results.push({ + credential_id: c.credential_id, + label: c.label, + password: c.password, + password_zxcvbn_result: zxcvbn_result + }); + } + } + //@todo loop custom fields (if any and check secret fields + } + $scope.scan_result = results; + }); + }; + + $scope.cancel = function () { + $location.path('/vault/' + $routeParams.vault_id); + + }; + + }]); + diff --git a/js/templates.js b/js/templates.js index e3cbdffc..38e9e553 100644 --- a/js/templates.js +++ b/js/templates.js @@ -1,4 +1,4 @@ -angular.module('templates-main', ['views/credential_revisions.html', 'views/edit_credential.html', 'views/partials/forms/edit_credential/basics.html', 'views/partials/forms/edit_credential/custom_fields.html', 'views/partials/forms/edit_credential/files.html', 'views/partials/forms/edit_credential/otp.html', 'views/partials/forms/edit_credential/password.html', 'views/partials/forms/share_credential/basics.html', 'views/partials/forms/share_credential/expire_settings.html', 'views/partials/password-meter.html', 'views/share_credential.html', 'views/show_vault.html', 'views/vaults.html']); +angular.module('templates-main', ['views/credential_revisions.html', 'views/edit_credential.html', 'views/partials/forms/edit_credential/basics.html', 'views/partials/forms/edit_credential/custom_fields.html', 'views/partials/forms/edit_credential/files.html', 'views/partials/forms/edit_credential/otp.html', 'views/partials/forms/edit_credential/password.html', 'views/partials/forms/settings/general_settings.html', 'views/partials/forms/settings/tool.html', 'views/partials/forms/share_credential/basics.html', 'views/partials/forms/share_credential/expire_settings.html', 'views/partials/password-meter.html', 'views/settings.html', 'views/share_credential.html', 'views/show_vault.html', 'views/vaults.html']); angular.module('views/credential_revisions.html', []).run(['$templateCache', function($templateCache) { 'use strict'; @@ -42,6 +42,18 @@ angular.module('views/partials/forms/edit_credential/password.html', []).run(['$ '
No expire date set {{ storedCredential.expire_time | date:\'dd-MM-yyyy @ HH:mm:ss\'}}
Password generation settings
'); }]); +angular.module('views/partials/forms/settings/general_settings.html', []).run(['$templateCache', function($templateCache) { + 'use strict'; + $templateCache.put('views/partials/forms/settings/general_settings.html', + '

Change vault key

'); +}]); + +angular.module('views/partials/forms/settings/tool.html', []).run(['$templateCache', function($templateCache) { + 'use strict'; + $templateCache.put('views/partials/forms/settings/tool.html', + '

The password tool will scan your password, calculate the avarage crack time and, if below the threshold, show them

Minimum password stength

Passman scanned your passwords, and here is the result.
A total of {{scan_result.length}} weak credentials.

LabelScorePasswordAction
{{result.label}}
'); +}]); + angular.module('views/partials/forms/share_credential/basics.html', []).run(['$templateCache', function($templateCache) { 'use strict'; $templateCache.put('views/partials/forms/share_credential/basics.html', @@ -62,6 +74,12 @@ angular.module('views/partials/password-meter.html', []).run(['$templateCache', '
Details Hide details
{{message}}
Password score:
{{score.score}}
Cracking times
100 / hour
Throttled online attack
{{score.crack_times_display.online_throttling_100_per_hour}}
10 / second
Unthrottled online attack
{{score.crack_times_display.online_no_throttling_10_per_second}}
10k / second
Offline attack, slow hash, many cores
{{score.crack_times_display.offline_slow_hashing_1e4_per_second}}
10B / second
offline attack, fast hash, many cores
{{score.crack_times_display.offline_fast_hashing_1e10_per_second}}
Match sequence:
See match sequence
{{sequence.token}}
Pattern{{sequence.pattern}}
Matched word{{sequence.matched_word}}
Dictionary name{{sequence.dictionary_name}}
Rank{{sequence.rank}}
Reversed{{sequence.reversed}}
Guesses{{sequence.guesses}}
Base guesses{{sequence.base_guesses}}
Uppercase variations{{sequence.uppercase_variations}}
l33t-variations{{sequence.l33t_variations}}
'); }]); +angular.module('views/settings.html', []).run(['$templateCache', function($templateCache) { + 'use strict'; + $templateCache.put('views/settings.html', + '
'); +}]); + angular.module('views/share_credential.html', []).run(['$templateCache', function($templateCache) { 'use strict'; $templateCache.put('views/share_credential.html', @@ -71,7 +89,7 @@ angular.module('views/share_credential.html', []).run(['$templateCache', functio angular.module('views/show_vault.html', []).run(['$templateCache', function($templateCache) { 'use strict'; $templateCache.put('views/show_vault.html', - '
+
Showing deleted since: All time {{delete_time | date:\'dd-MM-yyyy @ HH:mm:ss\'}}
{{credential.label}} {{tag.text}}
Label{{selectedCredential.label}}
Account
Password
OTP
E-mail
URL
Files
{{field.label}}
Expire time{{selectedCredential.expire_time * 1000 | date:\'dd-MM-yyyy @ HH:mm:ss\'}}
Changed{{selectedCredential.changed * 1000 | date:\'dd-MM-yyyy @ HH:mm:ss\'}}
Created{{selectedCredential.created * 1000 | date:\'dd-MM-yyyy @ HH:mm:ss\'}}
{{tag.text}}
'); + '
+
Showing deleted since: All time {{delete_time | date:\'dd-MM-yyyy @ HH:mm:ss\'}}
{{credential.label}} {{tag.text}}
Label{{selectedCredential.label}}
Account
Password
OTP
E-mail
URL
Files
{{field.label}}
Expire time{{selectedCredential.expire_time * 1000 | date:\'dd-MM-yyyy @ HH:mm:ss\'}}
Changed{{selectedCredential.changed * 1000 | date:\'dd-MM-yyyy @ HH:mm:ss\'}}
Created{{selectedCredential.created * 1000 | date:\'dd-MM-yyyy @ HH:mm:ss\'}}
{{tag.text}}
'); }]); angular.module('views/vaults.html', []).run(['$templateCache', function($templateCache) { diff --git a/js/vendor/ng-password-meter/ng-password-meter.js b/js/vendor/ng-password-meter/ng-password-meter.js index d2c4a28a..b0db0a71 100644 --- a/js/vendor/ng-password-meter/ng-password-meter.js +++ b/js/vendor/ng-password-meter/ng-password-meter.js @@ -91,13 +91,9 @@ scope.strength = _score.score; scope.masterClass = ''; - if (scope.strength == 0) { + if (scope.strength <= 1) { scope.first = 'poor'; scope.message = 'poor'; - } else if (scope.strength == 1) { - scope.first = 'poor'; - scope.second = 'poor'; - scope.message = 'poor'; } else if (scope.strength == 2) { scope.first = 'weak'; scope.second = 'weak'; diff --git a/sass/app.scss b/sass/app.scss index 12af5678..cbb600da 100644 --- a/sass/app.scss +++ b/sass/app.scss @@ -9,6 +9,7 @@ @import 'credentials'; @import 'menu'; @import 'share_credential'; +@import 'settings'; #app-settings-content:not(.ng-hide) { height: 60px; diff --git a/sass/settings.scss b/sass/settings.scss new file mode 100644 index 00000000..78a5aa20 --- /dev/null +++ b/sass/settings.scss @@ -0,0 +1,7 @@ +.scan-result-table{ + margin-top: 10px; + .score{ + padding-left: 0px; + padding-right: 15px; + } +} \ No newline at end of file diff --git a/templates/main.php b/templates/main.php index 4408b325..4a660637 100644 --- a/templates/main.php +++ b/templates/main.php @@ -32,6 +32,7 @@ script('passman', 'app/controllers/credential'); script('passman', 'app/controllers/edit_credential'); script('passman', 'app/controllers/share'); script('passman', 'app/controllers/revision'); +script('passman', 'app/controllers/settings'); script('passman', 'app/filters/range'); script('passman', 'app/filters/propsfilter'); script('passman', 'app/filters/byte'); @@ -102,7 +103,7 @@ style('passman', 'app');
-
Settings
+
Settings
Logout
Donate
diff --git a/templates/views/partials/forms/settings/general_settings.html b/templates/views/partials/forms/settings/general_settings.html new file mode 100644 index 00000000..8e0664d1 --- /dev/null +++ b/templates/views/partials/forms/settings/general_settings.html @@ -0,0 +1,17 @@ +
+
+

Change vault key

+ + + + + + + + +
+
+ +
+
\ No newline at end of file diff --git a/templates/views/partials/forms/settings/tool.html b/templates/views/partials/forms/settings/tool.html new file mode 100644 index 00000000..eb35b112 --- /dev/null +++ b/templates/views/partials/forms/settings/tool.html @@ -0,0 +1,45 @@ +
+
+

The password tool will scan your password, calculate the avarage + crack time and, if below the threshold, show them

+
+
+ Minimum password stength + +
+
+
+
+

Passman scanned your passwords, and here is the result.
+ A total of {{scan_result.length}} weak credentials.
+

+ + + + + + + + + + + + + + + + + +
LabelScorePasswordAction
{{result.label}} + + + + + +
+
+ +
\ No newline at end of file diff --git a/templates/views/settings.html b/templates/views/settings.html new file mode 100644 index 00000000..52f518c5 --- /dev/null +++ b/templates/views/settings.html @@ -0,0 +1,26 @@ +
+
+ +
+
+ + +
+
+
+ + diff --git a/templates/views/show_vault.html b/templates/views/show_vault.html index b9b36300..4d8f6564 100644 --- a/templates/views/show_vault.html +++ b/templates/views/show_vault.html @@ -28,7 +28,7 @@ New shared credential - + w