Skip to content

Using golang to call the api in pe-sieve64.dll #112

Answered by hasherezade
wh0im1 asked this question in Q&A
Discussion options

You must be logged in to vote

@wh0im1 - I made some fixes in your code. It should work now.
Please check it out: https://gist.github.com/hasherezade/f6fafac2b7e452a36410c2c5583f9790

package main

import (
	"fmt"
	"syscall"
	"unsafe"
)

var (
	peSieveDll  = syscall.NewLazyDLL("pe-sieve64.dll")
	peSieveScanEx = peSieveDll.NewProc("PESieve_scan_ex")
)

const (
	ERROR_SCAN_FAILURE = ^uint32(0)
	MAX_PATH            = 260
)

type PEsieveRtype int32 // always use explicit integer types
const (
	ReportNone      PEsieveRtype = iota
	ReportScanned
	ReportDumped
	ReportAll
)

type ParamString struct {
	Length uint32
	Buffer *byte
}

type DotnetPolicy int32
const (
	PeDnetNone DotnetPolicy = iota
	PeDnetSkipMapping
	PeDnetSkipShc
	

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@wh0im1
Comment options

@hasherezade
Comment options

@wh0im1
Comment options

@hasherezade
Comment options

@wh0im1
Comment options

Answer selected by wh0im1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants