- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
PHPcom_event_sink心得分析
参考文档:/blogs/...php-0-day-394//en-us/library/bb159840.aspx前言: 长期潜水,最近发现似乎没有什么漏洞暴出来,我等菜鸟只能到处瞎转悠,偶尔发现这个漏洞的外文博客。此漏洞的成因和实现过程都比较简单,便拿来分析把玩一下,得出此文希望能与吾等一样水平的菜鸟共勉一下。分析过程: 原文博客里面讲了很多关于PHP的漏洞类型和历史的一些漏洞的影响,以及PHP和WEB服务器等等的交互问题,有兴趣的可以去我给你的原文链接里面去看看,这里我们重点关注漏洞的部分。 首先我们来看一段PHP的代码:
代码:
?php
class IEEventSinker {
var $terminated = false;
function ProgressChange($progress, $progressmax) {
echo Download progress: $progress / $progressmax\n;
}
function DocumentComplete($dom, $url) {
echo Document $url complete\n;
}
function OnQuit() {
echo Quit!\n;
$this-terminated = true;
}
}
$ie = new COM(InternetExplorer.Application);
// note that you dont need the for PHP 5!
$sink = new IEEventSinker();
com_event_sink($ie, $sink, DWebBrowserEvents2);
$ie-Visible = true;
$ie-Navigate();
while(!$sink-terminated) {
com_message_pump(4000);
}
$ie = null;
?
上面的代码,我们可以通过php目录中的php.exe 来进行解析,得出来的结果是打开一个google的页面,上面的代码主要意思 是,创建了一个 IEEventSinker的对象,下面用new 创建了一个IE的com接口,最后使用com_event_sink这个函数进行一些 操作,为了搞清楚这些操作的意义,这里我贴出了com_event_sink在PHP官网上面的解释:
代码:
说明
bool com_event_sink( variant $comobject , object $sinkobject [, mixed $sinkinterface ] )
Instructs COM to sink events generated by comobject into the PHP object sinkobject.
Be careful how you use this feature; if you are doing something similar to the example below, then it doesnt really make sense to run it in a web server context.
参数
comobject
sinkobject
sinkobject should be an instance of a class with methods named after those of the desired dispinterface; you may use com_print_typeinfo() to help generate a template class for this purpose.
sinkinterface
PHP will attempt to use the default dispinterface type specified by the typelibrary associated with comobject, but you may override this choice by setting sinkinterface to the name of the dispinterface that you want to use.
由上面的文字可以大概知道此函数用于连接COM对象的某个接口的,本菜英语很烂,大概理解就是将某个COM对象中的接口与PHP中创建的 对象进行关联,这样的话PHP中的代码就可以接管此接口中响应的一些时间消息或者,定义一
您可能关注的文档
- Nearalgebra和Banach代数上的特征值和不动点定理.pdf
- NCR_统一平台报错信息中英文对照表.doc
- NearOptimal Search in Continuous Domains.pdf
- Negative Cycle Detection in Dynamic Graphs.pdf
- NEB公司提供的保护碱基序列表.doc
- NestedLogit模型在轨道交通衔接方式选择中的应用.pdf
- Netfilter+NAT技术在计算机实验室中的应用.pdf
- NERC与华东电网AGC评价标准的比较.pdf
- NetFlow及其在宽带计费中的应用.pdf
- NETBIOS及其作用.doc
- PHP_NKHm泥浆水敏性地层中的应用.pdf
- PHP与MySQL结合的数据库编程.ppt
- php环境的搭建.doc
- PHP调试时主页正常显示,主页上的链接(跳转页面)都连接失败解决方法.pdf
- Physicochemical properties of lactoferrin stabilized oilinwater emulsions Effects of pH, salt and.doc
- Pickering乳状液的研究进展.pdf
- Picking Battles The Impact of Trust Assumptions on the Elaboration of Security Requirements.pdf
- PILPython图像处理模块.ppt
- Piergiovanni. Looking for a Definition of Dynamic Distributed Systems.pdf
- PICMG规范培训目录.doc
文档评论(0)