MCPcopy Index your code
hub / github.com/Ridter/p12tool

github.com/Ridter/p12tool @v1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0 ↗ · + Follow
11 symbols 42 edges 9 files 1 documented · 9%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

P12tool

学习golang写的一个用来解析和爆破p12证书的小工具,代码写的有点戳,能用就行。

Usage


██████╗  ██╗██████╗ ████████╗ ██████╗  ██████╗ ██╗
██╔══██╗███║╚════██╗╚══██╔══╝██╔═══██╗██╔═══██╗██║
██████╔╝╚██║ █████╔╝   ██║   ██║   ██║██║   ██║██║
██╔═══╝  ██║██╔═══╝    ██║   ██║   ██║██║   ██║██║
██║      ██║███████╗   ██║   ╚██████╔╝╚██████╔╝███████╗
╚═╝      ╚═╝╚══════╝   ╚═╝    ╚═════╝  ╚═════╝ ╚══════╝

Version: dev (n/a) - 12/31/20 - Evi1cg

NAME:
   p12tool - A tool to parse p12 cert file or bruteforce attacks against cert password

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

AUTHOR:
   Evi1cg

COMMANDS:
   parse    Parse p12 file and print cert info
   crack    Crack p12 file password.
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --cert value, -c value  The cert file you choice.
   --debug, -d             Debug mode. (default: false)
   --help, -h              show help (default: false)

crack

go run cmd/main.go crack -c file.pfx -f passwords.txt

可选: -t 指定线程,-d 开启debug模式,-o 将破解成功的密码输出至指定文件。

parse

go run cmd/main.go parse -c file.pfx -p password

对证书进行解析,输出证书信息,顺便输出是否可对程序进行签名,免去手动验证的烦恼。 ~~

2020年推得最后一个小工具,祝大家新年快乐!!

参考

  • 1、https://github.com/allyomalley/p12CrackerGo
  • 2、https://golang.org/pkg/crypto/x509
  • 3、https://godoc.org/golang.org/x/crypto/pkcs12

Core symbols most depended-on inside this repo

Parse
called by 2
work/command.go
NewLogger
called by 2
util/log.go
crack
called by 1
work/bruteforce.go
checkPass
called by 1
work/bruteforce.go
PemCertFromPem
called by 1
work/parse.go
PrintBanner
called by 1
util/banner.go
P12FileBrute
called by 0
work/bruteforce.go
ParseP12file
called by 0
work/parse.go

Shape

Function 10
Struct 1

Languages

Go100%

Modules by API surface

work/parse.go3 symbols
work/bruteforce.go3 symbols
util/log.go2 symbols
work/command.go1 symbols
util/banner.go1 symbols
cmd/main.go1 symbols

For agents

$ claude mcp add p12tool \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact