Skip to content

Instantly share code, notes, and snippets.

@arata-nvm
Created December 29, 2020 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arata-nvm/cd2baa0bfaa53b3c0f4ea8a4dbbc16ff to your computer and use it in GitHub Desktop.
Save arata-nvm/cd2baa0bfaa53b3c0f4ea8a4dbbc16ff to your computer and use it in GitHub Desktop.
qop="auth"
realm="secret"
nonce="7AnDuX6kBQA=882872eb1107d5d4543510e6d32fbdb6ba08d70f"
uri="/~q9/flag.html"
cnonce="9e6b1c715c97c960"
nc="00000001"
username="admin"
password="password"
method="GET"
echo "[+] qop: $qop"
echo "[+] realm: $realm"
echo "[+] nonce: $nonce"
echo "[+] uri: $uri"
echo "[+] cnonce: $cnonce"
echo "[+] nc: $nc"
echo "[+] username: $username"
echo "[+] password: $password"
echo "[+] method: $method"
ha1=`echo -n $username":"$realm":"$password | md5sum | cut -d' ' -f1`
echo "[+] ha1: $ha1"
ha2=`echo -n $method":"$uri | md5sum | cut -d' ' -f1`
echo "[+] ha2: $ha2"
response=`echo -n $ha1":"$nonce":"$nc":"$cnonce":"$qop":"$ha2 | md5sum | cut -d' ' -f1`
echo "[+] response: $response"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment