Skip to content

Latest commit

History

68 Commits

Folders and files

NameName
Last commit message
Last commit date

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

LibraryPip
pysha3pip install pysha3
whirlpoolpip install whirlpool
coloramapip install colorama
prompt_toolkitpip 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
NameDescription
[i] - infoRegular message. Information about something.
[w] - warningA warning is usually used when deleting a file. Notification of dangerous actions.
[e] - errorAn 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
NameDescription
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
NameDescription
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

NamePython libraryWikipedia
adler32zlibADLER32
blake2bhashlibBLAKE
blake2shashlibBLALE
crc32zlibCRC32
keccak224pysha3SHA3
keccak256pysha3SHA3
keccak384pysha3SHA3
keccak512pysha3SHA3
md4hashlibMD4
md5hashlibMD5
ripemd160hashlibRIPEMD
sha1hashlibSHA1
sha224hashlibSHA1
sha256hashlibSHA1
sha384hashlibSHA1
sha512hashlibSHA1
sha3-224hashlibSHA3
sha3-256hashlibSHA3
sha3-384hashlibSHA3
sha3-512hashlibSHA3
shake128hashlibSHA3
shake256hashlibSHA3
whirlpoolwhirlpoolWHIRLPOOL

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
CommandDescription
bruteBrute-force hash function by dictionary.
cdChanging the current working directory.
clear, clean, clsClearing the terminal.
dirDisplaying directory contents.
echoDisplay a line of text.
exit, quitExiting the program.
fileCommand for working with files.
folderCommand for working with folders.
hashCommand for working with a hash function.
helpDisplaying program help.
historyCommand for working with input history.
lsDisplaying directory contents.
pwdDisplay current working directory.
readReading files.
sumDisplay the hash sum of a file.
systemExecute an external command in a shell.
versionDisplay 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
CommandDescription
bruteBrute-force hash function by dictionary.
Options brute
OptionsDescription
--adler32https://en.wikipedia.org/wiki/Adler-32
--blake2bhttps://en.wikipedia.org/wiki/BLAKE_(hash_function)
--blake2shttps://en.wikipedia.org/wiki/BLAKE_(hash_function)
--crc32https://en.wikipedia.org/wiki/Cyclic_redundancy_check
--keccak224https://en.wikipedia.org/wiki/SHA-3
--keccak256https://en.wikipedia.org/wiki/SHA-3
--keccak384https://en.wikipedia.org/wiki/SHA-3
--keccak512https://en.wikipedia.org/wiki/SHA-3
--md4https://en.wikipedia.org/wiki/MD4
--md5https://en.wikipedia.org/wiki/MD5
--ripemd160https://en.wikipedia.org/wiki/RIPEMD
--sha1https://en.wikipedia.org/wiki/SHA-1
--sha224https://en.wikipedia.org/wiki/SHA-1
--sha256https://en.wikipedia.org/wiki/SHA-1
--sha384https://en.wikipedia.org/wiki/SHA-1
--sha512https://en.wikipedia.org/wiki/SHA-1
--sha3-224https://en.wikipedia.org/wiki/SHA-3
--sha3-256https://en.wikipedia.org/wiki/SHA-3
--sha3-384https://en.wikipedia.org/wiki/SHA-3
--sha3-512https://en.wikipedia.org/wiki/SHA-3
--shake128https://en.wikipedia.org/wiki/SHA-3
--shake256https://en.wikipedia.org/wiki/SHA-3
--whirlpoolhttps://en.wikipedia.org/wiki/Whirlpool_(hash_function)
Usage brute
CommandBrute optionsHash targetDictionary
brute--md5098f6bcd4621d373cade4e832627b4f6dictionary.txt
Mistakes
NameDescription
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
CommandDescription
cdChanging the current working directory.
Usage cd
CommandCd optionsDescription
cdThe command without parameters displays the current directory.
cd..Go back to previous directory.
cd/testChange to another directory.
Mistakes
NameDescription
Could not find directory.Failed to change directory. Check the existence of the directory and the syntax for writing the command.

