Skip to content

Create an HTTP server that listens for passwords and calculates their hashes

Notifications You must be signed in to change notification settings

tornado1717/http-password-encoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

http-password-encoder

An HTTP server example that listens for passwords via URL parameters and calculates their hashes.

Installing

Starting up the server

  1. cd into the directory with the source file.
  2. run go run http-password-encoder.go <options...>
    • Optional parameters:
      • --port=xxx - specifies which port number to use (default = 8080).
      • --help - show help for command line server options.

Accepted queries to the server

Note: These assume the server is accessible at "localhost" and was configured to use port 12345.

  • ".../hash" - used to encode the provided password. This will return the password ID that the server will use to look up the encoding after it's been processed (after 5 seconds).
  • ".../hash/<passwordID>" - this will retrieve the encoded password data once it's available (after 5 seconds of creation).
  • ".../stats" - this will return a few server statistics in JSON format. Namely, the total number of passwords encoded (including those being processed), and the total number of seconds spent handling the corresponding HTTP requests.
  • ".../shutdown" - gracefully shut down the server. The server will immediately stop accepting new connections and will wait for all active connections to terminate before shutting down.

About

Create an HTTP server that listens for passwords and calculates their hashes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published