Skip to content

A library and tool in golang to read cert from PE file.

License

Notifications You must be signed in to change notification settings

nokute78/pe-cert-reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pe-cert-reader

Go Report Card GoDoc

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

package main

import (
	"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

License

Apache License v2.0

About

A library and tool in golang to read cert from PE file.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages