I got a quize from my university in order to pass the exam. The question is
Here’s your personal URL: aHR0cHM6Ly9nZXQtY29kZS5waHA/dG9rZW49ZTk5M2I1YWQzYmVhNzc2MDNiZmIwYTg3NzAxMTBiZjY2YjFhZGU0MA==
- The above URL was encoded with a popular algorithm. Decode it!
- Make a regular HTTP POST to that URL and send the following as the “data” parameter: -a JSON-encoded associative array that has your email address as the ’email’ key
- Your personal code will sent back in the response
So I decoded it with base64,
Result:
https://get-code.php?token=e993b5ad3bea77603bfb0a8770110bf66b1ade40
And I am posting the data to the cur ulr as follow
$url = 'https://get-code.php?token=e993b5ad3bea77603bfb0a8770110bf66b1ade40';
$ch = curl_init($url);
$jsonData = array(
'email' => 'example@email.com'
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
extract($_POST);
And there is nothing in the result, server not responds anything