Skip to content

m3tros/HashCapTerminal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HashCapTerminal

HashCap Terminal

Description

HashCap version [Command Line Interpreter | Terminal] program for working with hash functions.
This program is implemented in Python version 3.10.4. The library for getting data from the user is prompt_toolkit.
Hashcap implements the conversion of a string into a hash, iteration of hashes, as well as getting the checksum of files.

The program has been updated to version 1.1.

image

Current version: 1.1

Libraries

Library Pip
pysha3 pip install pysha3
whirlpool pip install whirlpool
colorama pip install colorama
prompt_toolkit pip install prompt_toolkit

In case of problems with the installation, read the official documentation here there are all links. You can remove the libraries that are responsible for hashing from the code in case of problems, the most important is hashlib.

Pysha3 platform requirements

Installing this pysha3 library may cause errors.
Familiarize yourself with the requirements of the library for its work,
it provides the work of such hash functions as: keccak224, keccak256, keccak384, keccak512.
Check out the library documentation.

Pysha3 requirements:

Linux (GCC, clang) on X86, X86_64 and ARMv6 (little endian)
Windows (VS 2008, VS 2010, VS2015) on X86 and X86_64

Installation for python3

git clone https://github.com/John-MetrosSoftware/HashCapTerminal
cd HashCapTerminal
pip3 install -r requirements.txt
python3 HashCapTerminal.py

Terminal messages

Terminal messages
Name Description
[i] - info Regular message. Information about something.
[w] - warning A warning is usually used when deleting a file. Notification of dangerous actions.
[e] - error An error has occurred, there should be a description of the error next to it.

Terminal input

The propmpt_toolkit library is responsible for entering commands and the prompt function, the session file is located specifically in the place of the program called .hashcap_terminal_history, it is also important to note that the backslash is replaced by a slash and the parameters are converted to lower case.

To exit the program, you can press Ctrl+C. To stop Brute-force press all the same Ctrl+C.

Mistakes
Name Description
Command not found. The command you entered could not be processed. This means that there is no such command, check the command syntax.
Not enough permissions to execute the command. You do not have sufficient rights to execute the command, increase the rights to execute such commands. Use sudo if you are on linux or run the program as administrator if you are on windows.

Terminal mistakes

Mistakes
Name Description
Unknown error. If you get this message, then there should be an error message nearby, look for an answer on the Internet or create a question in the repository and describe the problem in more detail.

The program does not handle such errors.

List of hash functions

Name Python library Wikipedia
adler32 zlib ADLER32
blake2b hashlib BLAKE
blake2s hashlib BLALE
crc32 zlib CRC32
keccak224 pysha3 SHA3
keccak256 pysha3 SHA3
keccak384 pysha3 SHA3
keccak512 pysha3 SHA3
md4 hashlib MD4
md5 hashlib MD5
ripemd160 hashlib RIPEMD
sha1 hashlib SHA1
sha224 hashlib SHA1
sha256 hashlib SHA1
sha384 hashlib SHA1
sha512 hashlib SHA1
sha3-224 hashlib SHA3
sha3-256 hashlib SHA3
sha3-384 hashlib SHA3
sha3-512 hashlib SHA3
shake128 hashlib SHA3
shake256 hashlib SHA3
whirlpool whirlpool WHIRLPOOL

The table of hash functions with which HashCap works is given.
In the future, the list will expand.

Usage

All commands

To display help for a specific command, you must add the name of the command after the help command.
To display the full program help, use the -a or --all option, it will display the help of all commands.

All commands
Command Description
brute Brute-force hash function by dictionary.
cd Changing the current working directory.
clear, clean, cls Clearing the terminal.
dir Displaying directory contents.
echo Display a line of text.
exit, quit Exiting the program.
file Command for working with files.
folder Command for working with folders.
hash Command for working with a hash function.
help Displaying program help.
history Command for working with input history.
ls Displaying directory contents.
pwd Display current working directory.
read Reading files.
sum Display the hash sum of a file.
system Execute an external command in a shell.
version Display the current version of the program.

Click on the command you need in the table, the link will take you to its help.

brute

image

Command brute
Command Description
brute Brute-force hash function by dictionary.
Options brute
Options Description
--adler32 https://en.wikipedia.org/wiki/Adler-32
--blake2b https://en.wikipedia.org/wiki/BLAKE_(hash_function)
--blake2s https://en.wikipedia.org/wiki/BLAKE_(hash_function)
--crc32 https://en.wikipedia.org/wiki/Cyclic_redundancy_check
--keccak224 https://en.wikipedia.org/wiki/SHA-3
--keccak256 https://en.wikipedia.org/wiki/SHA-3
--keccak384 https://en.wikipedia.org/wiki/SHA-3
--keccak512 https://en.wikipedia.org/wiki/SHA-3
--md4 https://en.wikipedia.org/wiki/MD4
--md5 https://en.wikipedia.org/wiki/MD5
--ripemd160 https://en.wikipedia.org/wiki/RIPEMD
--sha1 https://en.wikipedia.org/wiki/SHA-1
--sha224 https://en.wikipedia.org/wiki/SHA-1
--sha256 https://en.wikipedia.org/wiki/SHA-1
--sha384 https://en.wikipedia.org/wiki/SHA-1
--sha512 https://en.wikipedia.org/wiki/SHA-1
--sha3-224 https://en.wikipedia.org/wiki/SHA-3
--sha3-256 https://en.wikipedia.org/wiki/SHA-3
--sha3-384 https://en.wikipedia.org/wiki/SHA-3
--sha3-512 https://en.wikipedia.org/wiki/SHA-3
--shake128 https://en.wikipedia.org/wiki/SHA-3
--shake256 https://en.wikipedia.org/wiki/SHA-3
--whirlpool https://en.wikipedia.org/wiki/Whirlpool_(hash_function)
Usage brute
Command Brute options Hash target Dictionary
brute --md5 098f6bcd4621d373cade4e832627b4f6 dictionary.txt
Mistakes
Name Description
There are not enough parameters to execute the command `brute`. There are not enough parameters for the command to work. Check the spelling syntax.
There must be an exact parameter here. The `--all` option is not applicable here. You cannot use the `--all` option, or `-a` for short. This parameter is responsible for the use of all hash functions in the bruforce command, you need a specific hash function.
An error occurred while opening the dictionary file. Apparently there was an error opening the dictionary file. The file is opened with `latin-1` encoding in `r` mode.
Nothing was found. No results. Try with a different dictionary.
Could not find dictionary file. Check the existence of the dictionary and the syntax for writing the command.

cd

Command cd
Command Description
cd Changing the current working directory.
Usage cd
Command Cd options Description
cd The command without parameters displays the current directory.
cd .. Go back to previous directory.
cd /test Change to another directory.
Mistakes
Name Description
Could not find directory. Failed to change directory. Check the existence of the directory and the syntax for writing the command.

clear

Command clear
Command Description
clear Clearing the terminal.
Options clear
Options Description
-e, --enable, --on Enabled screen clearing after command input.
-d, --disable, --off Disabled screen clearing after command input.
Usage clear
Command Clear options Description
clear The command without parameters displays the current directory.
clear -e Enabled screen clearing after command input.
clear -d Disabled screen clearing after command input.
Mistakes
Name Description
Unknown parameter. Apparently you specified an incorrect parameter to execute the command, view the list of available parameters. Pay attention to the command syntax.

clear or clean or cls are called by the same command. Syntactic sugar, nothing more.

dir

Command dir
Command Description
dir Displaying directory contents.
Usage dir
Command Dir options Description
dir Display files and folders in the current directory.
dir /test Display files and folders of a specific directory.

echo

Command echo
Command Description
echo Displaying directory contents.
Options echo
Options Description
-e, --enable, --on Enabled command output mode on the screen.
-d, --disable, --off Disabled command output mode on the screen.
Usage echo
Command Echo options Description
echo If you do not pass parameters, then the output will be a new line.
echo test Text output.
echo -e Enabled command output mode on the screen.
echo -d Disabled command output mode on the screen.

exit

Command exit
Command Description
exit Exiting the program.

file | folder

