1 2 3 4 5
|
<?php $api = addslashes($_GET['api']); $file = file_get_contents('./option.php'); $file = preg_replace("/\\\$API = '.*';/", "\$API = '{$api}';", $file); file_put_contents('./option.php', $file);
|
1 2 3 4 5
|
<?php $api = addslashes($_GET['api']); $file = file_get_contents('./option.php'); $file = preg_replace("/\\\$API = '.*';/s", "\$API = '{$api}';", $file); file_put_contents('./option.php', $file);
|
1 2 3 4 5 6
|
<?php $api = addslashes($_GET['api']); $file = file_get_contents('./option.php'); $file = preg_replace("/\\\$API = '.*?';/", "\$API = '{$api}';", $file); file_put_contents('./option.php', $file); ?>
|
1 2 3 4 5
|
<?php $api = addslashes($_GET['api']); $file = file_get_contents('./option.php'); $file = preg_replace("/\\\$API = '.*?';/s", "\$API = '{$api}';", $file); file_put_contents('./option.php', $file);
|
1 2 3 4 5
|
<?php $api = addslashes($_GET['api']); $file = file_get_contents('./option.php'); $file = preg_replace("/define\('API', '.*'\);/", "define('API', '{$api}');", $file); file_put_contents('./option.php', $file);
|
1 2 3 4 5
|
<?php $api = addslashes($_GET['api']); $file = file_get_contents('./option.php'); $file = preg_replace("/define\('API', '.*'\);/s", "define('API', '{$api}');", $file); file_put_contents('./option.php', $file);
|
1 2 3 4 5
|
<?php $api = addslashes($_GET['api']); $file = file_get_contents('./option.php'); $file = preg_replace("/define\('API', '.*?'\);/s", "define('API', '{$api}');", $file); file_put_contents('./option.php', $file);
|
1 2 3 4 5
|
<?php $api = addslashes($_GET['api']); $file = file_get_contents('./option.php'); $file = preg_replace("/define\('API', '.*?'\);/s", "define('API', '{$api}');", $file); file_put_contents('./option.php', $file);
|
1 2 3 4 5 6 7 8
|
<?php
if (preg_match('/^want$/', $_GET['exp']) && $_GET['exp'] !== 'want') { echo "test";
}
|
https://www.leavesongs.com/PENETRATION/thinking-about-config-file-arbitrary-write.html