clear

Command clear
CommandDescription
clearClearing the terminal.
Options clear
OptionsDescription
-e, --enable, --onEnabled screen clearing after command input.
-d, --disable, --offDisabled screen clearing after command input.
Usage clear
CommandClear optionsDescription
clearThe command without parameters displays the current directory.
clear-eEnabled screen clearing after command input.
clear-dDisabled screen clearing after command input.
Mistakes
NameDescription
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
CommandDescription
dirDisplaying directory contents.
Usage dir
CommandDir optionsDescription
dirDisplay files and folders in the current directory.
dir/testDisplay files and folders of a specific directory.

echo

Command echo
CommandDescription
echoDisplaying directory contents.
Options echo
OptionsDescription
-e, --enable, --onEnabled command output mode on the screen.
-d, --disable, --offDisabled command output mode on the screen.
Usage echo
CommandEcho optionsDescription
echoIf you do not pass parameters, then the output will be a new line.
echotestText output.
echo-eEnabled command output mode on the screen.
echo-dDisabled command output mode on the screen.

exit

Command exit
CommandDescription
exitExiting the program.

file | folder

Command file | folder
CommandDescription
file | folderCommand for working with files | folders.
Options file | folder
OptionsDescription
-c, --createCreate file | folder.
-r, --removeDelete a file | folder.
Usage file | folder
CommandFile | folder optionsDescription
file | folder-c test.txt | -c testThe file `test.txt` | folder `test` will be created.
file | folder-r tеst.txt | testThe file `test.txt` | folder `test` will be removed.
Mistakes
NameDescription
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
CommandDescription
hashCommand for working with a hash function.
Options hash
OptionsDescription
--adler32https://en.wikipedia.org/wiki/Adler-32
--blake2bhttps://en.wikipedia.org/wiki/BLAKE_(hash_function)
--blake2shttps://en.wikipedia.org/wiki/BLAKE_(hash_function)
--crc32https://en.wikipedia.org/wiki/Cyclic_redundancy_check
--keccak224https://en.wikipedia.org/wiki/SHA-3
--keccak256https://en.wikipedia.org/wiki/SHA-3
--keccak384https://en.wikipedia.org/wiki/SHA-3
--keccak512https://en.wikipedia.org/wiki/SHA-3
--md4https://en.wikipedia.org/wiki/MD4
--md5https://en.wikipedia.org/wiki/MD5
--ripemd160https://en.wikipedia.org/wiki/RIPEMD
--sha1https://en.wikipedia.org/wiki/SHA-1
--sha224https://en.wikipedia.org/wiki/SHA-1
--sha256https://en.wikipedia.org/wiki/SHA-1
--sha384https://en.wikipedia.org/wiki/SHA-1
--sha512https://en.wikipedia.org/wiki/SHA-1
--sha3-224https://en.wikipedia.org/wiki/SHA-3
--sha3-256https://en.wikipedia.org/wiki/SHA-3
--sha3-384https://en.wikipedia.org/wiki/SHA-3
--sha3-512https://en.wikipedia.org/wiki/SHA-3
--shake128https://en.wikipedia.org/wiki/SHA-3
--shake256https://en.wikipedia.org/wiki/SHA-3
--whirlpoolhttps://en.wikipedia.org/wiki/Whirlpool_(hash_function)
-a, --allHashing a string with all functions. For the place of a specific function, everything at once.
-s, --stringRegular string comparisons.
Usage hash
CommandHash optionsDescription
hash--md5 testHashing string `test` in md5.
hash--md5 test == 098f6bcd4621d373cade4e832627b4f6Comparison if after converting the string `test` the resulting hash will be equal to the parameter, then everything is correct.
hash--md5 098f6bcd4621d373cade4e832627b4f6 == testThe same as above, just a different syntax.
hash-s test == testRegular string comparisons.
Mistakes
NameDescription
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
CommandDescription
helpDisplaying program help.
Options echo
OptionsDescription
-a, --allComplete help for the program.
-g, --github
Usage help
CommandHelp optionsDescription
helpBrief display of the list of program commands.
help-aFull display of the list of program commands.
help-gViewing the program repository.
helphashDisplay help for a specific command.
Mistakes
NameDescription
Can't find help for commandThere is no help for the command you entered, pay attention to the syntax of writing.

