This CLI tool sends HTTP GET requests and print MD5 hash values of the response's body

Overview

HTTP Body Hash Generator

This CLI (Command Line Interface) tool sends HTTP GET requests and print MD5 hash values of the response's body.

Usage

You need Go to build the app.

After build tha app, you can use it in command line. The app get URL list from command line arguments.

Example:

$ ./myapp google.com facebook.com yahoo.com yandex.com twitter.com reddit.com/r/funny reddit.com/r/notfunny baroquemusiclibrary.com

yandex.com 38edd673423f7dc9fbe919d7ea7b49cb
baroquemusiclibrary.com dadd85ea2820b3fea639660ddc055c6e
facebook.com 2eb639434b15eac3a9e1d8c2dd9dba65
twitter.com 34e80bb64eed21911f3c9d0fcf965a9c
yahoo.com d961c6dafbed56004547c44723683e07
reddit.com/r/notfunny 1567d70393a19bdef283883ab85b7ddf
reddit.com/r/funny 54f3de925270c32fb23c82c014f304ad
google.com 99f21f345907233e72a6cae7256afce5

In order to reduce waiting time, the app sends parallel requests. The default count of parallel workers is 10, but you can use -parallel flag to change that value.

Example:

./myapp -parallel 3 google.com facebook.com yahoo.com yandex.com twitter.com reddit.com/r/funny reddit.com/r/notfunny baroquemusiclibrary.com

facebook.com 3d059183b731490ebf3c4241bed6a2ca
google.com e57eb17df6c4b94f8203b06bd07055a6
yandex.com 8314e5d500f91a88f9931794fdd4c19f
twitter.com e9bcad7f8d2f96ba72888861160dab39
reddit.com/r/funny c9d447483d13cc3a7be5ddeca7d60544
yahoo.com 40c7a55ed6a5c4a17aa6889eca77241b
baroquemusiclibrary.com 990a7d6bf2963d76e7e6b15635e21b11
reddit.com/r/notfunny 08e88e3a61901a47d7361baf9146ebab

Development

If you want to use a different method to get URL list, another hashing algorithm, or printing to file etc, the only thing you need to do is implementing an adapter for it and use it in main.go. You don't need to change buisiness logic for these type of changes.

Unit Tests

There are some unit tests in the project. If you need to add new test cases, you can easily add them into testCases array in related test file.

You might also like...
Nebula Diagnosis CLI Tool is an information diagnosis cli tool for the nebula service and the node to which the service belongs.

Nebula Diagnosis CLI Tool is an information diagnosis cli tool for the nebula service and the node to which the service belongs.

Idiomatic Go input parsing with subcommands, positional values, and flags at any position. No required project or package layout and no external dependencies.
Idiomatic Go input parsing with subcommands, positional values, and flags at any position. No required project or package layout and no external dependencies.

Sensible and fast command-line flag parsing with excellent support for subcommands and positional values. Flags can be at any position. Flaggy has no

gomerge is a tool to quickly bulk merge several pull requests from your terminal.
gomerge is a tool to quickly bulk merge several pull requests from your terminal.

Gomerge is a tool to quickly enable you to bulk merge Github pull requests from your terminal. The intention of this tool is to simplfy, and eventually automate the merging of github pull requests. This tool should be able to run on most systems.

A tool to sent comments to Issues or Pull Requests in Github from CI tools.

CommentCI A tool to sent comments to Issues or Pull Requests in Github from CI tools. Usage Required environment variables: GITHUB_COMMENT_USER - User

Go generator to copy values from type to type and fields from struct to struct. Copier without reflection.

Copygen is a command-line code generator that generates type-to-type and field-to-field struct code without adding any reflection or dependenc

A prediction program which analyzes given numbers and calculates new values

Guess-It-2 About This is a prediction program which analyzes given numbers and calculates new values. Usage To test the program, download this zip fil

A go cli makes it easy to get quotes from the Ted Lasso Quotes API

Ted Lasso Quotes CLI This cli makes it easy to get quotes from the Ted Lasso Quotes API Just clone the repo and build the binary for your distribution

This project is used to get familiar with GoLang cli apps, along with cobra generator.

SecretCTL SecretCTL About the project Status Getting started Layout Notes About the project This project is used to get familiar with GoLang cli apps,

yq lets you read YAML files easily on the terminal. You can find key/values easily
yq lets you read YAML files easily on the terminal. You can find key/values easily

yq yq lets you read YAML files easily on the terminal. You can find key/values easily. Motivation Reading yaml configurations for k8s file becomes ard

Owner
Uğur Kınık
Uğur Kınık
Use go to count file's lines and print them.

用法 go run staticCodeLine.go -p [root path] -s [suffix name] -e [exclude dirs] 如果 -e 有多个参数,多次输入 -e [suffix name]。 ╰─± go run statisticCodeLine.go -p /U

null 0 Dec 20, 2021
A rich tool for parsing flags and values in pure Golang

A rich tool for parsing flags and values in pure Golang. No additional library is required and you can use everywhere.

ALi.w 14 Jan 25, 2022
ghcv-cli makes it easy to view the user-created issues, pull requests, and repositories in the terminal.

ghcv-cli ghcv-cli makes it easy to view the user-created issues, pull requests, and repositories in the terminal. About Show a list of pull requests c

Kyosuke Fujimoto 14 Mar 13, 2022
A CLI tool for get meta infomation, for SEO, Testing , etc

What is meta-curl ? meta-curl is a CLI tool for get meta infomation, for SEO, Testing , etc. This can be used like curl CLI command. How to Use(wip) G

null 0 Nov 16, 2021
Gopassutil - Command line utility to hash and verify with passlib for go

gopassutil command line utility to hash and verify with passlib for go Usage Gen

null 0 Feb 1, 2022
💻 PTerm | Pretty Terminal Printer A golang module to print pretty text

✨ PTerm is a modern go module to beautify console output. Featuring charts, progressbars, tables, trees, and many more ?? It's completely configurable and 100% cross-platform compatible.

null 3.1k Nov 19, 2022
🎨 Terminal color rendering library, support 8/16 colors, 256 colors, RGB color rendering output, support Print/Sprintf methods, compatible with Windows.

?? Terminal color rendering library, support 8/16 colors, 256 colors, RGB color rendering output, support Print/Sprintf methods, compatible with Windows. GO CLI 控制台颜色渲染工具库,支持16色,256色,RGB色彩渲染输出,使用类似于 Print/Sprintf,兼容并支持 Windows 环境的色彩渲染

Gookit 1.2k Nov 19, 2022
Print day progress in your terminal

Day progress Print day progress in your terminal Install go install github.com/tsivinsky/[email protected] Usage day-progress By default, day-progre

Daniil Tsivinsky 0 Jan 10, 2022
Parse .har files to create Go http requests

HAR-Parser Parse .har files to create Go http requests Usage $ ./HAR-Parser myfi

null 10 Jul 14, 2022
A command line tool for filling missing metric values on Mackerel.

mackerel-null-bridge A command line tool for filling missing metric values on Mackerel. Description When sending error metrics, etc., you may be force

ikeda-masashi 0 Jan 11, 2022