Dump a block of hexadecimal numbers from binary data. Also show a printable text version of the data. @type data: str @param data: Binary data. @type address: str @param address: Memory address where the data was read from. @type bits: i
(cls, data, address=None, bits=None, separator=" ", width=8)
| 638 | |
| 639 | @classmethod |
| 640 | def hexblock(cls, data, address=None, bits=None, separator=" ", width=8): |
| 641 | """ |
| 642 | Dump a block of hexadecimal numbers from binary data. |
| 643 | Also show a printable text version of the data. |
| 644 | |
| 645 | @type data: str |
| 646 | @param data: Binary data. |
| 647 | |
| 648 | @type address: str |
| 649 | @param address: Memory address where the data was read from. |
| 650 | |
| 651 | @type bits: int |
| 652 | @param bits: |
| 653 | (Optional) Number of bits of the target architecture. |
| 654 | The default is platform dependent. See: L{HexDump.address_size} |
| 655 | |
| 656 | @type separator: str |
| 657 | @param separator: |
| 658 | Separator between the hexadecimal representation of each character. |
| 659 | |
| 660 | @type width: int |
| 661 | @param width: |
| 662 | (Optional) Maximum number of characters to convert per text line. |
| 663 | |
| 664 | @rtype: str |
| 665 | @return: Multiline output text. |
| 666 | """ |
| 667 | return cls.hexblock_cb(cls.hexline, data, address, bits, width, cb_kwargs={"width": width, "separator": separator}) |
| 668 | |
| 669 | @classmethod |
| 670 | def hexblock_cb(cls, callback, data, address=None, bits=None, width=16, cb_args=(), cb_kwargs={}): |
no test coverage detected