各种网站挂马的代码和原理


我在淘宝上的二手书店,有空去看看!http://shop35357269.taobao.com/

<script type="text/JavaScript"> alimama_pid="mm_10096109_566393_892186"; alimama_titlecolor="0000FF"; alimama_descolor ="000000"; alimama_bgcolor="FFFFFF"; alimama_bordercolor="E6E6E6"; alimama_linkcolor="008000"; alimama_bottomcolor="FFFFFF"; alimama_anglesize="0"; alimama_bgpic="0"; alimama_icon="0"; alimama_sizecode="11"; alimama_width=760; alimama_height=90; alimama_type=2; </script><script src="http://a.alimama.cn/inf.js" type="text/javascript"></script>

<script type="text/JavaScript"> alimama_pid="mm_10096109_566393_1843170"; alimama_titlecolor="0000FF"; alimama_descolor ="000000"; alimama_bgcolor="FFFFFF"; alimama_bordercolor="E6E6E6"; alimama_linkcolor="008000"; alimama_bottomcolor="FFFFFF"; alimama_anglesize="0"; alimama_bgpic="0"; alimama_icon="0"; alimama_sizecode="12"; alimama_width=468; alimama_height=60; alimama_type=2; </script><script src="http://a.alimama.cn/inf.js" type="text/javascript"></script>

 我在在部署ASP.net应用程序的时候,在IIS中都是创建在默认的应用池当中.我们能否在部署的时候创建自己的应用池呢?
本文就带你一起创建自己的应用池!
  1  using  System;
  2  using  System.IO;
  3  using  System.DirectoryServices;
  4  using  System.Reflection;
  5  using  System.Runtime.InteropServices;
  6  using  System.Collections;
  7 
  8  namespace  System_DirectoryServices_DirectoryEntry_ConfigIIS
  9  {
 10     class  Program
 11    {
 12       static   void  Main( string [] args)
 13      {
 14 
 15 
 16 
 17  CreateAppPool( " IIS://Localhost/W3SVC/AppPools " " MyAppPool " );
 18 
 19 
 20 
 21  CreateVDir( " IIS://Localhost/W3SVC/1/Root " " MyVDir " " D://Inetpub//Wwwroot " );
 22 
 23 
 24 
 25  AssignVDirToAppPool( " IIS://Localhost/W3SVC/1/Root/MyVDir " " MyAppPool " );
 26 
 27 
 28 
 29  }
 30 
 31 
 32 
 33  static   void  CreateAppPool( string  metabasePath,  string  appPoolName)
 34  {
 35     //   metabasePath is of the form "IIS: // <servername>/W3SVC/AppPools"
 36     //     for example "IIS: // localhost/W3SVC/AppPools" 
 37     //   appPoolName is of the form "<name>", for example, "MyAppPool"
 38    Console.WriteLine( " /nCreating application pool named {0}/{1}: " , metabasePath, appPoolName);
 39 
 40     try
 41    {
 42       if  (metabasePath.EndsWith( " /W3SVC/AppPools " ))
 43      {
 44        DirectoryEntry newpool;
 45        DirectoryEntry apppools  =   new  DirectoryEntry(metabasePath);
 46        newpool  =  apppools.Children.Add(appPoolName,  " IIsApplicationPool " );
 47        newpool.CommitChanges();
 48        Console.WriteLine( "  Done. " );
 49      }
 50       else
 51        Console.WriteLine( "  Failed in CreateAppPool; application pools can only be created in the */W3SVC/AppPools node. " );
 52    }
 53     catch  (Exception ex)
 54    {
 55      Console.WriteLine( " Failed in CreateAppPool with the following exception: /n{0} " , ex.Message);
 56    }
 57  }
 58 
 59 
 60 
 61  static   void  CreateVDir( string  metabasePath,  string  vDirName,  string  physicalPath)
 62  {
 63     //   metabasePath is of the form "IIS: // <servername>/<service>/<siteID>/Root[/<vdir>]"
 64     //     for example "IIS: // localhost/W3SVC/1/Root" 
 65     //   vDirName is of the form "<name>", for example, "MyNewVDir"
 66     //   physicalPath is of the form "<drive>:/<path>", for example, "C:/Inetpub/Wwwroot"
 67    Console.WriteLine( " /nCreating virtual directory {0}/{1}, mapping the Root application to {2}: " ,
 68        metabasePath, vDirName, physicalPath);
 69 
 70     try
 71    {
 72      DirectoryEntry site  =   new  DirectoryEntry(metabasePath);
 73       string  className  =  site.SchemaClassName.ToString();
 74       if  ((className.EndsWith( " server " ))  ||  (className.EndsWith( " VirtualDir " )))
 75      {
 76        DirectoryEntries vdirs  =  site.Children;
 77        DirectoryEntry newVDir  =  vdirs.Add(vDirName, (className.Replace( " Service " " VirtualDir " )));
 78        newVDir.Properties[ " Path " ][ 0 =  physicalPath;
 79        newVDir.Properties[ " AccessScript " ][ 0 =   true ;
 80         //  These properties are necessary for an application to be created.
 81        newVDir.Properties[ " AppFriendlyName " ][ 0 =  vDirName;
 82        newVDir.Properties[ " AppIsolated " ][ 0 =   " 1 " ;
 83        newVDir.Properties[ " AppRoot " ][ 0 =   " /LM "   +  metabasePath.Substring(metabasePath.IndexOf( " / " , ( " IIS:// " .Length)));
 84 
 85        newVDir.CommitChanges();
 86 
 87        Console.WriteLine( "  Done. " );
 88      }
 89       else
 90        Console.WriteLine( "  Failed. A virtual directory can only be created in a site or virtual directory node. " );
 91    }
 92     catch  (Exception ex)
 93    {
 94      Console.WriteLine( " Failed in CreateVDir with the following exception: /n{0} " , ex.Message);
 95    }
 96  }
 97 
 98 
 99 
100  static   void  AssignVDirToAppPool( string  metabasePath,  string  appPoolName)
101  {
102     //   metabasePath is of the form "IIS: // <servername>/W3SVC/<siteID>/Root[/<vDir>]"
103     //     for example "IIS: // localhost/W3SVC/1/Root/MyVDir" 
104     //   appPoolName is of the form "<name>", for example, "MyAppPool"
105    Console.WriteLine( " /nAssigning application {0} to the application pool named {1}: " , metabasePath, appPoolName);
106 
107     try
108    {
109      DirectoryEntry vDir  =   new  DirectoryEntry(metabasePath);
110       string  className  =  vDir.SchemaClassName.ToString();
111       if  (className.EndsWith( " VirtualDir " ))
112      {
113         object [] param  =  {  0 , appPoolName,  true  };
114        vDir.Invoke( " AppCreate3 " , param);
115        vDir.Properties[ " AppIsolated " ][ 0 =   " 2 " ;
116        Console.WriteLine( "  Done. " );
117      }
118       else
119        Console.WriteLine( "  Failed in AssignVDirToAppPool; only virtual directories can be assigned to application pools " );
120    }
121     catch  (Exception ex)
122    {
123      Console.WriteLine( " Failed in AssignVDirToAppPool with the following exception: /n{0} " , ex.Message);
124    }
125  }
126 
127 
128 
129    }
130  }
131    
132   
133 
 
 <script type="text/javascript"> google_ad_client = "pub-6430022987645146"; google_ad_slot = "8687678907"; google_ad_width = 120; google_ad_height = 600; </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
 
<script type="text/JavaScript"> alimama_pid="mm_10096109_566393_1916522"; alimama_titlecolor="0000FF"; alimama_descolor ="000000"; alimama_bgcolor="FFFFFF"; alimama_bordercolor="E6E6E6"; alimama_linkcolor="008000"; alimama_bottomcolor="FFFFFF"; alimama_anglesize="0"; alimama_bgpic="0"; alimama_icon="0"; alimama_sizecode="21"; alimama_width=120; alimama_height=600; alimama_type=2; </script><script src="http://a.alimama.cn/inf.js" type="text/javascript"></script>

<script type="text/JavaScript"> var alimama_pid="mm_10096109_566393_892989"; var alimama_titlecolor="0000FF"; var alimama_descolor ="000000"; var alimama_bgcolor="FFFFFF"; var alimama_bordercolor="E6E6E6"; var alimama_linkcolor="008000"; var alimama_bottomcolor="FFFFFF"; var alimama_anglesize="0"; var alimama_bgpic="0"; var alimama_icon="0"; var alimama_sizecode="11"; var alimama_width=760; var alimama_height=90; var alimama_type=2; </script><script src="http://a.alimama.cn/inf.js" type="text/javascript"></script>
<script language="javascript" type="text/JavaScript"> var alimama_pid= "mm_10096109_0_0"; var alimama_key= ""; var alimama_cid= "50000437"; var alimama_col= "3"; var alimama_row = "2"; var alimama_type = "A"; var alimama_titlecolor= "0000FF"; var alimama_bgcolor="99C9FF"; var alimama_bordercolor="800080"; var alimama_descolor="000000"; </script><script language="javascript" src="http://p.alimama.com/ainf.js"></script>

博客广告新思路!在你的博客里放置广告!我挂广告了效果如下面所示!免费注册拥有财富!
注册地址
http://WWW.BLOGGAO.COM(点我就行)

align="center" marginwidth="0" marginheight="0" src="http://www.bloggao.com/script.aspx?userid=17994&AdType=0&AdstyleID=19075&Direction=1" frameborder="0" width="508" scrolling="no" height="168">
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值