Command file | folder
Command Description
file | folder Command for working with files | folders.
Options file | folder
Options Description
-c, --create Create file | folder.
-r, --remove Delete a file | folder.
Usage file | folder
Command File | folder options Description
file | folder -c test.txt | -c test The file `test.txt` | folder `test` will be created.
file | folder -r tеst.txt | test The file `test.txt` | folder `test` will be removed.
Mistakes
Name Description
Unknown parameter. Could not find the parameter to execute the command, please note the syntax of writing.
You did not enter a file | folder name. Apparently you did not specify the file | folder name, pay attention to the syntax for writing the command.
Failed to create file | folder. For some reason, the file | folder could not be created.
Failed to delete file | folder. Apparently for some reason it was not possible to delete the file | folder.
There are not enough parameters to execute the command `file` | `folder`. Apparently you didn't specify any parameters. This command will not work without parameters.
Could not find file | folder. The file | folder could not be found to delete. Check its existence, most likely it has already been deleted or simply moved. Also check the command syntax.

Commands such as file or folder are combined into one help because they work the same almost but the errors are the same only handled by the program. I just didn't want to write the same text twice.

hash

image

Command hash
Command Description
hash Command for working with a hash function.
Options hash
Options Description
--adler32 https://en.wikipedia.org/wiki/Adler-32
--blake2b https://en.wikipedia.org/wiki/BLAKE_(hash_function)
--blake2s https://en.wikipedia.org/wiki/BLAKE_(hash_function)
--crc32 https://en.wikipedia.org/wiki/Cyclic_redundancy_check
--keccak224 https://en.wikipedia.org/wiki/SHA-3
--keccak256 https://en.wikipedia.org/wiki/SHA-3
--keccak384 https://en.wikipedia.org/wiki/SHA-3
--keccak512 https://en.wikipedia.org/wiki/SHA-3
--md4 https://en.wikipedia.org/wiki/MD4
--md5 https://en.wikipedia.org/wiki/MD5
--ripemd160 https://en.wikipedia.org/wiki/RIPEMD
--sha1 https://en.wikipedia.org/wiki/SHA-1
--sha224 https://en.wikipedia.org/wiki/SHA-1
--sha256 https://en.wikipedia.org/wiki/SHA-1
--sha384 https://en.wikipedia.org/wiki/SHA-1
--sha512 https://en.wikipedia.org/wiki/SHA-1
--sha3-224 https://en.wikipedia.org/wiki/SHA-3
--sha3-256 https://en.wikipedia.org/wiki/SHA-3
--sha3-384 https://en.wikipedia.org/wiki/SHA-3
--sha3-512 https://en.wikipedia.org/wiki/SHA-3
--shake128 https://en.wikipedia.org/wiki/SHA-3
--shake256 https://en.wikipedia.org/wiki/SHA-3
--whirlpool https://en.wikipedia.org/wiki/Whirlpool_(hash_function)
-a, --all Hashing a string with all functions. For the place of a specific function, everything at once.
-s, --string Regular string comparisons.
Usage hash
Command Hash options Description
hash --md5 test Hashing string `test` in md5.
hash --md5 test == 098f6bcd4621d373cade4e832627b4f6 Comparison if after converting the string `test` the resulting hash will be equal to the parameter, then everything is correct.
hash --md5 098f6bcd4621d373cade4e832627b4f6 == test The same as above, just a different syntax.
hash -s test == test Regular string comparisons.
Mistakes
Name Description
Does not equal. This reads that when comparing the parameters are not equal to each other.
There are not enough parameters to execute the command `hash`. Apparently you didn't specify any parameters. This command will not work without parameters.
Could not find hash. Apparently you have specified a hash function that is not in the program, check the syntax for writing the command.

Help

Command help
Command Description
help Displaying program help.
Options echo
Options Description
-a, --all Complete help for the program.
-g, --github
Usage help
Command Help options Description
help Brief display of the list of program commands.
help -a Full display of the list of program commands.
help -g Viewing the program repository.
help hash Display help for a specific command.
Mistakes
Name Description
Can't find help for command There is no help for the command you entered, pay attention to the syntax of writing.

history

Command history
Command Description
history Command for working with input history.
Options history
Options Description
-c, --clear Clearing the history file.
-s, --clear-session Clearing the history file and session.
Usage history
Command History options Description
history Display input history.
history -c The history file will be cleared. (.hashcap_terminal_history).
history -s The history file and session will be cleared.
Mistakes
Name Description
Unknown parameter. Apparently you entered an unknown parameter, pay attention to the syntax for writing the command.

