feat(binana): improve documentation, add a way to import information into IDA

This commit is contained in:
phaneron 2024-08-03 00:45:27 -04:00
parent 063790577d
commit 061609ed2c
19 changed files with 8072 additions and 20 deletions

View file

@ -0,0 +1,38 @@
package cmd
import (
"fmt"
"os"
"github.com/spf13/cobra"
"github.com/thunderbrewhq/binana/go/profile"
)
var ida_gen = &cobra.Command{
Use: "ida-gen",
Short: "Generate IDC file using symbol file",
Run: ida_gen_func,
}
func ida_gen_func(cmd *cobra.Command, args []string) {
// get command line arguments
// module_name, err := cmd.Flags().GetString("module-name")
// if err != nil {
// panic(err)
// }
game_profile_directory, err := cmd.Flags().GetString("game")
if err != nil {
panic(err)
}
game_profile, err := profile.Open(game_profile_directory)
if err != nil {
panic(err)
}
if err = game_profile.CreateIDAFiles(); err != nil {
fmt.Println(err)
os.Exit(1)
}
}

View file

@ -35,6 +35,9 @@ func init() {
// when this action is called directly.
// rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
ida_gen.Flags().StringP("game", "g", "3.3.5a", "the game profile")
rootCmd.AddCommand(ida_gen)
x64dbg_gen.Flags().StringP("game", "g", "3.3.5a", "the game profile")
x64dbg_gen.Flags().StringP("module-name", "m", "wow.exe", "the name of the module")
x64dbg_gen.Flags().StringP("base-address", "b", "00400000", "the base address of the module")