Skip to main content

A python module to encrypt and decript passwords and usernames

Project description

No Pry

A python module to encrypt and decript passwords and usernames

Usage

Commandline program

Encrypting credentials

Example credentials

Sever Username Password
localhost root 1234
no_pry -s localhost -u root -p 1234

This generates a token encrypted in base64

Decrypting token

Example token: b64.bG9jYWxob3N0.cm9vdA==.MTIzNA==

no_pry -d b64.bG9jYWxob3N0.cm9vdA==.MTIzNA==

This decrypts the token and gives credentials

Module

Installation

pip install no_pry_fshangala

Example script

# import modules
import argparse
from no_pry_fshangala import no_pry_mod

# parse arguments
parser=argparse.ArgumentParser(
  prog="no_pry",
  description="Encrypts login credentials",
)
parser.add_argument("-s","--server",required=True)
parser.add_argument("-u","--username",required=True)
parser.add_argument("-p","--password",required=True)
parser.add_argument("-t","--type",default="b64",choices=["b64"])
args=parser.parse_args()

if args.type == "b64":
  # create a credentials object
  credentials=no_pry_mod.Credentials(server=args.server,username=args.username,password=args.password)
  # create the encryption object
  crypt=no_pry_mod.B64()
  # encrypt the credentials object
  token=crypt.encrypt(credentials=credentials)
  # print the resulting token
  print(token)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

no_pry_fshangala-1.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

no_pry_fshangala-1.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file no_pry_fshangala-1.1.0.tar.gz.

File metadata

  • Download URL: no_pry_fshangala-1.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for no_pry_fshangala-1.1.0.tar.gz
Algorithm Hash digest
SHA256 9d3d3a51a45da1cd541daba6a6997065042b30c76eb58ae681f6e251ad6d360e
MD5 05b0b422f48d9fd066a6bcace0a6bcbe
BLAKE2b-256 550c4da2c806445eb6fa0a04b55834ed22e82aa8b02282e68cc615790ee1478a

See more details on using hashes here.

File details

Details for the file no_pry_fshangala-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for no_pry_fshangala-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f09e0fc394de597f8d80a255c4eb050ef9446a228831bb45b9f14af923dc43fc
MD5 07e94db297f67c39d35c81778b5bec2a
BLAKE2b-256 2d661731c05c7ad2fd14939c946c2160d4605c95f4c5ca976505ba44315b4d93

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page