history

Command history
CommandDescription
historyCommand for working with input history.
Options history
OptionsDescription
-c, --clearClearing the history file.
-s, --clear-session Clearing the history file and session.
Usage history
CommandHistory optionsDescription
historyDisplay input history.
history-cThe history file will be cleared. (.hashcap_terminal_history).
history-sThe history file and session will be cleared.
Mistakes
NameDescription
Unknown parameter.Apparently you entered an unknown parameter, pay attention to the syntax for writing the command.

ls

Command ls
CommandDescription
lsDisplaying directory contents.
Options ls
OptionsDescription
-f, --fileDisplay only files.
-d, --directoryDisplay only folders.
Usage ls
CommandLs optionsDescription
lsDisplay files and folders in the current directory.
ls/test -fDisplay only files.
ls/test -dDisplay only folders.
Mistakes
NameDescription
Could not find directoryCould not find directory to display content. Check the syntax for writing the command and for the existence of the directory.

pwd

Usage pwd
CommandDescription
pwdDisplay current working directory.

read

Command read
CommandDescription
readReading files.
Options read
OptionsDescription
-e, --encodingFile opening encoding.
Usage read
CommandRead optionsDescription
readtest.txtThe file `test.txt` will be read. (default: UTF-8).
readtest.txt -e=UTF-8The `test.txt` file will be read with only the specified encoding.
Mistakes
NameDescription
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
CommandDescription
sumDisplay the hash sum of a file.
Options sum
OptionsDescription
--adler32https://en.wikipedia.org/wiki/Adler-32
--blake2bhttps://en.wikipedia.org/wiki/BLAKE_(hash_function)
--blake2shttps://en.wikipedia.org/wiki/BLAKE_(hash_function)
--crc32https://en.wikipedia.org/wiki/Cyclic_redundancy_check
--keccak224https://en.wikipedia.org/wiki/SHA-3
--keccak256https://en.wikipedia.org/wiki/SHA-3
--keccak384https://en.wikipedia.org/wiki/SHA-3
--keccak512https://en.wikipedia.org/wiki/SHA-3
--md4https://en.wikipedia.org/wiki/MD4
--md5https://en.wikipedia.org/wiki/MD5
--ripemd160https://en.wikipedia.org/wiki/RIPEMD
--sha1https://en.wikipedia.org/wiki/SHA-1
--sha224https://en.wikipedia.org/wiki/SHA-1
--sha256https://en.wikipedia.org/wiki/SHA-1
--sha384https://en.wikipedia.org/wiki/SHA-1
--sha512https://en.wikipedia.org/wiki/SHA-1
--sha3-224https://en.wikipedia.org/wiki/SHA-3
--sha3-256https://en.wikipedia.org/wiki/SHA-3
--sha3-384https://en.wikipedia.org/wiki/SHA-3
--sha3-512https://en.wikipedia.org/wiki/SHA-3
--shake128https://en.wikipedia.org/wiki/SHA-3
--shake256https://en.wikipedia.org/wiki/SHA-3
--whirlpoolhttps://en.wikipedia.org/wiki/Whirlpool_(hash_function)
-a, --allHashing a string with all functions. For the place of a specific function, everything at once.
Usage sum
CommandSum optionsDescription
sum--md5 test.txtDisplay the hash sum of the file.
sum--md5 test.txt == d8e8fca2dc0f896fd7cb4cb0031ba249Compare sum hashes.
sum--md5 d8e8fca2dc0f896fd7cb4cb0031ba249 == test.txtCompare sum hashes.
Mistakes
NameDescription
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
CommandDescription
systemExecute an external command in a shell.
Options system
OptionsDescription
echo Hello, world!The external `echo` command will be executed.

version

Command version
CommandDescription
versionDisplay 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

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages