Hex dump_dump数据

Hex dump_dump数据HexdumpFromWikipedia,thefreeencyclopediaAhexdumpofthe318byteWikipediafaviconIncomputing,ahexdumpisahexadecimalview(onscreenorpaper)ofcomputerdata…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

Hex dump

From Wikipedia, the free encyclopedia
 
 
Hex dump_dump数据

 

A hex dump of the 318 
byte Wikipedia 
favicon

In computing, a hex dump is a hexadecimal view (on screen or paper) of computer data, from RAM or from a file or storage device. Looking at a hex dump of data is commonly done as a part of debugging, or of reverse engineering.

In a hex dump, each byte (8-bits) is represented as a two-digit hexadecimal number. Hex dumps are commonly organized into rows of 8 or 16 bytes, sometimes separated by whitespaces. Some hex dumps have the hexadecimal memory address at the beginning and/or a checksum byte at the end of each line.

Although the name implies the use of base-16 output, some hex dumping software may have options for base-8 (octal) or base-10 (decimal) output. Some common names for this program function are hexdumpodxxd and simply dump or even D.

 

 

Samples[edit]

A sample partial hex dump of a program, as produced by the Unix program hexdump:

 00105e0 e6b0 343b 9c74 0804 e7bc 0804 e7d5 0804
 00105f0 e7e4 0804 e6b0 0804 e7f0 0804 e7ff 0804
 0010600 e80b 0804 e81a 0804 e6b0 0804 e6b0 0804

The above example, however, represents an ambiguous form of hex dump, as the byte order may be uncertain. Such hex dumps are good only in the context of a well-known byte order standard or when values are intentionally given in their full form (and may result in variable number of bytes), such as:

 00105e0 e6 b008 04e79e08 04e7bc 08 04 e7 d50804

When explicit byte sequence is required (for example for hex dump of machine code programs or ROM content) a byte-by-byte representation is favoured, commonly organized in 16-byte rows with an optional divider between 8-byte groups:

 00105e0 e6 b0 08 04 e7 9e 08 04-e7 bc 08 04 e7 d5 08 04
 00105f0 e7 e4 08 04 e6 b0 08 04-e7 f0 08 04 e7 ff 08 04
 0010600 e8 0b 08 04 e8 1a 08 04-e6 b0 08 04 e6 b0 08 04

Rarely a condensed form is also used, without whitespaces between values:

 00105e0 e6b00804e79e0804e7bc0804e7d50804
 00105f0 e7e40804e6b00804e7f00804e7ff0804
 0010600 e80b0804e81a0804e6b00804e6b00804

A Unix default display of those same bytes as two-byte words on a modern x86 (little-endian) computer would usually look like this:

 00105e0 b0e6 0408 9ee7 0408 bce7 0408 d5e7 0408
 00105f0 e4e7 0408 b0e6 0408 f0e7 0408 ffe7 0408
 0010600 0be8 0408 1ae8 0408 b0e6 0408 b0e6 0408

Often an additional column shows the corresponding ASCII text translation (e.g. hexdump -C or hd):

0000: 57 69 6B 69 70 65 64 69 61 2C 20 74 68 65 20 66 Wikipedia, the f 0010: 72 65 65 20 65 6E 63 79 63 6C 6F 70 65 64 69 61 ree encyclopedia 0020: 20 74 68 61 74 20 61 6E 79 6F 6E 65 20 63 61 6E that anyone can 0030: 20 65 64 69 74 00 00 00 00 00 00 00 00 00 00 00 edit........... 

Checksum[edit]

When hex dumps are intended to be manually entered into a computer, such as was the case with print magazine articles of home computer era a checksum byte (or two) would be added at the end of each row, commonly calculated as simple 256 modulo of sum of all values in the row or a more sophisticated CRC. This checksum would be used to determine whether users entered the row correctly or not.

A variety of hex dump file formats — including S-recordIntel HEX, and Tektronix extended HEX — have a similar checksum value at the end of each row. 187259

Compression of duplicate lines[edit]

In the Unix programs od and hexdump, not all lines of display output that contain the same data as the previous line are shown; instead, a line containing just one asterisk is displayed. For example, a block of all zeros is printed as:

 0000000 0000 0000 0000 0000 0000 0000 0000 0000
 *
 0000030

This compression feature makes a useful tool for inspecting large files or complete devices for irregularities. In a modern Linux system, it is convenient to scan an entire hard drive to check if it is all blank:

 # hexdump /dev/sda (replace sda with the proper name for the device to be scanned)

The -v option causes hexdump and od to display all input data, explicitly:

 0000000 0000 0000 0000 0000 0000 0000 0000 0000
 0000010 0000 0000 0000 0000 0000 0000 0000 0000
 0000020 0000 0000 0000 0000 0000 0000 0000 0000

od and hexdump[edit]

On Unix/POSIX/GNU systems: “The utilities od and hexdump output octal, hex, or otherwise encoded bytes from a file or stream. Depending on your system type, either or both of these two utilities will be available–BSD systems deprecate od for hexdump, GNU systems the reverse. The two utilities, however, have exactly the same purpose, just slightly different switches.”[1]

DUMP, DDT and DEBUG[edit]

In the CP/M 8 bit operating system used on early personal computers, the standard DUMP program would list a file 16 bytes per line with the hex offset at the start of the line and the ASCII equivalent of each byte at the end.[2] Bytes outside the standard range of printable ASCII characters (20 to 7E) would be displayed as a single period for visual alignment. This same format was used to display memory when invoking the D command in the standard CP/M debugger DDT.[3] Later incarnations of the format (e.g. in the DOS debugger DEBUG) changed the space between the 8th and 9th byte to a dash without changing the overall width.

This notation has been retained in operating systems that were directly or indirectly derived from CP/M, including DR-DOSMS-DOSOS/2 and MS-Windows. On Linux systems, the command hexcat produces this classic output format too. The main reason for the design of this format is that it fits the maximum amount of data on a standard 80 character wide screen or printer, while still being very easy to read and skim visually.

1234:0000: 57 69 6B 69 70 65 64 69 61 2C 20 74 68 65 20 66 Wikipedia, the f 1234:0010: 72 65 65 20 65 6E 63 79 63 6C 6F 70 65 64 69 61 ree encyclopedia 1234:0020: 20 74 68 61 74 20 61 6E 79 6F 6E 65 20 63 61 6E that anyone can 1234:0030: 20 65 64 69 74 00 00 00 00 00 00 00 00 00 00 00 edit........... 

References[edit]

External links[edit]

转载于:https://www.cnblogs.com/endv/p/6689607.html

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/190952.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 错动态链接库(DLL)初始化例程失败。

    错动态链接库(DLL)初始化例程失败。每次关闭一个Excel工作表或Word文档都会出现加载C:\DocumentsandSettings\Administrator\ApplicationData\MicrosoftSha

    2022年7月2日
    26
  • python实现将数据写入Excel文件中「建议收藏」

    python实现将数据写入Excel文件中「建议收藏」将数据写入Excel文件中,用python实现起来非常的简单,下面一步步地教大家。一、导入excel表格文件处理函数importxlwt注意,这里的xlwt是python的第三方模块,需要下载安装才能使用,不然导入不了(python第三方库的安装也非常简单,打开命令行,输入pipinstallxlwt就可以了)二、创建excel表格类型文件book=xlwt.Workbook(encoding=’utf-8′,style_compression=0)调用xlwt模块中的Workbo

    2022年6月28日
    67
  • python实现守护进程_linux 守护进程

    python实现守护进程_linux 守护进程什么是守护线程:在后台运行,为其他线程提供服务的线程成为守护线程。为什么要引入守护线程:thread模块不支持守护线程的概念,当主线程退出时,所有的子线程都将终止,不管它们是否仍在工作,如果你不希望发生这种行为,就要引入守护线程的概念。守护线程的调用格式:thread.setDaemon(True)如何使用守护线程:1.当只有一个子线程并且为守护线程,那么这个守护线程就会等待主线程运行完毕后挂掉2…

    2022年10月8日
    1
  • 差分曼彻斯特编码详解「建议收藏」

    差分曼彻斯特编码详解「建议收藏」1.确定开始部位:第一个编码为0,表示从低到高第一个编码为1,表示从高到低;每一位由下面代替,表示信号的波动2.其次,下一位编码,遇0则跳动,遇1则不跳动

    2025年7月30日
    0
  • Javadeque_deque接口

    Javadeque_deque接口Queue也是Java集合框架中定义的一种接口,直接继承自Collection接口。除了基本的Collection接口规定测操作外,Queue接口还定义一组针对队列的特殊操作。通常来说,Queue是按照先进先出(FIFO)的方式来管理其中的元素的,但是优先队列是一个例外。Deque接口继承自Queue接口,但Deque支持同时从两端添加或移除元素,因此又被成为双端队列。鉴…

    2022年9月20日
    0
  • dump 分析工具_一键全扒网站工具

    dump 分析工具_一键全扒网站工具ProcDumpProcDump是一个命令行实用程序,其主要目的是监视应用程序的CPU峰值,并在峰值期间生成崩溃转储,管理员或开发人员可以使用它来确定峰值的原因。ProcDump还包括挂起窗口监视(使用与Windows和任务管理器使用的窗口挂起相同的定义)、未处理的异常监视,并且可以根据系统性能计数器的值生成转储。它还可以作为一个通用的进程转储实用程序,您可以将其嵌入到其他脚本中。官网DebugDiag调试诊断工具(DebugDiag)旨在帮助解决任何用户模式进程中的挂起、性能缓慢、内存泄漏

    2022年10月2日
    1

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号