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.
Current version: 1.1
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.
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
git clone https://github.com/John-MetrosSoftware/HashCapTerminal
cd HashCapTerminal
pip3 install -r requirements.txt
python3 HashCapTerminal.py
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. |
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. |
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.
The table of hash functions with which HashCap works is given.
In the future, the list will expand.
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.
Command brute | |
---|---|
Command | Description |
brute | Brute-force hash function by dictionary. |
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. |
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. |
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.
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. |
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. |
Command exit | ||
---|---|---|
Command | Description | |
exit | Exiting the program. |
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 sameonly handled by the program
. I just didn't want to write the same text twice.
Command hash | ||
---|---|---|
Command | Description | |
hash | Command for working with a hash function. |
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. |
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. |
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. |
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. |
Usage pwd | ||
---|---|---|
Command | Description | |
pwd | Display current working directory. |
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). |
Command sum | ||
---|---|---|
Command | Description | |
sum | Display the hash sum of a file. |
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. |
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. |
Command version | ||
---|---|---|
Command | Description | |
version | Display the current version of the program. |
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
.
Please report all problems / errors so that they can be fixed in time, I think there are enough of them.