Xdumpgo Tutorial ~repack~

00000000 48 65 6c 6c 6f 20 57 6f 72 6c 64 21 |Hello World!| | Flag | Description | Example | |------|-------------|---------| | -n , --length | Number of bytes to dump | xdumpgo -n 64 file.bin | | -s , --skip | Bytes to skip from start | xdumpgo -s 1024 file.bin | | -g , --group | Group size in bytes | xdumpgo -g 4 file.bin | | -e , --endian | Endianness: little or big | xdumpgo -e big file.bin | | -c , --color | Enable colorized output | xdumpgo -c file.bin | | -C , --canonical | Classic hex+ASCII (default) | xdumpgo -C file.bin | | -x | Hex dump only (no ASCII) | xdumpgo -x file.bin | Real example: analyzing a PNG header xdumpgo -g 4 -e big -n 32 -C image.png Output:

xdumpgo --plugin ipv4 -g 4 dump.bin 1. Reverse Engineering a Game Save File saveData, _ := os.ReadFile("game.sav") cfg := xdumpgo.DefaultConfig() cfg.GroupSize = 4 cfg.Endian = xdumpgo.LittleEndian xdumpgo.NewDumper(cfg).Write(os.Stdout, saveData) Spot checksum fields and embedded strings instantly. 2. Network Packet Analysis (PCAP payload) Extract UDP payload and dump it:

return net.IPv4(data[0], data[1], data[2], data[3]), nil xdumpgo tutorial

xdumpgo myfile.bin Output (example):

dump := xdumpgo.NewDumper(cfg) dump.Write(os.Stdout, data) For files too big to fit in memory, use StreamDump : 00000000 48 65 6c 6c 6f 20 57 6f 72 6c 64 21 |Hello World

dumper := xdumpgo.NewDumperWithHook(func(offset uint64, chunk []byte) if offset == 0 decodeHeader(chunk) ) diff := xdumpgo.Diff(oldData, newData) for _, d := range diff fmt.Printf("Offset 0x%X: %02X -> %02X\n", d.Offset, d.OldByte, d.NewByte)

00000000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 |‰PNG........IHDR| You immediately recognize the PNG signature and IHDR chunk. The real power of xdumpgo shines when integrated into your own Go programs. Basic Dumper package main import ( "os" "github.com/example/xdumpgo" ) Network Packet Analysis (PCAP payload) Extract UDP payload

Now the CLI can decode on the fly: