Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nokute78/pe-cert-reader
A library and tool in golang to read cert from PE file.
https://github.com/nokute78/pe-cert-reader
golang pe uefi
Last synced: 12 days ago
JSON representation
A library and tool in golang to read cert from PE file.
- Host: GitHub
- URL: https://github.com/nokute78/pe-cert-reader
- Owner: nokute78
- License: apache-2.0
- Created: 2020-07-12T08:17:00.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-18T08:47:49.000Z (over 4 years ago)
- Last Synced: 2024-11-29T12:18:11.022Z (2 months ago)
- Topics: golang, pe, uefi
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pe-cert-reader
[![Go Report Card](https://goreportcard.com/badge/github.com/nokute78/pe-cert-reader)](https://goreportcard.com/report/github.com/nokute78/pe-cert-reader)
[![GoDoc](https://godoc.org/github.com/nokute78/pe-cert-reader/pkg/pecert?status.svg)](https://godoc.org/github.com/nokute78/pe-cert-reader/pkg/pecert)A library and tool to read certs of PE file.
## Command
```
$ ./pe-cert-reader -h
Usage of pe-cert-reader:
-V show Version
-d dump certs
````-d` option dump cert(s) from PE file. The suffix of cert file is `.certX`.
## Example
```go
package mainimport (
"flag"
"fmt"
"github.com/nokute78/pe-cert-reader/pkg/pecert"
)func main() {
flag.Parse()
for _, file := range flag.Args() {
attrs, err := pecert.GetAttributeCertificatesFromPath(file)
if err != nil {
fmt.Printf("%s\n", err)
}
for i, attr := range attrs {
fmt.Printf("%d: %v\n",i, attr)
}
}
}
```## Reference
[PE Format Specification](https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)
## License
[Apache License v2.0](https://www.apache.org/licenses/LICENSE-2.0)