HTTP Body Hash Generator

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


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.


$ ./myapp 38edd673423f7dc9fbe919d7ea7b49cb dadd85ea2820b3fea639660ddc055c6e 2eb639434b15eac3a9e1d8c2dd9dba65 34e80bb64eed21911f3c9d0fcf965a9c d961c6dafbed56004547c44723683e07 1567d70393a19bdef283883ab85b7ddf 54f3de925270c32fb23c82c014f304ad 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.


./myapp -parallel 3 3d059183b731490ebf3c4241bed6a2ca e57eb17df6c4b94f8203b06bd07055a6 8314e5d500f91a88f9931794fdd4c19f e9bcad7f8d2f96ba72888861160dab39 c9d447483d13cc3a7be5ddeca7d60544 40c7a55ed6a5c4a17aa6889eca77241b 990a7d6bf2963d76e7e6b15635e21b11 08e88e3a61901a47d7361baf9146ebab


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.