ls

Command ls
Command Description
ls Displaying directory contents.
Options ls
Options Description
-f, --file Display only files.
-d, --directory Display only folders.
Usage ls
Command Ls options Description
ls Display files and folders in the current directory.
ls /test -f Display only files.
ls /test -d Display only folders.
Mistakes
Name Description
Could not find directory Could not find directory to display content. Check the syntax for writing the command and for the existence of the directory.

pwd

Usage pwd
Command Description
pwd Display current working directory.

read

Command read
Command Description
read Reading files.
Options read
Options Description
-e, --encoding File opening encoding.
Usage read
Command Read options Description
read test.txt The file `test.txt` will be read. (default: UTF-8).
read test.txt -e=UTF-8 The `test.txt` file will be read with only the specified encoding.
Mistakes
Name Description
There are not enough parameters to execute the command `read`. Apparently you didn't specify any parameters. This command will not work without parameters.
Could not find the file. Could not find a file to display it. Check the syntax for writing and existing the file.
Unknown encoding. Failed to find the encoding, you specified the wrong encoding or the file cannot be opened with this encoding. (errors != ignore).

sum

image

Command sum
Command Description
sum Display the hash sum of a file.
Options sum
Options Description
--adler32 https://en.wikipedia.org/wiki/Adler-32
--blake2b https://en.wikipedia.org/wiki/BLAKE_(hash_function)
--blake2s https://en.wikipedia.org/wiki/BLAKE_(hash_function)
--crc32 https://en.wikipedia.org/wiki/Cyclic_redundancy_check
--keccak224 https://en.wikipedia.org/wiki/SHA-3
--keccak256 https://en.wikipedia.org/wiki/SHA-3
--keccak384 https://en.wikipedia.org/wiki/SHA-3
--keccak512 https://en.wikipedia.org/wiki/SHA-3
--md4 https://en.wikipedia.org/wiki/MD4
--md5 https://en.wikipedia.org/wiki/MD5
--ripemd160 https://en.wikipedia.org/wiki/RIPEMD
--sha1 https://en.wikipedia.org/wiki/SHA-1
--sha224 https://en.wikipedia.org/wiki/SHA-1
--sha256 https://en.wikipedia.org/wiki/SHA-1
--sha384 https://en.wikipedia.org/wiki/SHA-1
--sha512 https://en.wikipedia.org/wiki/SHA-1
--sha3-224 https://en.wikipedia.org/wiki/SHA-3
--sha3-256 https://en.wikipedia.org/wiki/SHA-3
--sha3-384 https://en.wikipedia.org/wiki/SHA-3
--sha3-512 https://en.wikipedia.org/wiki/SHA-3
--shake128 https://en.wikipedia.org/wiki/SHA-3
--shake256 https://en.wikipedia.org/wiki/SHA-3
--whirlpool https://en.wikipedia.org/wiki/Whirlpool_(hash_function)
-a, --all Hashing a string with all functions. For the place of a specific function, everything at once.
Usage sum
Command Sum options Description
sum --md5 test.txt Display the hash sum of the file.
sum --md5 test.txt == d8e8fca2dc0f896fd7cb4cb0031ba249 Compare sum hashes.
sum --md5 d8e8fca2dc0f896fd7cb4cb0031ba249 == test.txt Compare sum hashes.
Mistakes
Name Description
Does not equal. This reads that when comparing the parameters are not equal to each other.
Could not find the file. Could not find a file in order to display its sum, check the syntax for writing a command and the existence of a file.
There are not enough parameters to execute the command `sum`. Apparently you didn't specify any parameters. This command will not work without parameters.

system

Command system
Command Description
system Execute an external command in a shell.
Options system
Options Description
echo Hello, world! The external `echo` command will be executed.

version

Command version
Command Description
version Display the current version of the program.

Compilation

There are a lot of compilers for python, but I will use pyinstaller.

pyinstaller -F HashCapTerminal.py

After compilation, one executable file will appear in the dist folder. In order to change the icon, add the parameter --icon=ICON_PATH.

From developer

Please report all problems / errors so that they can be fixed in time, I think there are enough of them.

About

Hash software

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages