| 1 |
use |
| 2 |
hexdump -v -e '12/1 "0x%02x, " "\n"' infile|outfile |
| 3 |
|
| 4 |
to import ndr dumps |
| 5 |
|
| 6 |
|
| 7 |
Or use gdb: |
| 8 |
|
| 9 |
(gdb) b dump_printer |
| 10 |
Breakpoint 1 at 0x49c92f: file ../source3/utils/net_printing.c, line 158. |
| 11 |
(gdb) cond 1 strcmp(key_name, "s0bc") == 0 |
| 12 |
(gdb) run |
| 13 |
Breakpoint 1, dump_printer (mem_ctx=0x700a20, key_name=0x11fb8f9 "s0bc", data=0x18f93d0 "H\032", length=1284, do_string_conversion=true) at ../source3/utils/net_printing.c:158 |
| 14 |
158 printf("found printer: %s\n", key_name); |
| 15 |
|
| 16 |
-> Now use x/<length in byte>bx |
| 17 |
|
| 18 |
(gdb) x/1284bx data |
| 19 |
|
| 20 |
This prints data as hex values. 1284 is the length in byte (see the length |
| 21 |
argument of the function). The b indicates byte. |