Skip to content

KGausel/pywgkey

 
 

Repository files navigation

CI CD codecov PyPI

PyWgKey

A simple WireGuard key generator writen in python.

Installation

pip install .

Usage

$ python3 -m pywgkey --help
Usage: python -m pywgkey [OPTIONS] WANTED_STRING

  Generate WireGuard keypair containing specified wanted string.

Options:
  -b, --begining      If the pubkey must start with the string.
  -w, --write         Write keys to files.
  -p, --psk           Genarate a preshared key as well.
  --ignore-case       Ignore casing of wanted string
  --help              Show this message and exit.

Generate and print a keypair containing a string

$ python -m pywgkey full --ignore-case test
Your public key is:  1f810nNMhOB8mYpGbEvDwmXTeStPMycLiHpw0/CeL1c=
Your private key is: 75C5ahPr5UY3paWXvLRKd82EK7KWuDDJ0D9h7/p21Us=

Generate and write the keys to the current folder

$ python -m pywgkey full -w test
Keys have been writen to test.pub and test.priv
$ cat test.pub
1f810nNMhOB8mYpGbEvDwmXtestPMycLiHpw0/CeL1c=
$ cat test.priv
75C5ahPr5UY3paWXvLRKd82EK7KWuDDJ0D9h7/p21Us=

If you want the public key to start with a string (case is ignored)

$ python -m pywgkey full -b --ignore-case test
Your public key is:  TEsTtKLgqud0Yohg8geFKcnGy99xFzZlMvSv2YbwT1Y=
Your private key is: paknyfh/d0LhZP2LqtjzJs2UE6XwaN14irxFdLV6d94=

About

Generate pretty wireguard keys

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%