黑客必须要知道的几个vbs文件代码
作者 佚名
来源 ASP编程
浏览
发布时间 2013-07-09
escription wnl"DHCPEnabled:"&.dhcpenabled wnl"DHCPServer:"&.dhcpserver wnl"DNSHostName:"&.dnshostname wnl"DNSServerSearchOrder:"&wfl(.dnsserversearchorder) wnl"WINSPrimaryServer:"&.winsprimaryserver wnl"IPAddress:"&wfl(.ipaddress) wnl"MACAddress:"&.macaddress wnl"DefaultIPGateway:"&wfl(.defaultipgateway) wnl"IPSubnet:"&wfl(.ipsubnet) wnl"IPFilterSecurityEnabled:"&.ipfiltersecurityenabled wnl"IPSecPermitIPProtocols:"&wfl(.ipsecpermitipprotocols) wnl"IPSecPermitTCPPorts:"&wfl(.ipsecpermittcpports) wnl"IPSecPermitUDPPorts:"&wfl(.ipsecpermitudpports) endif endwith next wnlvbcrlf&"HotFixesInfo:" foreachobj10incol10 wnl"HotFixID:"&obj10.hotfixid wnl"FixComments:"&obj10.fixcomments wnl"InstallDate:"&obj10.installdate wnl"ServicePackInEffect:"&obj10.servicepackineffect next wnlvbcrlf&"Applications:" setobjswb1=objlocator.connectserver(ipaddress,"root/default",username,password) setobj11=objswb1.get("stdregprov") HKLM=&h80000002 keypath="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" obj11.enumkeyHKLM,keypath,keyarray redimstr(ubound(keyarray)+1) j=0 fori=0toubound(keyarray) obj11.getstringvalueHKLM,keypath+keyarray(i),"displayname",strvalue ifstrvalue<>""then str(j)=strvalue j=j+1 endif next ifj>1then fori=0toj-1 fork=0toj-i-1 ifstrcomp(str(k),str(k+1),1)=1then strtemp=str(k+1) str(k+1)=str(k) str(k)=strtemp endif next next endif fori=0toj-1 wnl""&str(i) next wscript.echo""&vbcrlf wscript.echo"TheInfomationfrom&ipaddress&hadbeenlistedSuccessfully!" callmain() endfunction subwnl(msg) wscript.echomsg ifisobject(of)then onerrorresumenext of.writelinemsg showerror() onerrorgoto0 endif endsub functionwfl(byrefobj) str="" fori=0toubound(obj) str=str&obj(i)&"" next wfl=str endfunction functionwsp(msg,num) ifmsg<>""then msg=left(msg,num-1) wsp=msg&space(num-len(msg)) else wsp=space(num) endif endfunction functiontimeformat(msg) timeformat=left(msg,4)&"/"&mid(msg,5,2)&"/"&mid(msg,7,2)&""&mid(msg,9,2)&":"&mid(msg,11,2)&":"&mid(msg,13,2) endfunction functionsizeformat(msg) ifmsg<>""then size=msg/1048576 ifsize>1024then sizeformat=round(size/1024,2)&"GB" else sizeformat=round(size,1)&"MB" endif endif endfunction functionobjget(msg) setcol=objswbemservices.instancesof(msg) foreachobjxincol setobj=objx next setobjget=obj endfunction ''****************************************** functioncommand() wscript.echo"PleseEnterTheCommand:" callrun() endfunction functionrun() strcmdline=WScript.StdIn.Readline() ifstrcmdline="exit"orstrcmdline="quit"orstrcmdline="0"then callmain() endif outstreem.write"Runningthecommand...." setobjinstance=objswbemservices.get("win32_process") setobjmethod=objinstance.methods_("create") setobjinparam=objmethod.inparameters.spawninstance_() objinparam.commandline=strcmdline setobjoutparam=objinstance.execmethod_("create",objinparam) ifobjoutparam.returnvalue<>0then wscript.echo"Error!" callcommand() else wscript.echo"OK!" endif wscript.echo"TheProcessIDis"&objoutparam.processid wscript.echo"Runingcommand:"&strc |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
关于黑客必须要知道的几个vbs文件代码的所有评论