diff --git a/.gitignore b/.gitignore index 3f134dd..7b50011 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ +cmd/password/.build +cmd/password/password dist frontend/assets/* js/node_modules/* -password -password_darwin_amd64 -PasswordGenerator.alfredworkflow diff --git a/.gitmodules b/.gitmodules index 82a6236..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "alfred-workflow/lib"] - path = alfred-workflow/lib - url = https://github.com/deanishe/alfred-workflow.git diff --git a/.repo-runner.yaml b/.repo-runner.yaml index 7719755..5c300ad 100644 --- a/.repo-runner.yaml +++ b/.repo-runner.yaml @@ -1,12 +1,11 @@ --- -image: "quay.io/luzifer/repo-runner-image" -checkout_dir: /go/src/github.com/Luzifer/password +image: "reporunner/golang-alpine" +checkout_dir: /src commands: - - apk --update add zip - - git submodule update --init --recursive - - make publish workflow + - make publish environment: CGO_ENABLED: 0 + PACKAGES: . diff --git a/.travis.yml b/.travis.yml index 2719233..97aae24 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,10 @@ language: go go: - - 1.7.x - - 1.8.x - - 1.9.x - 1.10.x - 1.11.x + - 1.12.x - tip -script: go test -v --bench=. github.com/Luzifer/password github.com/Luzifer/password/lib +install: go get -v github.com/Luzifer/password/lib +script: go test -v --bench=. github.com/Luzifer/password/lib diff --git a/Dockerfile b/Dockerfile index 582cfbd..d8b9e16 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM golang:alpine as builder -COPY . /go/src/github.com/Luzifer/password -WORKDIR /go/src/github.com/Luzifer/password +COPY . /src/github.com/Luzifer/password +WORKDIR /src/github.com/Luzifer/password/cmd/password RUN set -ex \ && apk add --update git \ diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index 0f54fbc..0000000 --- a/Gopkg.lock +++ /dev/null @@ -1,106 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - digest = "1:70792ca3a262117f2135feb54379a0399fc8afb267edc64a16ee278dd431a619" - name = "github.com/Luzifer/go_helpers" - packages = [ - "accessLogger", - "http", - "str", - ] - pruneopts = "NUT" - revision = "bbca4398656b348ce285438ca3dffb1fce6a3f4b" - version = "v2.8.1" - -[[projects]] - digest = "1:c01767916c59f084bb7c41a7d5877c0f3099b1595cfa066e84ec6ad6b084dd89" - name = "github.com/gorilla/context" - packages = ["."] - pruneopts = "NUT" - revision = "08b5f424b9271eedf6f9f0ce86cb9396ed337a42" - version = "v1.1.1" - -[[projects]] - digest = "1:bf5cf1d53d703332e9bd8984c69784645b73a938317bf5ace9aadf20ac49379a" - name = "github.com/gorilla/mux" - packages = ["."] - pruneopts = "NUT" - revision = "e3702bed27f0d39777b0b37b664b6280e8ef8fbf" - version = "v1.6.2" - -[[projects]] - digest = "1:406338ad39ab2e37b7f4452906442a3dbf0eb3379dd1f06aafb5c07e769a5fbb" - name = "github.com/inconshreveable/mousetrap" - packages = ["."] - pruneopts = "NUT" - revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" - version = "v1.0" - -[[projects]] - digest = "1:14715f705ff5dfe0ffd6571d7d201dd8e921030f8070321a79380d8ca4ec1a24" - name = "github.com/pkg/errors" - packages = ["."] - pruneopts = "NUT" - revision = "ba968bfe8b2f7e042a574c888954fccecfa385b4" - version = "v0.8.1" - -[[projects]] - digest = "1:343d44e06621142ab09ae0c76c1799104cdfddd3ffb445d78b1adf8dc3ffaf3d" - name = "github.com/spf13/cobra" - packages = ["."] - pruneopts = "NUT" - revision = "ef82de70bb3f60c65fb8eebacbb2d122ef517385" - version = "v0.0.3" - -[[projects]] - digest = "1:9d8420bbf131d1618bde6530af37c3799340d3762cc47210c1d9532a4c3a2779" - name = "github.com/spf13/pflag" - packages = ["."] - pruneopts = "NUT" - revision = "298182f68c66c05229eb03ac171abe6e309ee79a" - version = "v1.0.3" - -[[projects]] - branch = "master" - digest = "1:e762d2447df27cace4112a07ddc64e7c71dc0bc5d512a59f5d2b98c5133e8e71" - name = "github.com/tredoe/osutil" - packages = [ - "user/crypt", - "user/crypt/apr1_crypt", - "user/crypt/common", - "user/crypt/md5_crypt", - "user/crypt/sha256_crypt", - "user/crypt/sha512_crypt", - ] - pruneopts = "NUT" - revision = "7d3ee1afa71c90fd1514c8f557ae6c5f414208eb" - -[[projects]] - branch = "master" - digest = "1:1ecf2a49df33be51e757d0033d5d51d5f784f35f68e5a38f797b2d3f03357d71" - name = "golang.org/x/crypto" - packages = [ - "bcrypt", - "blowfish", - ] - pruneopts = "NUT" - revision = "505ab145d0a99da450461ae2c1a9f6cd10d1f447" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = [ - "github.com/Luzifer/go_helpers/http", - "github.com/Luzifer/go_helpers/str", - "github.com/gorilla/mux", - "github.com/pkg/errors", - "github.com/spf13/cobra", - "github.com/tredoe/osutil/user/crypt", - "github.com/tredoe/osutil/user/crypt/apr1_crypt", - "github.com/tredoe/osutil/user/crypt/sha256_crypt", - "github.com/tredoe/osutil/user/crypt/sha512_crypt", - "golang.org/x/crypto/bcrypt", - ] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index e90d525..0000000 --- a/Gopkg.toml +++ /dev/null @@ -1,51 +0,0 @@ -# Gopkg.toml example -# -# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" -# -# [prune] -# non-go = false -# go-tests = true -# unused-packages = true - - -[[constraint]] - name = "github.com/Luzifer/go_helpers" - version = "2.8.1" - -[[constraint]] - name = "github.com/gorilla/mux" - version = "1.6.2" - -[[constraint]] - name = "github.com/spf13/cobra" - version = "0.0.3" - -[[constraint]] - branch = "master" - name = "github.com/tredoe/osutil" - -[[constraint]] - branch = "master" - name = "golang.org/x/crypto" - -[prune] - non-go = true - go-tests = true - unused-packages = true diff --git a/Makefile b/Makefile index fc026ea..f24ce18 100644 --- a/Makefile +++ b/Makefile @@ -10,16 +10,13 @@ compile_js: sh -c "yarn && npx webpack" debug: - go-bindata --debug frontend/... + go-bindata --debug -o cmd/password/bindata.go --pkg=main frontend/... go run *.go serve pack: compile_js - go-bindata -modtime 1 frontend/... + go-bindata -modtime 1 -o cmd/password/bindata.go --pkg=main frontend/... bash generateXKCDWordList.sh publish: - curl -sSLo golang.sh https://raw.githubusercontent.com/Luzifer/github-publish/master/golang.sh - bash golang.sh - -workflow: - bash build-workflow.sh + curl -sSLo cmd/password/golang.sh https://raw.githubusercontent.com/Luzifer/github-publish/master/golang.sh + cd cmd/password && bash golang.sh diff --git a/README.md b/README.md index 6de3e87..1050065 100644 --- a/README.md +++ b/README.md @@ -20,17 +20,6 @@ For the security of the passwords there are several assertions: My service [Secure Password](https://passwd.fyi/) is powered by this app and will provide you with secure passwords. -### Via [Alfred](https://www.alfredapp.com/) - -_(No longer actively maintained as I no longer use OSX / Alfred. The current version stays until it gets reported to be broken and will then get removed.)_ - -1. Ensure you do have Alfred 3 and have enabled the Powerpack -2. Download and open the `PasswordGenerator.alfredworkflow` from [Github releases](https://github.com/Luzifer/password/releases/latest) -3. Let Alfred install the workflow -4. Generate passwords using `pwd 12`, with special characters `pwd 12 s` or [XKCD style](https://xkcd.com/936/) `pwd 4 x` - -The workflow is set up to automatically check for updates once a day. If you want to check for updates manually open Alfred, enter `pwd workflow:update` and press enter. - ### Via CLI 1. Download the compiled binary from [Github releases](https://github.com/Luzifer/password/releases/latest) @@ -95,6 +84,18 @@ $ curl https://passwd.fyi/v1/getPassword?length=20&special=true 0M4L-1[lT:@2&7,p,o-; ``` +#### As library in your own code + +```go +package main + +import pwd "github.com/Luzifer/password/v2/lib" + +func getPassword() (string, error) { + return pwd.NewSecurePassword().GeneratePassword(16, false) +} +``` + ## Benchmark / Test Tests and benchmark are run by Travis CI at every push to this repository: diff --git a/alfred-workflow/.gitignore b/alfred-workflow/.gitignore deleted file mode 100644 index 0d20b64..0000000 --- a/alfred-workflow/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.pyc diff --git a/alfred-workflow/exec.py b/alfred-workflow/exec.py deleted file mode 100644 index 8673dc6..0000000 --- a/alfred-workflow/exec.py +++ /dev/null @@ -1,75 +0,0 @@ -# encoding: utf-8 - -import subprocess -import sys -import json -from workflow import Workflow, ICON_WEB, web - -descriptions = { - "htpasswd_apr1": "APR1 (htpasswd)", - "htpasswd_bcrypt": "bcrypt (htpasswd)", - "htpasswd_sha256": "SHA256 (htpasswd)", - "htpasswd_sha512": "SHA512 (htpasswd)", - "password": "Password", - "sha1": "SHA1", - "sha256": "SHA256", - "sha512": "SHA512", -} - - -def main(wf): - password_length = 20 - use_special = False - use_xkcd = False - - if len(wf.args): - for arg in wf.args[0].split(): - if arg.isdigit(): - password_length = int(arg) - elif arg == 's': - use_special = True - elif arg == 'x': - use_xkcd = True - - if password_length < 4 or password_length > 256: - wf.add_item(title="Password length out of bounds", - subtitle="Please use a reasonable password length between 4 and 256") - wf.send_feedback() - return 1 - - command = ["./password_darwin_amd64", - "get", "-j", "-l", - str(password_length)] - if use_special: - command.append("-s") - if use_xkcd: - command.append("-x") - result = json.loads(subprocess.check_output(command).strip()) - - hashed = [] - for key, value in result.iteritems(): - hashed.append("{}: {}".format(key, value)) - - wf.add_item(title=result['password'], - subtitle="Press Cmd+C to copy", - arg=result['password'], - valid=True) - wf.add_item(title="Copy hashed versions", - subtitle="Press Cmd+C to copy", - arg="\n".join(hashed), - valid=True) - wf.send_feedback() - - return 0 - - -if __name__ == "__main__": - wf = Workflow(update_settings={ - 'github_slug': 'Luzifer/password', - }) - - if wf.update_available: - # Download new version and tell Alfred to install it - wf.start_update() - - sys.exit(wf.run(main)) diff --git a/alfred-workflow/icon.png b/alfred-workflow/icon.png deleted file mode 100644 index 32c10c2..0000000 Binary files a/alfred-workflow/icon.png and /dev/null differ diff --git a/alfred-workflow/info.plist b/alfred-workflow/info.plist deleted file mode 100644 index 896ac2f..0000000 --- a/alfred-workflow/info.plist +++ /dev/null @@ -1,120 +0,0 @@ - - - - - bundleid - io.luzifer.pwd - category - Tools - connections - - F8CBCF9B-3B33-400E-B6AD-6B8500938BA4 - - - destinationuid - F417810A-4CC7-4844-9B6E-DA2D6B40543C - modifiers - 0 - modifiersubtext - - vitoclose - - - - - createdby - Knut Ahlers - description - Generate secure passwords using Luzifer/password tool - disabled - - name - Password Generator - objects - - - config - - autopaste - - clipboardtext - {query} - transient - - - type - alfred.workflow.output.clipboard - uid - F417810A-4CC7-4844-9B6E-DA2D6B40543C - version - 2 - - - config - - alfredfiltersresults - - argumenttrimmode - 0 - argumenttype - 1 - escaping - 0 - keyword - pwd - queuedelaycustom - 1 - queuedelayimmediatelyinitially - - queuedelaymode - 0 - queuemode - 1 - runningsubtext - Generating password... - script - python exec.py "$1" - scriptargtype - 1 - scriptfile - - subtext - Generates a secure password with <n> length - title - Password Generator - type - 0 - withspace - - - type - alfred.workflow.input.scriptfilter - uid - F8CBCF9B-3B33-400E-B6AD-6B8500938BA4 - version - 2 - - - readme - - uidata - - F417810A-4CC7-4844-9B6E-DA2D6B40543C - - xpos - 700 - ypos - 170 - - F8CBCF9B-3B33-400E-B6AD-6B8500938BA4 - - xpos - 300 - ypos - 170 - - - webaddress - https://github.com/Luzifer/password - - diff --git a/alfred-workflow/lib b/alfred-workflow/lib deleted file mode 160000 index 183a232..0000000 --- a/alfred-workflow/lib +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 183a2326cfe4fa11af3c1cd186579a35cef1792b diff --git a/build-workflow.sh b/build-workflow.sh deleted file mode 100644 index f845573..0000000 --- a/build-workflow.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -set -euxo pipefail - -# Check for a publishable version -VERSION=$(git describe --tags --exact-match || echo "notag") - -# Collect assets to pack -mkdir -p dist -unzip ./.build/password_darwin_amd64.zip -d dist -cp -r \ - alfred-workflow/exec.py \ - alfred-workflow/icon.png \ - alfred-workflow/info.plist \ - alfred-workflow/lib/workflow \ - dist - -# In order to have a valid version number on no tags for testing -git describe --tags >dist/version - -# Create ZIP -cd dist -zip -r -9 ../PasswordGenerator.alfredworkflow * -cd - - -# If there is no version tag the artifact is not to be published -if (test "${VERSION}" == "notag"); then - echo "No exact tag found, no publishing required." - exit 0 -fi - -# Upload to Github releases -github-release upload --user luzifer --repo password --tag ${VERSION} \ - --name PasswordGenerator.alfredworkflow \ - --file PasswordGenerator.alfredworkflow diff --git a/bindata.go b/cmd/password/bindata.go similarity index 99% rename from bindata.go rename to cmd/password/bindata.go index 6604577..05bda7a 100644 --- a/bindata.go +++ b/cmd/password/bindata.go @@ -20193,60 +20193,60 @@ func bindataFrontendAssetsFfcc050b2d92d4b14a4fcb527ee0bcc8woff() (*asset, error) } var _bindataFrontendIndexhtml = []byte( - "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x58\xef\x8e\xdb\xb8\x11\xff\x9e\xa7\x98\x53\x50\xf4\xcb\xc9\x4a\x2e" + - "\xc1\xe1\x9a\x4a\x2e\x82\xcd\xb5\xd9\x36\x87\xa4\xd8\x14\x68\x3e\x15\x23\x71\x24\x31\xa6\x48\x81\x1c\xda\xeb\xbe" + - "\x48\x1f\xa8\x2f\x56\x90\x92\xbc\x96\x2d\xdf\x7a\x0f\x45\xf6\x8b\xb9\xe4\x8f\xe4\xfc\xfb\xcd\x0c\x95\x7f\xf7\xee" + - "\xe3\xcd\xe7\x2f\x9f\x7e\x86\x96\x3b\xb5\x7e\x96\x87\x1f\x50\xa8\x9b\x22\x21\x9d\xac\x9f\x01\xe4\x2d\xa1\x08\x03" + - "\x80\xbc\x23\x46\xa8\x5a\xb4\x8e\xb8\x48\x3c\xd7\xe9\x4f\xc9\xf1\x92\xc6\x8e\x8a\x64\x2b\x69\xd7\x1b\xcb\x09\x54" + - "\x46\x33\x69\x2e\x92\x9d\x14\xdc\x16\x82\xb6\xb2\xa2\x34\xfe\xf3\x3d\x48\x2d\x59\xa2\x4a\x5d\x85\x8a\x8a\x97\xdf" + - "\x83\x6b\xad\xd4\x9b\x94\x4d\x5a\x4b\x2e\xb4\x99\x8e\x66\xc9\x8a\xd6\x77\x54\x79\x4b\xf0\x09\x9d\xdb\x19\x2b\xf2" + - "\x6c\x98\x7e\x36\x60\xbe\x4b\x53\xf8\x60\x50\x00\xf6\x3d\xb8\xca\xca\x9e\x81\xd0\xaa\x3d\xb0\x81\xde\xd2\x96\x34" + - "\x43\xa9\x50\x6f\xe0\xfd\xe7\x5f\x3e\xc0\x4e\x72\x6b\x3c\x83\xe3\xbd\x92\xba\x81\x34\x1d\x2f\x1b\xf7\x3a\x5b\x15" + - "\x09\x3a\x47\xec\xb2\xd2\x6b\xa1\x68\xf5\xd5\x25\xeb\x3c\x1b\xd6\xa3\x61\xb2\xc9\x32\x79\x69\xc4\x7e\xdc\xaf\x71" + - "\x0b\x95\x42\xe7\x8a\x44\xe3\xb6\x44\x0b\xc3\x4f\x4a\xf7\x3d\x6a\x91\xaa\x66\x9a\x50\xb2\x69\x19\xca\x66\x18\x8c" + - "\xca\x02\xe4\x38\xdf\x9f\x96\x16\xb5\x48\xa0\xb5\x54\x17\xc9\xf3\xe4\xdc\x10\x78\xd8\x5a\x7a\x66\xa3\x4f\xf6\xb3" + - "\x69\x1a\x45\x36\x01\xde\xf7\x54\x24\x03\x26\x01\x81\x8c\xe3\x5a\x91\x54\x46\x29\xec\x1d\x4d\xd3\x68\x9b\xe0\xe1" + - "\xe7\xc3\x11\x77\xbe\x0f\xfe\x24\x71\x33\xf8\x33\x01\xb4\x12\xd3\xe0\x5d\x6b\xd4\xe1\xa6\x0b\xb0\x41\x71\x12\x45" + - "\x52\xa3\x0a\x57\xc4\x59\x85\x25\xa9\x22\xf9\x1c\x05\x08\x26\x91\x0d\xb2\x34\xfa\x60\x87\xe0\x8b\x1e\x2f\x28\x93" + - "\xca\x2a\x40\xf3\x2c\x40\x0e\xea\x67\x83\x6e\x63\x4c\x00\xe4\x42\x1e\x9c\x31\x69\x38\x59\xff\x41\x63\x29\x2e\x2a" + - "\x70\x24\x8b\x57\x27\x92\x04\x47\x77\x36\x45\xcf\xe6\x08\x07\x90\x2b\x79\x84\x4c\x25\x53\x37\x5b\x3f\xf1\x70\xaa" + - "\xa4\xde\x4c\xde\x6d\x99\x7b\xf7\x26\xcb\x1a\xc9\xad\x2f\x57\x95\xe9\xb2\x0f\xfe\xdf\xb2\x26\x9b\xf5\xa3\xbb\x9f" + - "\x6f\x25\xa6\xa8\x6a\x4b\x22\x59\xbf\x8d\xbf\xf0\xf3\x3d\x93\x76\xd2\xe8\xa3\x58\x18\x0c\xa2\xe4\x37\x17\xad\x97" + - "\xc9\xfa\xed\xa7\x5b\x78\x67\x2a\xdf\x91\xe6\xe8\xd5\x5f\x15\x2c\xcf\xbc\x3a\xf8\xec\x82\xa9\x9f\x6a\xe2\x91\x09" + - "\xf3\x90\x1f\xf7\x94\xac\xa1\x64\x9d\x0a\xaa\xd1\x2b\x9e\x22\xa2\xe4\x53\x56\x74\x46\xa0\x3a\xa5\x84\x23\x66\xa9" + - "\x1b\xf7\x4b\x5c\x9c\x5f\x0b\x90\x1f\x24\xab\xd1\x41\x1d\x48\xd2\x8c\x11\xdf\x4a\x21\x48\x17\x09\x5b\x4f\x21\x74" + - "\xe5\x1a\xee\xc6\xb3\xe6\xb2\x1f\xc2\xf8\xd7\x0d\x36\x8d\x85\xdc\x8e\xb9\x27\xd3\xb8\x9d\x12\xe2\x2c\xf4\x35\xa3" + - "\xd4\x64\xa1\xe3\xf4\xf5\x43\xa2\x39\x82\x58\xb3\x83\xaf\xde\xb1\xac\xf7\xe9\x98\xb4\xd3\x4e\xa4\x15\x69\x26\x7b" + - "\x4c\x83\x39\xa3\xd2\x7b\x97\xbe\xfc\x01\xc2\xc8\x75\xe9\x4f\x71\xd0\x89\xf4\xc7\xe4\xc8\x9d\xf3\x4d\x5f\x7d\x57" + - "\x1a\xb6\x33\x9e\x47\x4c\x3f\x21\x14\xa1\x80\xb3\x8b\x87\xbf\x5b\xd8\x49\xa5\xa0\x21\x4d\x16\x99\x00\x41\xd3\x0e" + - "\xdc\x90\x10\xa7\x30\x04\xda\x92\xdd\xc3\xab\x17\x61\xc1\x68\xe1\x56\xf0\x57\xef\x18\x2a\x25\xab\x0d\x70\x7b\x84" + - "\x64\x03\x1b\xa2\x3e\x4e\x56\xde\xda\x50\x24\x8c\xa6\x15\x9c\x38\xa4\x9f\xfb\x22\x5a\xfc\x82\x82\x15\x5a\x01\x5d" + - "\x99\xbe\x3a\x55\xf0\x04\x93\x86\xe2\xb1\xa0\xe2\x17\xe3\xed\x41\xc0\x13\x31\x0e\x9e\xbe\x78\x68\x28\x44\xe7\x31" + - "\x79\x84\xaa\x8d\xed\xd2\xc6\x1a\xdf\x9f\xc1\x42\xf0\xea\xde\xf3\x0c\x3a\xe6\xf8\xc9\x21\x31\x59\xd6\xa6\xf2\x8e" + - "\xc4\x6d\x00\x4f\x55\x85\xe9\x9e\x13\xd8\xa2\xf2\x54\x24\xab\xd5\xea\x5c\x88\x05\xe9\xaf\x50\xa8\x36\x66\x29\x10" + - "\x8e\x71\xbd\x35\x8d\x25\xe7\x96\x14\x5a\x80\xa5\x25\xda\x24\xd6\x7d\x1a\xfb\x92\x37\xf0\xf2\xc5\x8b\xdf\xfd\x31" + - "\x70\xf2\x4c\xa0\xeb\x04\x7f\x3c\x24\x7e\x63\x34\xfc\xf9\xed\xdf\xff\x4f\x31\xf0\x90\x31\x8e\x26\x95\x5c\xe7\x2e" + - "\xb0\xb1\x59\xbf\x33\xb0\x37\x1e\x1c\x1b\x4b\xd0\xed\x0f\x21\xf8\xa7\x3c\x1b\x11\x79\x69\xcf\x8f\xf8\x62\x3c\x08" + - "\xaa\xa4\x20\xd8\xb5\xb2\x6a\x03\x7d\x02\xad\x18\x37\x04\xa8\x05\xec\x68\xe0\xac\x36\x3c\x1e\x8e\x7a\x0f\xa6\x8e" + - "\x9c\x9b\x88\x2c\x0e\xd7\xb9\x15\x7c\x6e\x91\x61\x87\xfb\x28\x4f\x85\x1a\x4a\x02\x17\x08\x6e\xb4\x1a\x26\x37\xda" + - "\xec\xc6\xeb\x0e\x54\x8e\xe0\xd6\x38\x5a\x9d\xab\x79\x52\x06\xcf\x95\x7f\x6f\x0e\x59\x04\x2d\x05\xd1\xdc\x43\x96" + - "\x70\x8f\x98\xe0\xad\x52\x0f\xd8\xb8\xbf\x6a\xa9\xda\x90\x00\x6c\x50\x6a\xc7\x80\xe0\x88\x83\xce\xd6\x2b\x72\xc1" + - "\x3c\xa4\xa3\x46\xdc\xd2\x1e\x84\x21\x17\xcd\x33\xe6\x69\xe8\x91\x99\xac\x76\xa3\x8a\x3b\xe3\x95\x80\x2e\x18\x54" + - "\x86\xa6\xd6\xed\xa1\x36\x16\x62\x3c\x63\x17\x8f\x6b\x3c\x39\x37\x4b\x6d\xbf\xc5\x0a\x37\xa8\xe1\x16\x6c\xc8\xbf" + - "\xe1\x28\x67\xbc\xad\x08\x2a\x23\xe8\x11\x0b\x7c\xac\xa1\x32\xde\x3a\x9a\x5c\xb6\x82\x5b\xfe\xbd\x83\xde\x97\x4a" + - "\xba\x96\x04\x18\x1d\x5a\x8b\xab\x3b\x89\x64\xfd\x17\xc9\xef\x7d\x19\xda\x06\x60\xd3\x10\xb7\x64\x63\xcf\x0e\x08" + - "\x4c\x8e\xc1\x79\xc9\x34\xb7\xe4\x89\x13\x1c\xd6\x57\xc6\xc2\x71\x39\x9d\x66\x1e\x21\xf8\x0c\x30\x2b\xc1\x0f\xb8" + - "\x63\x62\x8e\x9d\x44\xc8\x9e\xf3\xfe\x01\xac\x09\x79\x48\x48\x54\xa6\x59\x2c\xcd\x71\x6b\x3a\x02\x26\xf8\xd8\x5b" + - "\x5d\xa8\xcc\xc3\x96\xea\xac\x89\x5d\x42\x2d\x26\x9e\xbc\x7d\x3d\x47\xc5\xb7\x56\x78\x7a\x0c\xb2\xe7\x59\xfb\xfa" + - "\x09\x0d\x57\xa5\xcc\xe1\x69\x21\xa4\xeb\xe4\x91\x49\x16\x5a\xa3\xff\xfe\x67\xb9\x05\x3a\xf5\xc9\x99\x2e\x0b\x99" + - "\xef\xca\xda\x97\xc7\xe7\x48\xe0\x55\x91\x4c\x61\xf4\x81\x74\xc3\xed\xc7\x3e\xbe\x4a\x8e\x7b\x29\x6b\xd4\xf0\x7c" + - "\x49\xd6\xd3\x23\x0c\x54\x04\xbf\xc9\xb3\xb8\x70\xde\x15\xc6\xc2\x3a\x18\x47\xfb\xae\x0c\xa5\x74\xa1\xcc\x1e\x2a" + - "\xe8\x0f\x2f\x86\x60\x59\x94\xe5\x49\x55\xf4\x51\xa5\x2f\xb6\x01\x83\xb4\x31\x97\x95\xe6\x7e\x90\xc7\x3b\xba\xeb" + - "\xa9\x92\xa8\x26\x59\xe0\x1f\x8e\xc0\x0d\x73\xf1\xd3\x00\x56\x4c\xd6\x9d\x51\x6c\xe1\xae\x6f\x2d\xf9\x3f\xff\x76" + - "\xf3\x6e\x26\xf6\x59\x4a\xba\xdf\x54\x22\x26\xa4\x3f\xbc\xfa\x31\x4b\x60\xea\xf9\xff\x15\x3f\x1c\x24\xeb\x70\xc0" + - "\xd0\x39\x3c\xe4\x9a\x93\x97\xcd\xf5\xca\x5e\x11\xcf\x8b\xcd\xcf\x53\x9e\x36\xcb\x9c\x5b\xdf\x04\x3e\x2e\x71\xec" + - "\xca\xd3\x7b\x2b\x3b\xb4\xfb\xc1\xb0\x26\x5a\xf4\x0e\xb7\x21\x3f\xe0\x36\x54\x3f\xd4\x0d\xb9\x2b\x38\xfc\x78\x16" + - "\xcd\xb3\xe1\xd3\x4a\x9e\x0d\xdf\xa7\xfe\x17\x00\x00\xff\xff\xf5\xdc\xbb\xb3\xb0\x12\x00\x00") + "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x58\xdb\x8e\xdc\xb8\x11\x7d\xf7\x57\xd4\xca\x08\xf2\xb2\x6a\xd9\x6b" + + "\x63\xb1\x71\xa4\x0e\x8c\x71\x12\x4f\xe2\x85\x1d\x8c\x03\xc4\x4f\x41\x49\xac\x96\xe8\xa6\x48\x81\x2c\x76\x4f\xe7" + + "\x47\xf2\x41\xf9\xb1\x80\xd4\x65\xa4\x6e\x4d\xa6\xbd\x08\xd6\x2f\x23\x93\x87\x64\x5d\x4e\x1d\x16\x3b\xff\xee\xdd" + + "\xc7\x9b\xcf\x5f\x3e\xfd\x11\x1a\x6e\xd5\xf6\x59\x1e\xfe\x80\x42\x5d\x17\x09\xe9\x64\xfb\x0c\x20\x6f\x08\x45\xf8" + + "\x00\xc8\x5b\x62\x84\xaa\x41\xeb\x88\x8b\xc4\xf3\x2e\xfd\x29\x99\x4f\x69\x6c\xa9\x48\x0e\x92\x8e\x9d\xb1\x9c\x40" + + "\x65\x34\x93\xe6\x22\x39\x4a\xc1\x4d\x21\xe8\x20\x2b\x4a\xe3\x7f\xbe\x07\xa9\x25\x4b\x54\xa9\xab\x50\x51\xf1\xf2" + + "\x7b\x70\x8d\x95\x7a\x9f\xb2\x49\x77\x92\x0b\x6d\xc6\xad\x59\xb2\xa2\xed\x1d\x55\xde\x12\x7c\x42\xe7\x8e\xc6\x8a" + + "\x3c\xeb\x87\x9f\xf5\x98\xef\xd2\x14\x3e\x18\x14\x80\x5d\x07\xae\xb2\xb2\x63\x20\xb4\xea\x04\x6c\xa0\xb3\x74\x20" + + "\xcd\x50\x2a\xd4\x7b\x78\xff\xf9\xe7\x0f\x70\x94\xdc\x18\xcf\xe0\xf8\xa4\xa4\xae\x21\x4d\x87\xc3\x86\xb5\xce\x56" + + "\x45\x82\xce\x11\xbb\xac\xf4\x5a\x28\xda\x7c\x75\xc9\x36\xcf\xfa\xf9\x18\x98\x6c\x8c\x4c\x5e\x1a\x71\x1a\xd6\x6b" + + "\x3c\x40\xa5\xd0\xb9\x22\xd1\x78\x28\xd1\x42\xff\x27\xa5\xfb\x0e\xb5\x48\x55\x3d\x0e\x28\x59\x37\x0c\x65\xdd\x7f" + + "\x0c\xce\x02\xe4\xb8\x5c\x9f\x96\x16\xb5\x48\xa0\xb1\xb4\x2b\x92\xe7\xc9\x65\x20\x70\x5a\x5a\x7a\x66\xa3\xcf\xd6" + + "\xb3\xa9\x6b\x45\x36\x01\x3e\x75\x54\x24\x3d\x26\x01\x81\x8c\xc3\x5c\x91\x54\x46\x29\xec\x1c\x8d\xc3\x68\xeb\x90" + + "\xe1\xe7\xfd\x16\x77\xbe\x0b\xf9\x24\x71\xd3\xe7\x33\x01\xb4\x12\xd3\x90\x5d\x6b\xd4\x74\xd2\x23\xb0\xde\x71\x12" + + "\x45\xb2\x43\x15\x8e\x88\xa3\x0a\x4b\x52\x45\xf2\x39\x1a\x10\x42\x22\x6b\x64\x69\xf4\x14\x87\x90\x8b\x0e\x1f\x71" + + "\x26\x95\x55\x80\xe6\x59\x80\x4c\xee\x67\xbd\x6f\x03\x27\x00\x72\x21\xa7\x64\x8c\x1e\x8e\xd1\x7f\xf0\x58\x8a\x47" + + "\x1d\x98\xd9\xe2\xd5\x99\x25\x21\xd1\xad\x4d\xd1\xb3\x99\xe1\x00\x72\x25\x67\xc8\x54\x32\xb5\x8b\xf9\xb3\x0c\xa7" + + "\x4a\xea\xfd\x98\xdd\x86\xb9\x73\x6f\xb2\xac\x96\xdc\xf8\x72\x53\x99\x36\xfb\xe0\xff\x25\x77\x64\xb3\x6e\x48\xf7" + + "\xf3\x83\xc4\x14\x3b\x99\x6c\xdf\x7e\xba\x85\x77\xa6\xf2\x2d\x69\x8e\xa1\x9b\x31\xa1\x0f\x87\x92\x33\x07\x32\xaf" + + "\xa6\xc0\x3c\xe2\xcf\xb7\xfa\x31\xd0\x6d\xc9\xab\x61\x4d\xc9\x1a\x4a\xd6\xa9\xa0\x1d\x7a\xc5\x63\xd8\x4b\x3e\xa7" + + "\x5e\x6b\x04\xaa\x73\xde\x39\x62\x96\xba\x76\x3f\xc7\xc9\xe5\xb1\x00\xf9\x64\xd9\x0e\x1d\xec\x02\x13\xeb\x81\x56" + + "\x8d\x14\x82\x74\x91\xb0\xf5\x14\xf8\x21\xb7\x70\x37\xec\xb5\xb4\x7d\xe2\xca\xff\x0e\xd8\xf8\x2d\xe4\x61\x28\xf0" + + "\x4c\xe3\x61\x54\x9d\x05\xbf\x34\xa3\xd4\x64\xa1\xe5\xf4\xf5\x43\x35\xcf\x20\xd6\x1c\xe1\xab\x77\x2c\x77\xa7\x74" + + "\x50\xc6\xb4\x15\x69\x45\x9a\xc9\xce\xb9\xb6\xa4\x6d\x7a\xef\xd2\x97\x3f\x40\xf8\x72\x6d\xfa\x53\xfc\x68\x45\xfa" + + "\x63\x32\x4b\xe7\x72\xd1\x57\xdf\x96\x86\xed\xa2\x98\x22\xa6\x1b\x11\x8a\x50\xc0\xc5\xc1\xfd\xbf\x5b\x38\x4a\xa5" + + "\xa0\x26\x4d\x16\x99\x00\x41\xd3\x11\x5c\xaf\x3a\x23\x0d\x81\x0e\x64\x4f\xf0\xea\x45\x98\x30\x5a\xb8\x0d\xfc\xc5" + + "\x3b\x86\x4a\xc9\x6a\x0f\xdc\xcc\x90\x6c\x60\x4f\xd4\xc5\xc1\xca\x5b\x1b\x94\xd8\x68\xda\xc0\x59\x42\xba\x65\x2e" + + "\x62\xc4\x1f\x71\xb0\x42\x2b\xa0\x2d\xd3\x57\xe7\x0e\x9e\x61\xd2\xa0\xd0\x2b\x2e\x7e\x31\xde\x4e\x06\x9e\x99\x31" + + "\x65\xfa\xd1\x4d\x83\xda\x5f\x72\x72\x86\xda\x19\xdb\xa6\xb5\x35\xbe\xbb\x80\x05\xf2\xea\xce\xf3\x02\x3a\x08\xe9" + + "\x98\x90\xa8\x48\x3b\x53\x79\x47\xe2\x36\x80\x47\xe9\x66\xba\xe7\x04\x0e\xa8\x3c\x15\xc9\x66\xb3\xb9\x34\x62\xc5" + + "\xfa\x2b\x1c\xda\x19\xb3\x46\x84\x39\xae\xb3\xa6\xb6\xe4\xdc\x9a\x43\x2b\xb0\xb4\x44\x9b\xc4\xcb\x95\x86\xcb\xff" + + "\x0d\xbc\x7c\xf1\xe2\x37\xbf\x0f\x35\x79\x61\xd0\x75\x86\x3f\x4d\x89\x5f\xc8\x86\x3f\xbd\xfd\xdb\xff\x89\x03\x0f" + + "\x8a\x31\x1b\x54\x72\x9b\xbb\x50\x8d\xf5\xf6\x9d\x81\x93\xf1\xe0\xd8\x58\x82\xf6\x34\x51\xf0\x0f\x79\x36\x20\xf2" + + "\xd2\x5e\x6e\xf1\xc5\x78\x10\x54\x49\x41\x70\x6c\x64\xd5\x84\xf2\x09\x65\xc5\xb8\x27\x40\x2d\xe0\x48\x7d\xcd\x6a" + + "\xc3\xc3\xe6\xa8\x4f\x60\x76\xb1\xe6\xc6\x42\x16\xd3\x71\x6e\x03\x9f\x1b\x64\x38\xe2\x29\xda\x53\xa1\x86\x92\xc0" + + "\x85\x02\x37\x5a\xf5\x83\x7b\x6d\x8e\xc3\x71\x53\x29\x47\x70\x63\x1c\x6d\x2e\xdd\x5c\x88\xe7\x9a\xf3\xef\xcd\xa4" + + "\x22\x68\x29\x98\xe6\x1e\x54\xc2\x3d\x11\x82\xb7\x4a\x3d\x60\xe3\xfa\xaa\xa1\x6a\x4f\x02\xb0\x46\xa9\x1d\x03\x82" + + "\x23\x0e\x3e\x5b\xaf\xc8\x85\xf0\x90\x8e\x1e\x71\x43\x27\x10\x86\x5c\x0c\xcf\xa0\xd3\xd0\x21\x33\x59\xed\x06\x17" + + "\x8f\xc6\x2b\x01\x6d\x08\xa8\x0c\x9d\xa3\x3b\xc1\xce\x58\x88\x7c\xc6\x36\x6e\x57\x7b\x72\x6e\x21\x6d\xbf\x24\x0a" + + "\x37\xa8\xe1\x16\x6c\xd0\xdf\xb0\x95\x33\xde\x56\x04\x95\x11\xf4\x44\x04\x3e\xee\xa0\x32\xde\x3a\x1a\x53\xb6\x81" + + "\x5b\xfe\xad\x83\xce\x97\x4a\xba\x86\x04\x18\x1d\x5a\x8b\xab\x3b\x89\x64\xfb\x67\xc9\xef\x7d\x19\xda\x06\x60\x53" + + "\x13\x37\x64\x63\x63\x0c\x08\x4c\x8e\xc1\x79\xc9\xb4\x8c\xe4\x59\x12\x1c\xee\xae\xe4\xc2\xfc\x3a\x1d\x47\x9e\x28" + + "\xf0\x05\x60\x71\x05\x3f\xe0\xe6\x85\x39\x74\x12\x41\x3d\x97\xfd\x03\x58\x13\x74\x48\x48\x54\xa6\x5e\xbd\x9a\xe3" + + "\xd2\x74\x00\x8c\xf0\xa1\xb7\x7a\xe4\x66\xee\x97\x54\x17\x9d\xe2\x1a\x6a\x55\x78\xf2\xe6\xf5\x12\x15\x1f\x34\xa1" + + "\xbf\xef\x6d\xcf\xb3\xe6\xf5\x37\x34\x5c\x95\x32\x53\xff\x2e\xa4\x6b\xe5\x2c\x24\x2b\xad\xd1\x7f\xfe\xbd\xde\x02" + + "\x9d\xe7\xe4\xc2\x97\x15\xe5\xbb\xf2\xee\xcb\x63\xcf\x1f\xea\xaa\x48\x46\x1a\x7d\x20\x5d\x73\xf3\xb1\x8b\xad\xff" + + "\xbc\x97\xb2\x46\xf5\x6f\x84\x64\x3b\xbe\x74\x40\x45\xf0\x9b\x3c\x8b\x13\x97\x5d\x61\xbc\x58\xfb\xe0\x68\xdf\x96" + + "\xe1\x2a\x5d\xb9\x66\xa7\x1b\xf4\x87\x17\x3d\x59\x56\x6d\xf9\xa6\x5b\xf4\x49\xa7\x1f\x6d\x03\x7a\x6b\xa3\x96\x95" + + "\xe6\xbe\xb7\xc7\x3b\xba\xeb\xa8\x92\xa8\x46\x5b\xe0\xef\x8e\xc0\xf5\x63\xf1\xfd\x8d\x15\x93\x75\x17\x25\xb6\x72" + + "\xd6\xaf\x6d\xf9\x3f\xfe\x7a\xf3\x6e\x61\xf6\x85\x24\xdd\xef\x2b\x11\x05\xe9\x77\xaf\x7e\xcc\x12\x18\x7b\xfe\x7f" + + "\xc6\xd7\x79\xb2\x0d\x1b\xf4\x9d\xc3\x83\xd6\x9c\xbd\x6c\xae\x77\xf6\x0a\x3e\xaf\x36\x3f\xdf\xf2\xb4\x59\xaf\xb9" + + "\xed\x4d\xa8\xc7\xb5\x1a\xbb\x72\xf7\xce\xca\x16\xed\xa9\x0f\xac\x89\x11\xbd\xc3\x43\xd0\x07\x3c\x84\xdb\x0f\x75" + + "\x4d\xee\x8a\x1a\x7e\x5a\x45\xf3\xac\xff\xfd\x22\xcf\xfa\x1f\x81\xfe\x1b\x00\x00\xff\xff\x46\x6e\x97\x23\x15\x12" + + "\x00\x00") func bindataFrontendIndexhtmlBytes() ([]byte, error) { return bindataRead( @@ -20265,7 +20265,7 @@ func bindataFrontendIndexhtml() (*asset, error) { info := bindataFileInfo{ name: "frontend/index.html", - size: 4784, + size: 4629, md5checksum: "", mode: os.FileMode(420), modTime: time.Unix(1, 0), diff --git a/cmdGet.go b/cmd/password/cmdGet.go similarity index 100% rename from cmdGet.go rename to cmd/password/cmdGet.go diff --git a/cmdServe.go b/cmd/password/cmdServe.go similarity index 100% rename from cmdServe.go rename to cmd/password/cmdServe.go diff --git a/cmdVersion.go b/cmd/password/cmdVersion.go similarity index 100% rename from cmdVersion.go rename to cmd/password/cmdVersion.go diff --git a/flags.go b/cmd/password/flags.go similarity index 100% rename from flags.go rename to cmd/password/flags.go diff --git a/cmd/password/go.mod b/cmd/password/go.mod new file mode 100644 index 0000000..0786e65 --- /dev/null +++ b/cmd/password/go.mod @@ -0,0 +1,14 @@ +module github.com/Luzifer/password/cmd/password + +go 1.12 + +require ( + github.com/Luzifer/go_helpers v2.8.1+incompatible + github.com/Luzifer/password v1.13.1 + github.com/gorilla/mux v1.7.0 + github.com/pkg/errors v0.8.1 // indirect + github.com/spf13/cobra v0.0.3 + github.com/spf13/pflag v1.0.3 // indirect + github.com/tredoe/osutil v0.0.0-20161130133508-7d3ee1afa71c // indirect + golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25 // indirect +) diff --git a/cmd/password/go.sum b/cmd/password/go.sum new file mode 100644 index 0000000..cfc1059 --- /dev/null +++ b/cmd/password/go.sum @@ -0,0 +1,17 @@ +github.com/Luzifer/go_helpers v2.8.1+incompatible h1:9YvrAn7pU2viK5vRpAnI+0gyz+Tw8rxWHVIYHi642zk= +github.com/Luzifer/go_helpers v2.8.1+incompatible/go.mod h1:5yUSe0FS7lIx1Uzmt0R3tdPFrSSaPfiCqaIA6u0Zn4Y= +github.com/Luzifer/password v1.13.1 h1:peyCOEtIF7bmApaKM9ahJ4+BbN9ZZgzj+19A7aO6988= +github.com/Luzifer/password v1.13.1/go.mod h1:F8bbXgwczd/1vyyJ9G8Z6hPvaqtpKR9VZM0E7jkZKJc= +github.com/gorilla/mux v1.7.0 h1:tOSd0UKHQd6urX6ApfOn4XdBMY6Sh1MfxV3kmaazO+U= +github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/tredoe/osutil v0.0.0-20161130133508-7d3ee1afa71c h1:5q7IHeqvAA4hWR1CfpTOS7RFsTDC36TaSZ8Dvc00bPk= +github.com/tredoe/osutil v0.0.0-20161130133508-7d3ee1afa71c/go.mod h1:M/I710pXKQToMdqt/D+mJ4QsnW6WDaajyB6DWFmDXBs= +golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25 h1:jsG6UpNLt9iAsb0S2AGW28DveNzzgmbXR+ENoPjUeIU= +golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/main.go b/cmd/password/main.go similarity index 100% rename from main.go rename to cmd/password/main.go diff --git a/frontend/index.html b/frontend/index.html index 5d1d6f8..d32d7c3 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -17,9 +17,6 @@