mirror of
https://github.com/thunderbrewhq/binana.git
synced 2026-03-22 22:00:13 +00:00
feat(binana): change tool to deposit generated files into an 'artifacts' folder that isn't retained by repository history
This commit is contained in:
parent
68f52b8efd
commit
47b08df145
44 changed files with 904 additions and 622 deletions
35
go/profile/compile_artifacts.go
Normal file
35
go/profile/compile_artifacts.go
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
package profile
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"slices"
|
||||
)
|
||||
|
||||
type CompileArtifactsParams struct {
|
||||
CompressX64dbgDatabase bool
|
||||
}
|
||||
|
||||
func (profile *Profile) CompileArtifacts(params *CompileArtifactsParams) (err error) {
|
||||
if !profile.loaded {
|
||||
panic(profile.loaded)
|
||||
}
|
||||
compilers := []struct {
|
||||
OS []string
|
||||
Name string
|
||||
Fn func(*Profile, *CompileArtifactsParams) error
|
||||
}{
|
||||
{[]string{"windows", "linux", "darwin"}, "Ghidra", compile_ghidra_artifacts},
|
||||
{[]string{"windows", "linux", "darwin"}, "IDA Pro", compile_idapro_artifacts},
|
||||
{[]string{"windows"}, "x64dbg", compile_x64dbg_artifacts},
|
||||
}
|
||||
|
||||
for _, compiler := range compilers {
|
||||
if slices.Contains(compiler.OS, profile.Info.OS) {
|
||||
fmt.Println("compiling artifacts for", compiler.Name)
|
||||
if err = compiler.Fn(profile, params); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue