Skip to content

Commit

Permalink
added password generator script
Browse files Browse the repository at this point in the history
  • Loading branch information
ansuz committed Dec 13, 2014
1 parent bc0fbf1 commit 0ccbc83
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/keys/passgen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
var args=process.argv;
var L=args[2]||31;

var chars="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");

var result="";

for(var i=0,l=chars.length;i<L;i++){
result+=chars[Math.floor(Math.random()*l)];
}

console.log(result);

0 comments on commit 0ccbc83

Please sign in to comment.