From 88686cdc5d90caae69eb56d75af16601b2756071 Mon Sep 17 00:00:00 2001 From: Martin Donnelly Date: Wed, 19 Aug 2015 11:20:23 +0100 Subject: [PATCH] new password generator --- app/libs/password.js | 109 ++++++ app/oldslack.htm | 869 ++++++++++++++++++++++++------------------ app/password.html | 0 app/password.new.html | 14 + lib/password.js | 92 +++++ web-server.js | 5 +- 6 files changed, 712 insertions(+), 377 deletions(-) create mode 100644 app/libs/password.js create mode 100644 app/password.html create mode 100644 app/password.new.html create mode 100644 lib/password.js diff --git a/app/libs/password.js b/app/libs/password.js new file mode 100644 index 0000000..528edaa --- /dev/null +++ b/app/libs/password.js @@ -0,0 +1,109 @@ +Array.prototype.random = function () { + return this[Math.floor((Math.random()*this.length))]; +}; + +var alpha = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','0','1','2','3','4','5','6','7','8','9']; +var whitespace = ['.','~','#','!','$','+','-','+']; +var numbers = ['0','1','2','3','4','5','6','7','8','9']; +var left = ["Alabama", + "Alaska", + "Arizona", + "Arkansas", + "California", + "Colorado", + "Connecticut", + "Delaware", + "Florida", + "Georgia", + "Idaho", + "Illinois", + "Indiana", + "Iowa", + "Kansas", + "Kentucky", + "Louisiana", + "Maine", + "Maryland", + "Michigan", + "Minnesota", + "Missouri", + "Montana", + "Nebraska", + "Nevada", + "New Hampshire", + "New Jersey", + "New Mexico", + "New York", + "North Carolina", + "North Dakota", + "Ohio", + "Oklahoma", + "Oregon", + "Palau", + "Pennsylvania", + "Puerto Rico", + "Rhode Island", + "South Carolina", + "South Dakota", + "Tennessee", + "Texas", + "Utah", + "Vermont", + "Virgin Islands", + "Virginia", + "Washington", + "West Virginia", + "Wisconsin", + "Wyoming", + "Glasgow", + "Inverness", + "Edinburgh", + "Dumbarton", + "Balloch", + "Renton", + "Helensburgh", + "Cardross", + "Dundee", + "Aberdeen", + "Paisley", + "Hamilton", + "Greenock", + "Falkirk", + "Irvine", + "Clydebank", + "Renfrew", + "Barrhead", + "Erskine", + "London", + "Hammersmith", + "Islington" + +]; + +var right = ['Aganju', 'Cygni', 'Akeron', 'Antares', 'Aragoth', 'Arduinne', 'Ardus', 'Aquitaine', 'Carpenter', 'Beta Hydri', 'Cooper', 'Dahin', 'Capella', 'Endriago', 'Gallina', 'Fenris', 'Freya', 'Glenn', 'Grissom', 'Tau Ceti', 'Jotunheim', 'Kailaasa', 'Lagarto', 'Muspelheim', 'Nifleheim', 'Odin Rex', 'Primus', 'Vega', 'Ragnarok', 'Shepard', 'Slayton', 'Tarsis', 'Mercury', 'Venus', 'Mars', 'Earth', 'Terra', 'Jupiter', 'Saturn', 'Uranus', 'Neptune', 'Pluto', 'Europa', 'Ganymede', 'Callisto', 'Titan', 'Juno', 'Eridanus', 'Cassiopeia', 'Scorpius', 'Crux', 'Cancer', 'Taurus', 'Lyra', 'Andromeda', 'Virgo', 'Aquarius', 'Cygnus', 'Corvus', 'Taurus', 'Draco', 'Perseus', 'Pegasus', 'Gemini', 'Columbia', 'Bootes', 'Orion', 'Deneb']; + +var numberCluster = function() { + return numbers.random() + numbers.random() + numbers.random(); +}; + +var randomAmount = function(i) { + var str=''; + + for (var t=0;t + Slack @@ -24,7 +25,24 @@ padding: 0; } - body, ul, ol, dl, h1, h2, h3, h4, h5, h6, td, th, caption, pre, p, blockquote, input, textarea { + body, + ul, + ol, + dl, + h1, + h2, + h3, + h4, + h5, + h6, + td, + th, + caption, + pre, + p, + blockquote, + input, + textarea { font: .9em 'Helvetica Neue', Helvetica, 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; color: #333; } @@ -39,14 +57,20 @@ color: #666; } - h1, h2, h3, h4, h5, h6 { + h1, + h2, + h3, + h4, + h5, + h6 { font-family: 'Helvetica Neue', Helvetica, 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; color: #FFF; margin: 0; padding: 9px 0; } - h1 a, h1 a:visited { + h1 a, + h1 a:visited { color: #EEE; } @@ -128,7 +152,8 @@ padding-left: 10px; } - a:hover, .red { + a:hover, + .red { color: #C00; } @@ -138,7 +163,8 @@ background-color: #ffffff; } - #btc, #fx { + #btc, + #fx { font-size: 75%; } @@ -154,391 +180,484 @@ color: #000000; } - s0 {border: solid 1px rgb(0,128,0);} - s1 {border: solid 1px rgb(4,124,0);} - s2 {border: solid 1px rgb(8,120,0);} - s3 {border: solid 1px rgb(16,116,0);} - s4 {border: solid 1px rgb(20,112,0);} - s5 {border: solid 1px rgb(24,108,0);} - s6 {border: solid 1px rgb(28,104,0);} - s7 {border: solid 1px rgb(32,100,0);} - s8 {border: solid 1px rgb(36,96,0);} - s9 {border: solid 1px rgb(40,92,0);} - s10 {border: solid 1px rgb(44,88,0);} - s11 {border: solid 1px rgb(48,84,0);} - s12 {border: solid 1px rgb(52,80,0);} - s13 {border: solid 1px rgb(56,76,0);} - s14 {border: solid 1px rgb(60,72,0);} - s15 {border: solid 1px rgb(64,68,0);} - s16 {border: solid 1px rgb(68,64,0);} - s17 {border: solid 1px rgb(72,60,0);} - s18 {border: solid 1px rgb(76,56,0);} - s19 {border: solid 1px rgb(80,52,0);} - s20 {border: solid 1px rgb(84,48,0);} - s21 {border: solid 1px rgb(88,44,0);} - s22 {border: solid 1px rgb(92,40,0);} - s23 {border: solid 1px rgb(96,36,0);} - s24 {border: solid 1px rgb(100,32,0);} - s25 {border: solid 1px rgb(104,28,0);} - s26 {border: solid 1px rgb(108,26,0);} - s27 {border: solid 1px rgb(112,22,0);} - s28 {border: solid 1px rgb(116,18,0);} - s29 {border: solid 1px rgb(120,12,0);} - s30 {border: solid 1px rgb(124,8,0);} - s31 {border: solid 1px rgb(128,4,0);} - s32 {border: solid 1px rgb(128,0,0);} + s0 { + border: solid 1px rgb(0, 128, 0); + } + s1 { + border: solid 1px rgb(4, 124, 0); + } + s2 { + border: solid 1px rgb(8, 120, 0); + } + s3 { + border: solid 1px rgb(16, 116, 0); + } + s4 { + border: solid 1px rgb(20, 112, 0); + } + + s5 { + border: solid 1px rgb(24, 108, 0); + } + + s6 { + border: solid 1px rgb(28, 104, 0); + } + + s7 { + border: solid 1px rgb(32, 100, 0); + } + + s8 { + border: solid 1px rgb(36, 96, 0); + } + + s9 { + border: solid 1px rgb(40, 92, 0); + } + + s10 { + border: solid 1px rgb(44, 88, 0); + } + + s11 { + border: solid 1px rgb(48, 84, 0); + } + + s12 { + border: solid 1px rgb(52, 80, 0); + } + + s13 { + border: solid 1px rgb(56, 76, 0); + } + + s14 { + border: solid 1px rgb(60, 72, 0); + } + + s15 { + border: solid 1px rgb(64, 68, 0); + } + + s16 { + border: solid 1px rgb(68, 64, 0); + } + + s17 { + border: solid 1px rgb(72, 60, 0); + } + + s18 { + border: solid 1px rgb(76, 56, 0); + } + + s19 { + border: solid 1px rgb(80, 52, 0); + } + + s20 { + border: solid 1px rgb(84, 48, 0); + } + + s21 { + border: solid 1px rgb(88, 44, 0); + } + + s22 { + border: solid 1px rgb(92, 40, 0); + } + + s23 { + border: solid 1px rgb(96, 36, 0); + } + + s24 { + border: solid 1px rgb(100, 32, 0); + } + + s25 { + border: solid 1px rgb(104, 28, 0); + } + + s26 { + border: solid 1px rgb(108, 26, 0); + } + + s27 { + border: solid 1px rgb(112, 22, 0); + } + + s28 { + border: solid 1px rgb(116, 18, 0); + } + + s29 { + border: solid 1px rgb(120, 12, 0); + } + + s30 { + border: solid 1px rgb(124, 8, 0); + } + + s31 { + border: solid 1px rgb(128, 4, 0); + } + + s32 { + border: solid 1px rgb(128, 0, 0); + } - -
-

Slack - I have plenty of talent and vision I just don't give a damn

-
-

----   +
+

Slack - I have plenty of talent and vision I just don't give a damn

+ +
+

----  ----   ----

-
- - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + +
Starting Points/MetasitesToolsBitcoin
- - - - - - - - -
Package TrackingWeather ReportsFree Email WEBpages
- - - - - +
Computer Software, etc.Reference & Special sitesEarth and Beyond
+ + + + + + + + +
+
+
+ diff --git a/app/password.html b/app/password.html new file mode 100644 index 0000000..e69de29 diff --git a/app/password.new.html b/app/password.new.html new file mode 100644 index 0000000..a0ce202 --- /dev/null +++ b/app/password.new.html @@ -0,0 +1,14 @@ + + + + + Password Generator + + + + + + + + + diff --git a/lib/password.js b/lib/password.js new file mode 100644 index 0000000..35bea92 --- /dev/null +++ b/lib/password.js @@ -0,0 +1,92 @@ +var http = require('http'); + +Array.prototype.random = function() { + return this[Math.floor((Math.random() * this.length))]; +}; + +var alpha = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']; +var whitespace = ['.', '~', '#', '!', '$', '+', '-', '+']; +var numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']; +var left = ["Alabama", + "Alaska", + "Arizona", + "Arkansas", + "California", + "Colorado", + "Connecticut", + "Delaware", + "Florida", + "Georgia", + "Idaho", + "Illinois", + "Indiana", + "Iowa", + "Kansas", + "Kentucky", + "Louisiana", + "Maine", + "Maryland", + "Michigan", + "Minnesota", + "Missouri", + "Montana", + "Nebraska", + "Nevada", + "New Hampshire", + "New Jersey", + "New Mexico", + "New York", + "North Carolina", + "North Dakota", + "Ohio", + "Oklahoma", + "Oregon", + "Palau", + "Pennsylvania", + "Puerto Rico", + "Rhode Island", + "South Carolina", + "South Dakota", + "Tennessee", + "Texas", + "Utah", + "Vermont", + "Virgin Islands", + "Virginia", + "Washington", + "West Virginia", + "Wisconsin", + "Wyoming", + "Glasgow", + "Inverness", + "Edinburgh", + "Dumbarton", + "Balloch", + "Renton", + "Helensburgh", + "Cardross", + "Dundee", + "Aberdeen", + "Paisley", + "Hamilton", + "Greenock", + "Falkirk", + "Irvine", + "Clydebank", + "Renfrew", + "Barrhead", + "Erskine", + "London", + "Hammersmith", + "Islington", + "Silver","Black","Yellow","Purple" + +]; + +var right = ['Aganju', 'Cygni', 'Akeron', 'Antares', 'Aragoth', 'Arduinne', 'Ardus', 'Aquitaine', 'Carpenter', 'Beta Hydri', 'Cooper', 'Dahin', 'Capella', 'Endriago', 'Gallina', 'Fenris', 'Freya', 'Glenn', 'Grissom', 'Tau Ceti', 'Jotunheim', 'Kailaasa', 'Lagarto', 'Muspelheim', 'Nifleheim', 'Odin Rex', 'Primus', 'Vega', 'Ragnarok', 'Shepard', 'Slayton', 'Tarsis', 'Mercury', 'Venus', 'Mars', 'Earth', 'Terra', 'Jupiter', 'Saturn', 'Uranus', 'Neptune', 'Pluto', 'Europa', 'Ganymede', 'Callisto', 'Titan', 'Juno', 'Eridanus', 'Cassiopeia', 'Scorpius', 'Crux', 'Cancer', 'Taurus', 'Lyra', 'Andromeda', 'Virgo', 'Aquarius', 'Cygnus', 'Corvus', 'Taurus', 'Draco', 'Perseus', 'Pegasus', 'Gemini', 'Columbia', 'Bootes', 'Orion', 'Deneb']; + +module.exports = { + + + +} diff --git a/web-server.js b/web-server.js index 6e61c3d..9c7a806 100644 --- a/web-server.js +++ b/web-server.js @@ -1,4 +1,4 @@ -var express = require('express'), path = require('path'), http = require('http'), fx = require('./lib/fx'), btc = require('./lib/btc'), train = require('./lib/train') +var express = require('express'), path = require('path'), http = require('http'), fx = require('./lib/fx'), btc = require('./lib/btc'), train = require('./lib/train'), password = require('./lib/password') //train = require('lib/train') /* ,submit = require('./routes/mongo/submit') */ ; @@ -30,10 +30,11 @@ app.configure(function () { app.use('/fx', fx.doFx); app.use('/dbeglq', train.dbe_glq); - app.use('/glqdbe', train.glq_dbe); app.use('/gettrains', train.getTrainTimes); + app.use('/generate', password.generate); + app.use('/lot', function (req, res) { var pg = require('pg');