scripts7com

Bypass read files [R-6] 2016 - scripts7.com

Jan 19th, 2016
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.79 KB | None | 0 0
  1.  <?php
  2. #// Bypass read files [R-6] 2016
  3. #// scriptr7.com
  4. #// twitter.com/scriptr7com
  5. #// r-6
  6. #// Read All of files in path Ex: !!! /root/ or /home/user/ or /
  7. #// Can't read files /etc/passwd !!
  8. #// BUT !!! Read Files in path
  9. #// EX:
  10. #// For the Best just do : /home/ or /home/user/public_html/ to see all files and Dirs  
  11.  
  12. #//// Change this one to whatever you want
  13. print_r(dir_list('/etc/'));
  14.  
  15. function dir_list($d7){if ($d7[strlen($d7)-1] != '/') $d7 .= '/';if (!is_dir($d7)) return array();$d7_handle  = opendir($d7);$d7_o7 = array();while ($o7 = readdir($d7_handle)):if (!in_array($o7, array('.','<br','..')))$ff7 = $d7;$fo7 = array( '<hr><span style="color:#0000FF;">',$ff7.''.$o7,'</span>',':' => filesize($ff7),':' => '<span style="color:red;">',permission($ff7),'</span>',':' => filetype($ff7));$d7_o7[] = $fo7;endwhile;echo '<span style="color:red;"> <h3> what u see in blue its the filename </h3></span>';return $d7_o7;}
  16. function permission($ff7){$p7 = fileperms($ff7);if     (($p7 & 0xC000) == 0xC000):$i7 = 's'; elseif (($p7 & 0xA000) == 0xA000):$i7 = 'l';  elseif (($p7 & 0x8000) == 0x8000):$i7 = '-';  elseif (($p7 & 0x6000) == 0x6000):$i7 = 'b';  elseif (($p7 & 0x4000) == 0x4000):$i7 = 'd';  elseif (($p7 & 0x2000) == 0x2000):$i7 = 'c';  elseif (($p7 & 0x1000) == 0x1000):$i7 = 'p';  else:$i7 = 'u';endif;$i7 .= (($p7 & 0x0100)?'r' : '-');$i7 .= (($p7 & 0x0080) ? 'w' : '-');$i7 .= (($p7 & 0x0040) ? (($p7 & 0x0800) ? 's' : 'x' ) : (($p7 & 0x0800) ? 'S' : '-'));$i7 .= (($p7 & 0x0020) ? 'r' : '-');$i7 .= (($p7 & 0x0010) ? 'w' : '-');$i7 .= (($p7 & 0x0008) ? (($p7 & 0x0400) ? 's' : 'x' ) : (($p7 & 0x0400) ? 'S' : '-'));$i7 .= (($p7 & 0x0004) ? 'r' : '-');$i7 .= (($p7 & 0x0002) ? 'w' : '-');$i7 .= (($p7 & 0x0001) ? (($p7 & 0x0200) ? 't' : 'x' ) : (($p7 & 0x0200) ? 'T' : '-'));return $i7;}
  17.  
  18. ?>
Add Comment
Please, Sign In to add comment