# wget behind auth

\--------------------Example usage---------------------------

wget --no-cookies --header "Cookie: \<name>=\<value>" --post-data 'tab=search\&name=+\&personsubmit=Rechercher\&keywords=\&keywordsoption=allmine' <https://moodle.unistra.fr/message/index.php>

&#x20;

\-------------------------------Given request-----------------------------------------------------

GET /backend/cms/media HTTP/1.1

&#x20;Host: 10.10.10.16

&#x20;User-Agent: Mozilla/5.0 (X11; Linux x86\_64; rv:52.0) Gecko/20100101 Firefox/52.0

&#x20;Accept: text/html,application/xhtml+xml,application/xml;q=0.9,\*/\*;q=0.8

&#x20;Accept-Language: en-US,en;q=0.5

&#x20;Accept-Encoding: gzip, deflate

&#x20;

Referer: <http://10.10.10.16/backend/cms>

&#x20;Cookie: october\_session=eyJpdiI6Im5Jczk5SjVDMGlwNFZsbXk0eERPcUE9PSIsInZhbHVlIjoibnpUd3JEUDBITG9MSW1DbjRZSSt3WmVMcW53SDBlNmFLSnRSUXcxdFpadzFlTytabTVPZ2ZGemJCUEV4WlF4cVwvMGNKN014SUM5bGhZMWZLK3NoY3ZRPT0iLCJtYWMiOiI5MjdjM2ZhN2FkMmEwNWJlMGE3MzMzMjg3OWViYzA5OWQ5YWRhMzQ3NDkxY2E4YzNjMTkyNzIxODUyMzM5NTk4In0%3D; user\_auth=eyJpdiI6InY5aEFMbUs5KzBkTk1pUjFLaGw1dkE9PSIsInZhbHVlIjoiVWU0YlFjR1FGYmZid3JxRXFOKzllVkdEdUtOMzFxOUFnZmJWbVY1TmE3M1wvVEJKOTFsektyQTdrRnZUUU52K3hMblBOZExnZ3MwRUxPazF5QjdINmN2UDhuUVMrakdYeTVYXC9POElWS3NnTmVHSEF6N2pSMnBsaEVQYkZHV2RMbiIsIm1hYyI6IjhhNTZiZDkxMzVjM2EwODgxNzE0YTU0MDIwNjQxNTE0NDFlN2Q4NGVmNDQzODQzYmQ3NDk4NTY5ZDYyZmQ4ZmYifQ%3D%3D; admin\_auth=eyJpdiI6IlA1TDZHck15ekdsSytxbUlCM0N2WHc9PSIsInZhbHVlIjoiQ1BPSUU1Yk40RSt2OVdKVnQyQUNKZnRtU2crdUliS09BRENnQ3RzM0RybVNRWkV0bEZHTVwvbFAyOFA0aGt3anlFTGtINTJkdVNuXC9vQ1BYdUJyZTk5SVFjRTY5a2dua0djdFB5Sm5NeGVRWHhhd3ZxUXBlcHNGc3dXM3BhZ25rRiIsIm1hYyI6IjY3YTM2ZDc0NjdkZDlmNjk0MzYzZjE5YTI4MDQxNmVmM2Y4ZjZlMWI0N2Y3Y2U0NGZlZmFjYzNhZDM4NjQ1MzUifQ%3D%3D

&#x20;Connection: close

&#x20;Upgrade-Insecure-Requests: 1

&#x20;\----------------------------My usage----------------------------------

wget --no-cookies --header "Cookie: october\_session=eyJpdiI6Im5Jczk5SjVDMGlwNFZsbXk0eERPcUE9PSIsInZhbHVlIjoibnpUd3JEUDBITG9MSW1DbjRZSSt3WmVMcW53SDBlNmFLSnRSUXcxdFpadzFlTytabTVPZ2ZGemJCUEV4WlF4cVwvMGNKN014SUM5bGhZMWZLK3NoY3ZRPT0iLCJtYWMiOiI5MjdjM2ZhN2FkMmEwNWJlMGE3MzMzMjg3OWViYzA5OWQ5YWRhMzQ3NDkxY2E4YzNjMTkyNzIxODUyMzM5NTk4In0%3D; user\_auth=eyJpdiI6InY5aEFMbUs5KzBkTk1pUjFLaGw1dkE9PSIsInZhbHVlIjoiVWU0YlFjR1FGYmZid3JxRXFOKzllVkdEdUtOMzFxOUFnZmJWbVY1TmE3M1wvVEJKOTFsektyQTdrRnZUUU52K3hMblBOZExnZ3MwRUxPazF5QjdINmN2UDhuUVMrakdYeTVYXC9POElWS3NnTmVHSEF6N2pSMnBsaEVQYkZHV2RMbiIsIm1hYyI6IjhhNTZiZDkxMzVjM2EwODgxNzE0YTU0MDIwNjQxNTE0NDFlN2Q4NGVmNDQzODQzYmQ3NDk4NTY5ZDYyZmQ4ZmYifQ%3D%3D; admin\_auth=eyJpdiI6IlA1TDZHck15ekdsSytxbUlCM0N2WHc9PSIsInZhbHVlIjoiQ1BPSUU1Yk40RSt2OVdKVnQyQUNKZnRtU2crdUliS09BRENnQ3RzM0RybVNRWkV0bEZHTVwvbFAyOFA0aGt3anlFTGtINTJkdVNuXC9vQ1BYdUJyZTk5SVFjRTY5a2dua0djdFB5Sm5NeGVRWHhhd3ZxUXBlcHNGc3dXM3BhZ25rRiIsIm1hYyI6IjY3YTM2ZDc0NjdkZDlmNjk0MzYzZjE5YTI4MDQxNmVmM2Y4ZjZlMWI0N2Y3Y2U0NGZlZmFjYzNhZDM4NjQ1MzUifQ%3D%3D" <http://10.10.10.16/backend/cms/media/dr.php5>
