Linux cli command rahash2

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command rahash2 and provides detailed information about the command rahash2, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the rahash2.

This program is part of the radare project.

It’s particularly useful for hashing large files and identifying modifications in forensics filesystem analysis.

This command provides the same features as the ‘ph’ command of radare.

Comma-separated list of algorithms to use when hashing files or strings. Refer to -L to list supported hashing algorithms. This flag can be passed multiple times instead of separating them by commas.

Specify the block size.

Compare the computed hash with the provided one. This is allowed only when a single hash is computed.

Decrypt using the specified algorithm. Use -S to set the key and -I to set the IV.

Swap endianness to show digests or injest keys in big or little endian.

Encrypt using the specified algorithm. Use -S to set the key and -I to set the IV.

Start hashing at the given address.

Repeat hash `num` iterations.

Use the given initialization vector (IV) (hexadecimal or string).

Display output in JSON format.

New simplified JSON output format (equivalent to -jj).

Display hash using OpenSSH’s randomkey algorithm.

List available hash, checksum and crypto plugins. This flag can be combined with -j to read the results in JSON format.

Hash the provided string instead of using the ‘source’ and ‘hash-file’ arguments.

Use the given seed (hexadecimal or string). Use ^ to prefix (key for -E). ‘-’ will slurp the key from stdin, and ‘@’ prefix points to a file.

Stop hashing at the given address.

Hash the provided hexadecimal string instead of using ‘source’ and ‘hash-file’ arguments.

Output of encryption in hexpairs instead of raw (see -j for json output)

Display version information.

Calculate the MD5 hash of the ’ls’ binary:

$ rahash2 -qqa md5 /bin/ls

Calculate the SHA256 hash of string from stdin:

$ echo -n “Hello, World” | rahash2 -a sha256 - $ rahash2 -a sha256 -s “Hello, World”

Compare CRC32 of the given file didnt changed:

$ rahash2 -qqa crc32 /bin/ls 63212007 $ rahash2 -a crc32 -c 63212007 /bin/ls INFO: Computed hash matches the expected one $ echo $? 0

List only the cryptographic plugins loaded:

$ rahash2 -L | grep ^c

$ rahash2 -qqa crc32 /bin/ls

Encode the string “Hello World” with base64:

$ rahash2 -E base64 -s “Hello World”

Calculate SHA256 hash of a specific part of a file:

$ rahash2 -qqa sha256 -f 0x1000 -t 0x2000 file_to_hash

Encrypt and decrypt the “hello” string using the ror and rol plugins:

$ rahash2 -S 12333 -E ror -s hello && echo Cell{ $ rahash2 -S 12333 -E rol -s Cell{ && echo hello

Encrypting and decrypting using AES-CBC:

$ export AES_KEY=“11111111111111111111111111113211” $ rahash2 -E aes-ecb -S “$AES_KEY” -s “hello world you bastard” > .file $ cat .file | rahash2 -D aes-ecb -S “$AES_KEY” -s - && echo

Encrypting a file using Blowfish and encode it into a json:

$ rahash2 -E blowfish -S “11111111111111111111111111113211” -j /bin/ls > ls.json

When using the -c flag, an exit status of 0 indicates a match between the expected and computed hashes.

https://www.radare.org/

pancake <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░