Giter Club home page Giter Club logo

xkpasswd-go's Introduction

Hi, I'm Vot

I write code. Lots of it.

I love Open Source, Open Access and Open Research.

I create tools to fix actual problems, write sustainable code and maintain various services.

I value simplicity and elegance in code - the simpler your code is the easier it will be to maintain.


FFbinaries has moved to its own organisation.

Contains ffbinaries-api, ffbinaries-node and ffbinaries-prebuilt repos.

xkpasswd-go's People

Contributors

vot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

xkpasswd-go's Issues

xkpasswd-words.txt not found when run from a different folder from the executable

The file xkpasswd-words.txt is not found when xkpasswd-go is run from another directory than the folder containing xkpasswd-words.txt or xkpasswd-go.

Copying xkpasswd-words.txt to the same folder where xkpasswd-go is located does not help and the same error is shown

readLines: open xkpasswd-words.txt: no such file or directory

Steps to reproduce:

  1. go get -v -u github.com/vot/xkpasswd-go
  2. cp $GOPATH/src/github.com/vot/xkpasswd-go/xkpasswd-words.txt $GOPATH/bin
  3. xkpasswd-go

output:

readLines: open xkpasswd-words.txt: no such file or directory

If I cd into GOPATH/bin and run the command again then it works as expected:

  1. cd %GOPATH/bin
  2. xkpasswd-go

output:

unpotable.realisms.galvanoplasty

Intermittent exception with no explicit separator

Running the command without an explicit separator (e.g. without -s .) causes intermittent exceptions.

Apparently, when the separator is not specified and a random function is used to generate the separator occasionally an empty string is generated which causes the exception below:

# xkpasswd-go
ginaling+avirse+pundis
# xkpasswd-go
stomaja=chnouscon=subbited
# xkpasswd-go
panic: runtime error: index out of range [7] with length 6

goroutine 1 [running]:
main.getSeparatorForComplexity(0x2, 0x720ac1d2b0, 0x63a830780)
        /data/data/com.termux/files/home/go/src/github.com/vot/xkpasswd-go/xkpasswd.go:97 +0xc0
main.main.func1(0x40000b0160, 0x63a6346f8, 0x0)
        /data/data/com.termux/files/home/go/src/github.com/vot/xkpasswd-go/xkpasswd.go:194 +0x118
github.com/urfave/cli.HandleAction(0x63a6e0bc0, 0x400008a4e0, 0x40000b0160, 0x40000b0160, 0x0)
        /data/data/com.termux/files/home/go/src/github.com/urfave/cli/app.go:523 +0xd0
github.com/urfave/cli.(*App).Run(0x400010e000, 0x40000881b0, 0x1, 0x1, 0x0, 0x0)
        /data/data/com.termux/files/home/go/src/github.com/urfave/cli/app.go:285 +0x410
main.main()
        /data/data/com.termux/files/home/go/src/github.com/vot/xkpasswd-go/xkpasswd.go:204 +0x3a0

The error is reproduceable on macos, Linux and Android (the stacktrace is from Android running under termux).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.