cryptoguess

command module
Version: v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 31, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

README ΒΆ

cryptoguess

πŸ˜„ cryptoguess automatically detects and parses cryptography keys from files

CircleCI GoDoc License GitHub release Go Report Card CodeFactor codecov Docker Metrics Made by Manfred Touron

Usage

$ find test/ -type f | xargs cryptoguess
test/pem-rsa-pubkey.txt:            potential candidates: PEM encoded data: x509: DER encoded public key, PEM encoded data
test/jwt-token.txt:                 JWT signed token
test/ssh-rsa-authorized-key.txt:    SSH authorized key
test/rsa-pubkey.txt:                potential candidates: BASE64 encoded data: x509: DER encoded public key, BASE64 encoded data
test/crypto-memory/D.der:           x509: PKCS#1 public key (RSA) in ASN.1 DER form
test/crypto-memory/E:               PEM encoded data
test/crypto-memory/A.pub:           SSH authorized key
test/crypto-memory/A:               PEM encoded data
test/crypto-memory/B.pem:           potential candidates: PEM encoded data: x509: PKCS#1 public key (RSA) in ASN.1 DER form, PEM encoded data
test/crypto-memory/B.pub:           SSH authorized key
test/crypto-memory/D.with-password: PEM encoded data
test/crypto-memory/C.pub:           SSH authorized key
test/crypto-memory/D:               potential candidates: PEM encoded data: x509: PKCS#1 private key (RSA) in ASN.1 DER form, PEM encoded data
test/crypto-memory/D.pub:           SSH authorized key
test/crypto-memory/A.der:           x509: PKCS#1 public key (RSA) in ASN.1 DER form
test/crypto-memory/B:               PEM encoded data
test/crypto-memory/C:               PEM encoded data
test/crypto-memory/B.der:           x509: PKCS#1 public key (RSA) in ASN.1 DER form
test/crypto-memory/F.pem:           potential candidates: PEM encoded data: x509: PKCS#1 public key (RSA) in ASN.1 DER form, PEM encoded data
test/crypto-memory/D.pem:           potential candidates: PEM encoded data: x509: PKCS#1 public key (RSA) in ASN.1 DER form, PEM encoded data
test/crypto-memory/F.pub:           SSH authorized key
test/crypto-memory/A.pem:           potential candidates: PEM encoded data: x509: PKCS#1 public key (RSA) in ASN.1 DER form, PEM encoded data
test/crypto-memory/F.der:           x509: PKCS#1 public key (RSA) in ASN.1 DER form
$ find test/ -type f | xargs file
test/pem-rsa-pubkey.txt:            ASCII text
test/jwt-token.txt:                 ASCII text, with very long lines, with no line terminators
test/ssh-rsa-authorized-key.txt:    OpenSSH RSA public key
test/rsa-pubkey.txt:                ASCII text, with very long lines, with no line terminators
test/crypto-memory/D.der:           data
test/crypto-memory/E:               OpenSSH private key
test/crypto-memory/A.pub:           OpenSSH RSA public key
test/crypto-memory/A:               OpenSSH private key
test/crypto-memory/B.pem:           ASCII text
test/crypto-memory/B.pub:           OpenSSH RSA public key
test/crypto-memory/D.with-password: PEM RSA private key
test/crypto-memory/C.pub:           OpenSSH ED25519 public key
test/crypto-memory/D:               PEM RSA private key
test/crypto-memory/D.pub:           OpenSSH RSA public key
test/crypto-memory/A.der:           data
test/crypto-memory/B:               OpenSSH private key
test/crypto-memory/C:               OpenSSH private key
test/crypto-memory/B.der:           data
test/crypto-memory/F.pem:           ASCII text
test/crypto-memory/D.pem:           ASCII text
test/crypto-memory/F.pub:           OpenSSH RSA public key
test/crypto-memory/A.pem:           ASCII text
test/crypto-memory/F.der:           data

$ cryptoguess --debug test/ssh-rsa-authorized-key.txt
test/ssh-rsa-authorized-key.txt: SSH authorized key
- PEM encoded data: err: no PEM data found
- SSH authorized key: *cryptoguess.ParsedSSHAuthorizedKey: &{0xc00005c8c0 lorem ipsum []}
- x509 DER encoded public key: err: asn1: structure error: tags don't match (16 vs {class:1 tag:19 length:115 isCompound:true}) {optional:false explicit:false application:false private:false defaultValue:<nil> tag:<nil> stringType:0 timeType:0 set:false omitEmpty:false} publicKeyInfo @2

$ cryptoguess -h
NAME:
   cryptoguess - A new cli application

USAGE:
   cryptoguess [global options] command [command options] [arguments...]

VERSION:
   0.0.0

COMMANDS:
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --debug, -D    (default: false)
   --list, -l     (default: false)
   --help, -h     show help (default: false)
   --version, -v  print the version (default: false)

Decoders

Encoding Status Recursive
aes πŸ”΄ πŸ”΄
ascii85 πŸ”΄ πŸ”΄
asn1 πŸ”΄ πŸ”΄
base32 πŸ”΄ πŸ”΄
base64 βœ… βœ…
cipher πŸ”΄ πŸ”΄
csv πŸ”΄ πŸ”΄
des πŸ”΄ πŸ”΄
dsa πŸ”΄ πŸ”΄
ecdsa πŸ”΄ πŸ”΄
elliptic πŸ”΄ πŸ”΄
encodings (utf-8) πŸ”΄ πŸ”΄
encrypted jwt πŸ”΄ πŸ”΄
gob πŸ”΄ πŸ”΄
gzip,lzw,... πŸ”΄ πŸ”΄
json πŸ”΄ πŸ”΄
pem βœ… βœ…
rsa πŸ”΄ πŸ”΄
signed jwt βœ… πŸ”΄
ssh βœ… πŸ”΄
tls πŸ”΄ πŸ”΄
url escaped πŸ”΄ πŸ”΄
x509: DER certificate list βœ… n/a
x509: Elliptic Curve private key βœ… n/a
x509: PKCS#1 RSA private key βœ… n/a
x509: PKCS#8 private key βœ… n/a
x509: PKCS#8 public key βœ… n/a
x509: PKIX public key βœ… n/a
x509: certificate βœ… n/a
x509: certificate list βœ… n/a
x509: certificate request βœ… n/a
x509: certificates βœ… n/a
xml πŸ”΄ πŸ”΄

Install

CLI
$ go get -u moul.io/cryptoguess
Library
$ go get -u moul.io/cryptoguess/cryptoguess

As a library

See https://godoc.org/moul.io/cryptoguess/cryptoguess

License

Β© 2019 Manfred Touron - Apache-2.0 License

Documentation ΒΆ

Overview ΒΆ

Package main is ...

Source Files ΒΆ

Directories ΒΆ

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL