forked from radareorg/radare2-book
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
211 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
# Debugging | ||
|
||
It is common to have an issues when you write a plugin, especially if you do this for the first | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,63 @@ | ||
# Obtaining Hashes within Radare2 Session | ||
|
||
To calculate a checksum of current block when running radare2, use the 'ph' command. Pass an algorithm name to it as a parameter. An example session: | ||
|
||
$ radare2 /bin/ls | ||
[0x08049790]> bf entry0 | ||
[0x08049790]> ph md5 | ||
d2994c75adaa58392f953a448de5fba7 | ||
|
||
To calculate a checksum of current block when running radare2, use the `ph` command. Pass an algorithm name to it as a parameter. An example session: | ||
``` | ||
$ radare2 /bin/ls | ||
[0x08049790]> bf entry0 | ||
[0x08049790]> ph md5 | ||
d2994c75adaa58392f953a448de5fba7 | ||
``` | ||
You can use all hashing algorithms supported by `rahash2`: | ||
|
||
[0x00404890]> ph? | ||
md5 | ||
sha1 | ||
sha256 | ||
sha384 | ||
sha512 | ||
crc16 | ||
crc32 | ||
md4 | ||
xor | ||
xorpair | ||
parity | ||
entropy | ||
hamdist | ||
pcprint | ||
mod255 | ||
xxhash | ||
adler32 | ||
luhn | ||
``` | ||
[0x00404890]> ph? | ||
[0x00000000]> ph? | ||
md5 | ||
sha1 | ||
sha256 | ||
sha384 | ||
sha512 | ||
md4 | ||
xor | ||
xorpair | ||
parity | ||
entropy | ||
hamdist | ||
pcprint | ||
mod255 | ||
xxhash | ||
adler32 | ||
luhn | ||
crc8smbus | ||
crc15can | ||
crc16 | ||
crc16hdlc | ||
crc16usb | ||
crc16citt | ||
crc24 | ||
crc32 | ||
crc32c | ||
crc32ecma267 | ||
crc32bzip2 | ||
crc32d | ||
crc32mpeg2 | ||
crc32posix | ||
crc32q | ||
crc32jamcrc | ||
crc32xfer | ||
crc64 | ||
crc64ecma | ||
crc64we | ||
crc64xz | ||
crc64iso | ||
``` | ||
|
||
The `ph` command accepts an optional numeric argument to specify length of byte range to be hashed, instead of default block size. For example: | ||
``` | ||
[0x08049A80]> ph md5 32 | ||
9b9012b00ef7a94b5824105b7aaad83b | ||
[0x08049A80]> ph md5 64 | ||
a71b087d8166c99869c9781e2edcf183 | ||
[0x08049A80]> ph md5 1024 | ||
a933cc94cd705f09a41ecc80c0041def | ||
``` | ||
|
||
[0x08049A80]> ph md5 32 | ||
9b9012b00ef7a94b5824105b7aaad83b | ||
[0x08049A80]> ph md5 64 | ||
a71b087d8166c99869c9781e2edcf183 | ||
[0x08049A80]> ph md5 1024 | ||
a933cc94cd705f09a41ecc80c0041def | ||
[0x08049A80]> |
Oops, something went wrong.