Add password strength scanner

This commit is contained in:
brantje 2016-09-24 20:16:57 +02:00
parent 39b64b6e87
commit b8e1ecc490
14 changed files with 226 additions and 11 deletions

View file

@ -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;

File diff suppressed because one or more lines are too long

View file

@ -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: '/'
});

View file

@ -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 = [];

View file

@ -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);
};
}]);

View file

@ -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(['$
'<div class="row"><div class="col-xs-12 col-md-5 col-lg-5"><label>Password</label><div><password-gen ng-model="storedCredential.password" settings="pwSettings" callback="pwGenerated"></password-gen><ng-password-meter password="storedCredential.password"></ng-password-meter></div><label>Repeat password</label><div><input type="password" ng-model="storedCredential.password_repeat"></div><label>Expire date</label><div><span datetime-picker ng-model="storedCredential.expire_time" class="link" future-only ng-show="storedCredential.expire_time == 0" close-on-select="false">No expire date set</span> <span datetime-picker ng-model="storedCredential.expire_time" class="link" future-only ng-show="storedCredential.expire_time != 0" close-on-select="false">{{ storedCredential.expire_time | date:\'dd-MM-yyyy @ HH:mm:ss\'}}</span></div><label>Renew interval</label><div><input type="number" ng-model="renewIntervalValue" min="0" ng-change="updateInterval(renewIntervalValue, renewIntervalModifier)"><select ng-model="renewIntervalModifier" ng-change="updateInterval(renewIntervalValue, renewIntervalModifier)"><option value="0">Disabled</option><option value="86400">Day(s)</option><option value="604800">Week(s)</option><option value="2592000">Month(s)</option><option value="31622400">Year(s)</option></select></div></div><div class="col-xs-12 col-md-7 col-lg-7">Password generation settings<div class="row"><div class="password_settings"><div class="col-xs-12 col-sm-5 col-lg-4"><label><span class="label">Password length</span><br><input type="number" ng-model="pwSettings.length" min="1"></label><label><span class="label">Minimum amount of digits</span><br><input type="number" ng-model="pwSettings.minimumDigitCount" min="0"></label></div><div class="col-xs-12 col-sm-6 col-lg-6"><label><input type="checkbox" ng-model="pwSettings.useUppercase"> <span class="label sm">Use uppercase letters</span></label><label><input ng-model="pwSettings.useLowercase" type="checkbox" id="lower"> <span class="label sm">Use lowercase letters</span></label><label><input ng-model="pwSettings.useDigits" type="checkbox" id="digits"> <span class="label sm">Use numbers</span></label><label><input type="checkbox" id="special" ng-model="pwSettings.useSpecialChars"> <span class="label sm">Use special characters</span></label><label><input type="checkbox" id="ambig" ng-model="pwSettings.avoidAmbiguousCharacters"> <span class="label sm">Avoid ambiguous characters</span></label><label><input type="checkbox" ng-model="pwSettings.requireEveryCharType" id="reqevery"> <span class="label sm">Require every character type</span></label></div></div></div></div></div>');
}]);
angular.module('views/partials/forms/settings/general_settings.html', []).run(['$templateCache', function($templateCache) {
'use strict';
$templateCache.put('views/partials/forms/settings/general_settings.html',
'<div class="row"><div class="col-xs-12 col-md-6"><h3>Change vault key</h3><label>Old vault password</label><input type="password" ng-model="oldVaultPass"><label>New vault password</label><password-gen ng-model="newVaultPass"></password-gen><ng-password-meter password="newVaultPass"></ng-password-meter><label>New vault password</label><input type="password" ng-model="newVaultPass2"> <button ng-click="changeVaultPassword(oldVaultPass,newVaultPass,newVaultPass2)" tooltip="\'Not working :P\'">Change</button></div><div class="col-xs-12 col-md-6"></div></div>');
}]);
angular.module('views/partials/forms/settings/tool.html', []).run(['$templateCache', function($templateCache) {
'use strict';
$templateCache.put('views/partials/forms/settings/tool.html',
'<div class="row"><div class="col-xs-12"><p>The password tool will scan your password, calculate the avarage crack time and, if below the threshold, show them</p></div><div class="col-xs-12" ng-init="minStrength = 3;">Minimum password stength <input type="number" min="1" max="4" value="3" ng-model="minStrength"> <button ng-click="startScan(minStrength)">Start scan</button></div></div><div class="row" ng-show="scan_result"><div class="col-xs-12"><p>Passman scanned your passwords, and here is the result.<br>A total of <b>{{scan_result.length}}</b> weak credentials.<br></p><table class="table scan-result-table"><thead><tr><td>Label</td><td>Score</td><td>Password</td><td>Action</td></tr></thead><tbody><tr ng-repeat="result in scan_result | orderBy:\'password_zxcvbn_result.score\'"><td>{{result.label}}</td><td class="score"><ng-password-meter password="result.password"></ng-password-meter></td><td><span credential-field value="result.password" secret="\'true\'"></span></td><td><a class="link" ng-href="#/vault/{{active_vault.vault_id}}/edit/{{result.credential_id}}" tooltip="\'Edit credential\'"><i class="fa fa-edit"></i></a></td></tr></tbody></table></div></div>');
}]);
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',
'<div class="pass-meter {{masterClass}}" off-click="matchBreakdown = false;"><div class="{{colClass}} pass-meter-col {{first}}"><div class="indicator"></div></div><div class="{{colClass}} pass-meter-col {{second}}"><div class="indicator"></div></div><div class="{{colClass}} pass-meter-col {{third}}"><div class="indicator"></div></div><div class="{{colClass}} pass-meter-col {{fourth}}"><div class="indicator"></div></div><div class="details" ng-click="toggleScore()"><span ng-show="!scoreShown">Details</span> <span ng-show="scoreShown">Hide details</span></div><div class="pass-meter-message">{{message}}</div><div class="detail_box" ng-show="scoreShown"><div class="row"><div class="col-xs-6">Password score:</div><div class="col-xs-6">{{score.score}}</div></div><div><b>Cracking times</b></div><div class="row"><div class="col-xs-6">100 / hour<br><small>Throttled online attack</small></div><div class="col-xs-6">{{score.crack_times_display.online_throttling_100_per_hour}}</div></div><div class="row"><div class="col-xs-6">10 / second<br><small>Unthrottled online attack</small></div><div class="col-xs-6">{{score.crack_times_display.online_no_throttling_10_per_second}}</div></div><div class="row"><div class="col-xs-6">10k / second<br><small>Offline attack, slow hash, many cores</small></div><div class="col-xs-6">{{score.crack_times_display.offline_slow_hashing_1e4_per_second}}</div></div><div class="row"><div class="col-xs-6">10B / second<br><small>offline attack, fast hash, many cores</small></div><div class="col-xs-6">{{score.crack_times_display.offline_fast_hashing_1e10_per_second}}</div></div><div class="row"><div class="col-xs-6">Match sequence:</div><div class="col-xs-6"><span class="link" ng-click="toggleMatchBreakdown()">See match sequence</span></div></div></div></div><div class="match-sequence"><div class="sequence_container" ng-style="{\'width\': score.sequence.length * 210 }"><div class="sequence" ng-repeat="sequence in score.sequence"><table><tr><td colspan="2" class="token"><code>{{sequence.token}}</code></td></tr><tr ng-if="sequence.pattern"><td>Pattern</td><td>{{sequence.pattern}}</td></tr><tr ng-if="sequence.matched_word"><td>Matched word</td><td>{{sequence.matched_word}}</td></tr><tr ng-if="sequence.dictionary_name"><td>Dictionary name</td><td>{{sequence.dictionary_name}}</td></tr><tr ng-if="sequence.rank"><td>Rank</td><td>{{sequence.rank}}</td></tr><tr ng-if="sequence.reversed"><td>Reversed</td><td>{{sequence.reversed}}</td></tr><tr ng-if="sequence.guesses"><td>Guesses</td><td>{{sequence.guesses}}</td></tr><tr ng-if="sequence.base_guesses"><td>Base guesses</td><td>{{sequence.base_guesses}}</td></tr><tr ng-if="sequence.uppercase_variations"><td>Uppercase variations</td><td>{{sequence.uppercase_variations}}</td></tr><tr ng-if="sequence.l33t_variations"><td>l33t-variations</td><td>{{sequence.l33t_variations}}</td></tr></table></div></div></div>');
}]);
angular.module('views/settings.html', []).run(['$templateCache', function($templateCache) {
'use strict';
$templateCache.put('views/settings.html',
'<div id="controls"><div class="actions creatable"><div class="breadcrumb"><div class="crumb svg ui-droppable"><a ng-click="logout()"><i class="fa fa-home"></i></a></div><div class="crumb svg"><a ng-click="cancel()">{{active_vault.name}}</a></div><div class="crumb svg last"><a>Settings</a></div></div></div></div><ul class="tab_header"><li ng-repeat="tab in tabs track by $index" class="tab" ng-class="{active:isActiveTab(tab)}" ng-click="onClickTab(tab)">{{tab.title}}</li></ul><div class="tab_container edit_credential"><div ng-include="currentTab.url"></div></div>');
}]);
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',
'<div id="controls"><div class="breadcrumb"><div class="breadcrumb"><div class="crumb svg ui-droppable" data-dir="/"><a><i class="fa fa-home"></i></a></div><div class="crumb svg last"><a>{{active_vault.name}}</a></div></div></div><div class="actions creatable"><span ng-click="menuOpen = !menuOpen" class="button new" ng-init="menuOpen = false" off-click="menuOpen = false;"><span>+</span></span><div class="actionList popovermenu bubble menu" ng-show="menuOpen"><ul><li><span ng-click="addCredential()" class="menuitem action"><span class="icon icon-rename"></span> <span>New credential</span></span></li><li><span href="#" class="menuitem action"><span class="icon icon-shared"></span> <span>New shared credential</span></span></li></ul></div><div class="searchboxContainer"><input type="text" ng-model="itemFilter.label" class="searchbox" placeholder="Search credential..."></div><span class="title" ng-if="delete_time">Showing deleted since: <span ng-if="delete_time == 1">All time</span> <span ng-if="delete_time > 1">{{delete_time | date:\'dd-MM-yyyy @ HH:mm:ss\'}}</span></span></div></div><div off-click="closeSelected()"><table class="credential-table" ng-init="menuOpen = false;"><tr ng-repeat="credential in credentials | filter:itemFilter | tagFilter:selectedtags | as:this:\'filtered_credentials\'" ng-if="credential.hidden == 0 && showCredentialRow(credential)" ng-click="selectCredential(credential)" ng-class="{\'selected\': selectedCredential.credential_id == credential.credential_id}"><td><span class="icon"><i class="fa fa-lock"></i></span> <span class="label">{{credential.label}}</span> <span class="tags"><span class="tag" ng-repeat="tag in credential.tags_raw">{{tag.text}}</span></span></td></tr></table><div id="app-sidebar" class="detailsView scroll-container app_sidebar" ng-show="selectedCredential"><span class="close icon-close" ng-click="closeSelected()" alt="Close"></span><table><tr ng-show="selectedCredential.label"><td>Label</td><td>{{selectedCredential.label}}</td></tr><tr ng-show="selectedCredential.username"><td>Account</td><td><span credential-field value="selectedCredential.username"></span></td></tr><tr ng-show="selectedCredential.password"><td>Password</td><td><span credential-field value="selectedCredential.password" secret="\'true\'"></span></td></tr><tr ng-show="selectedCredential.otp.secret"><td>OTP</td><td><span otp-generator secret="selectedCredential.otp.secret"></span></td></tr><tr ng-show="selectedCredential.email"><td>E-mail</td><td><span credential-field value="selectedCredential.email"></span></td></tr><tr ng-show="selectedCredential.url"><td>URL</td><td><span credential-field value="selectedCredential.url"></span></td></tr><tr ng-show="selectedCredential.files.length > 0"><td>Files</td><td><div ng-repeat="file in selectedCredential.files" class="link" ng-click="downloadFile(file)">{{file.filename}} ({{file.size | bytes}})</div></td></tr><tr ng-repeat="field in selectedCredential.custom_fields"><td>{{field.label}}</td><td><span credential-field value="field.value" secret="field.secret"></span></td></tr><tr ng-show="selectedCredential.expire_time > 0"><td>Expire time</td><td>{{selectedCredential.expire_time * 1000 | date:\'dd-MM-yyyy @ HH:mm:ss\'}}</td></tr><tr ng-show="selectedCredential.changed"><td>Changed</td><td>{{selectedCredential.changed * 1000 | date:\'dd-MM-yyyy @ HH:mm:ss\'}}</td></tr><tr ng-show="selectedCredential.created"><td>Created</td><td>{{selectedCredential.created * 1000 | date:\'dd-MM-yyyy @ HH:mm:ss\'}}</td></tr></table><div class="tags"><span class="tag" ng-repeat="tag in selectedCredential.tags">{{tag.text}}</span></div><div ng-show="selectedCredential"><button class="button" ng-click="editCredential(selectedCredential)" ng-if="selectedCredential.delete_time == 0"><span class="fa fa-edit"></span> Edit</button> <button class="button" ng-click="deleteCredential(selectedCredential)" ng-if="selectedCredential.delete_time == 0"><span class="fa fa-trash"></span> Delete</button> <button class="button" ng-click="shareCredential(selectedCredential)" ng-if="selectedCredential.delete_time == 0"><span class="fa fa-share"></span> Share</button> <button class="button" ng-click="getRevisions(selectedCredential)" ng-if="selectedCredential.delete_time == 0"><span class="fa fa-undo"></span> Revisions</button> <button class="button" ng-if="selectedCredential.delete_time > 0" ng-click="recoverCredential(selectedCredential)"><span class="fa fa-recycle"></span> Recover</button> <button class="button" ng-if="selectedCredential.delete_time > 0" ng-click="destroyCredential(selectedCredential)"><span class="fa fa-bomb"></span> Destroy</button></div></div></div>');
'<div id="controls"><div class="breadcrumb"><div class="breadcrumb"><div class="crumb svg ui-droppable" data-dir="/"><a><i class="fa fa-home"></i></a></div><div class="crumb svg last"><a>{{active_vault.name}}</a></div></div></div><div class="actions creatable"><span ng-click="menuOpen = !menuOpen" class="button new" ng-init="menuOpen = false" off-click="menuOpen = false;"><span>+</span></span><div class="actionList popovermenu bubble menu" ng-show="menuOpen"><ul><li><span ng-click="addCredential()" class="menuitem action"><span class="icon icon-rename"></span> <span>New credential</span></span></li><li><span href="#" class="menuitem action"><span class="icon icon-shared"></span> <span>New shared credential</span></span>w</li></ul></div><div class="searchboxContainer"><input type="text" ng-model="itemFilter.label" class="searchbox" placeholder="Search credential..."></div><span class="title" ng-if="delete_time">Showing deleted since: <span ng-if="delete_time == 1">All time</span> <span ng-if="delete_time > 1">{{delete_time | date:\'dd-MM-yyyy @ HH:mm:ss\'}}</span></span></div></div><div off-click="closeSelected()"><table class="credential-table" ng-init="menuOpen = false;"><tr ng-repeat="credential in credentials | filter:itemFilter | tagFilter:selectedtags | as:this:\'filtered_credentials\'" ng-if="credential.hidden == 0 && showCredentialRow(credential)" ng-click="selectCredential(credential)" ng-class="{\'selected\': selectedCredential.credential_id == credential.credential_id}"><td><span class="icon"><i class="fa fa-lock"></i></span> <span class="label">{{credential.label}}</span> <span class="tags"><span class="tag" ng-repeat="tag in credential.tags_raw">{{tag.text}}</span></span></td></tr></table><div id="app-sidebar" class="detailsView scroll-container app_sidebar" ng-show="selectedCredential"><span class="close icon-close" ng-click="closeSelected()" alt="Close"></span><table><tr ng-show="selectedCredential.label"><td>Label</td><td>{{selectedCredential.label}}</td></tr><tr ng-show="selectedCredential.username"><td>Account</td><td><span credential-field value="selectedCredential.username"></span></td></tr><tr ng-show="selectedCredential.password"><td>Password</td><td><span credential-field value="selectedCredential.password" secret="\'true\'"></span></td></tr><tr ng-show="selectedCredential.otp.secret"><td>OTP</td><td><span otp-generator secret="selectedCredential.otp.secret"></span></td></tr><tr ng-show="selectedCredential.email"><td>E-mail</td><td><span credential-field value="selectedCredential.email"></span></td></tr><tr ng-show="selectedCredential.url"><td>URL</td><td><span credential-field value="selectedCredential.url"></span></td></tr><tr ng-show="selectedCredential.files.length > 0"><td>Files</td><td><div ng-repeat="file in selectedCredential.files" class="link" ng-click="downloadFile(file)">{{file.filename}} ({{file.size | bytes}})</div></td></tr><tr ng-repeat="field in selectedCredential.custom_fields"><td>{{field.label}}</td><td><span credential-field value="field.value" secret="field.secret"></span></td></tr><tr ng-show="selectedCredential.expire_time > 0"><td>Expire time</td><td>{{selectedCredential.expire_time * 1000 | date:\'dd-MM-yyyy @ HH:mm:ss\'}}</td></tr><tr ng-show="selectedCredential.changed"><td>Changed</td><td>{{selectedCredential.changed * 1000 | date:\'dd-MM-yyyy @ HH:mm:ss\'}}</td></tr><tr ng-show="selectedCredential.created"><td>Created</td><td>{{selectedCredential.created * 1000 | date:\'dd-MM-yyyy @ HH:mm:ss\'}}</td></tr></table><div class="tags"><span class="tag" ng-repeat="tag in selectedCredential.tags">{{tag.text}}</span></div><div ng-show="selectedCredential"><button class="button" ng-click="editCredential(selectedCredential)" ng-if="selectedCredential.delete_time == 0"><span class="fa fa-edit"></span> Edit</button> <button class="button" ng-click="deleteCredential(selectedCredential)" ng-if="selectedCredential.delete_time == 0"><span class="fa fa-trash"></span> Delete</button> <button class="button" ng-click="shareCredential(selectedCredential)" ng-if="selectedCredential.delete_time == 0"><span class="fa fa-share"></span> Share</button> <button class="button" ng-click="getRevisions(selectedCredential)" ng-if="selectedCredential.delete_time == 0"><span class="fa fa-undo"></span> Revisions</button> <button class="button" ng-if="selectedCredential.delete_time > 0" ng-click="recoverCredential(selectedCredential)"><span class="fa fa-recycle"></span> Recover</button> <button class="button" ng-if="selectedCredential.delete_time > 0" ng-click="destroyCredential(selectedCredential)"><span class="fa fa-bomb"></span> Destroy</button></div></div></div>');
}]);
angular.module('views/vaults.html', []).run(['$templateCache', function($templateCache) {

View file

@ -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';

View file

@ -9,6 +9,7 @@
@import 'credentials';
@import 'menu';
@import 'share_credential';
@import 'settings';
#app-settings-content:not(.ng-hide) {
height: 60px;

7
sass/settings.scss Normal file
View file

@ -0,0 +1,7 @@
.scan-result-table{
margin-top: 10px;
.score{
padding-left: 0px;
padding-right: 15px;
}
}

View file

@ -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');
<div id="app-settings-content" ng-show="settingsShown">
<!-- Your settings in here -->
<div class="settings-container">
<div><span class="link">Settings</span></div>
<div><a class="link" ng-href="#/vault/{{active_vault.vault_id}}/settings">Settings</a></div>
<div><span class="link" ng-click="logout()">Logout</span></div>
<div><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6YS8F97PETVU2" target="_blank" class="link">Donate</a></div>
</div>

View file

@ -0,0 +1,17 @@
<div class="row">
<div class="col-xs-12 col-md-6">
<h3>Change vault key</h3>
<label>Old vault password</label>
<input type="password" ng-model="oldVaultPass">
<label>New vault password</label>
<password-gen ng-model="newVaultPass"
></password-gen>
<ng-password-meter password="newVaultPass"></ng-password-meter>
<label>New vault password</label>
<input type="password" ng-model="newVaultPass2">
<button ng-click="changeVaultPassword(oldVaultPass,newVaultPass,newVaultPass2)" tooltip="'Not working :P'">Change</button>
</div>
<div class="col-xs-12 col-md-6">
</div>
</div>

View file

@ -0,0 +1,45 @@
<div class="row">
<div class="col-xs-12">
<p>The password tool will scan your password, calculate the avarage
crack time and, if below the threshold, show them</p>
</div>
<div class="col-xs-12" ng-init="minStrength = 3;">
Minimum password stength <input type="number" min="1" max="4" value="3"
ng-model="minStrength">
<button ng-click="startScan(minStrength)">Start scan</button>
</div>
</div>
<div class="row" ng-show="scan_result">
<div class="col-xs-12">
<p>Passman scanned your passwords, and here is the result.<br/>
A total of <b>{{scan_result.length}}</b> weak credentials.<br/>
</p>
<table class="table scan-result-table">
<thead>
<tr>
<td>Label</td>
<td>Score</td>
<td>Password</td>
<td>Action</td>
</tr>
</thead>
<tbody>
<tr ng-repeat="result in scan_result | orderBy:'password_zxcvbn_result.score'">
<td>{{result.label}}</td>
<td class="score">
<ng-password-meter
password="result.password"></ng-password-meter>
</td>
<td>
<span credential-field value="result.password"
secret="'true'"></span>
</td>
<td>
<a class="link" ng-href="#/vault/{{active_vault.vault_id}}/edit/{{result.credential_id}}" tooltip="'Edit credential'"><i class="fa fa-edit"></i></a>
</td>
</tr>
</tbody>
</table>
</div>
</div>

View file

@ -0,0 +1,26 @@
<div id="controls">
<div class="actions creatable">
<div class="breadcrumb">
<div class="crumb svg ui-droppable" >
<a ng-click="logout()"><i class="fa fa-home"></i></a>
</div>
<div class="crumb svg">
<a ng-click="cancel()">{{active_vault.name}}</a>
</div>
<div class="crumb svg last">
<a>Settings</a>
</div>
</div>
</div>
</div>
<ul class="tab_header">
<li ng-repeat="tab in tabs track by $index" class="tab"
ng-class="{active:isActiveTab(tab)}"
ng-click="onClickTab(tab)">{{tab.title}}</li>
</ul>
<div class="tab_container edit_credential">
<div ng-include="currentTab.url"></div>
</div>

View file

@ -28,7 +28,7 @@
<span href="#" class="menuitem action">
<span class="icon icon-shared"></span>
<span>New shared credential</span>
</span>
</span>w
</li>
</ul>
</div>