Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // require './vendor/autoload.php';
- $ch = curl_init();
- $tmp = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'cookie.txt';
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- //curl_setopt($ch, CURLOPT_VERBOSE, true);
- curl_setopt($ch, CURLOPT_COOKIEFILE, $tmp);
- curl_setopt($ch, CURLOPT_COOKIEJAR, $tmp);
- function post(string $url, array $fields)
- {
- global $ch;
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
- $exec = curl_exec($ch);
- return $exec;
- }
- function get(string $url, $fiels = false)
- {
- global $ch;
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
- curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
- $exec = curl_exec($ch);
- return $exec;
- }
- for ($x = 1984; $x < 2000; $x++) {
- $name = 'Cvar' . $x;
- echo $name . PHP_EOL;
- post('http://rplonegang.000webhostapp.com/ctf/index.php', [
- 'name' => $name
- ]);
- post('http://rplonegang.000webhostapp.com/ctf/index.php?id=1', [
- 'flag' => 'REDUCE{C4ptur3_th3_fl46}'
- ]);
- post('http://rplonegang.000webhostapp.com/ctf/index.php?id=6', [
- 'flag' => 'REDUCE{5ebu4h_z1p}'
- ]);
- post('http://rplonegang.000webhostapp.com/ctf/index.php?id=9', [
- 'flag' => 'REDUCE{1n1_fl46_t3rs3mbunyI}'
- ]);
- post('http://rplonegang.000webhostapp.com/ctf/index.php?id=3', [
- 'flag' => 'REDUCE{tH3_c0mm3nT}'
- ]);
- post('http://rplonegang.000webhostapp.com/ctf/index.php?id=4', [
- 'flag' => 'REDUCE{3xt3ns10n_is_succ}'
- ]);
- get('http://rplonegang.000webhostapp.com/ctf/index.php?logout');
- }
- curl_close($ch);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement