on error resume next
set outstreem=wscript.stdout
if (lcase(right(wscript.fullname,11))="wscript.exe") then
set objshell=wscript.createobject("wscript.shell")
objshell.run("cmd.exe /k cscript //nologo "&chr(34)&wscript.scriptfullname&chr(34))
wscript.quit
end if
if wscript.arguments.count<5 then
usage()
wscript.echo "not enough parameters."
wscript.quit
end if
ipaddress=wscript.arguments(0)
username=wscript.arguments(1)
password=wscript.arguments(2)
ntlm=wscript.arguments(3)
port=wscript.arguments(4)
if not isnumeric(ntlm) or ntlm<0 or ntlm>2 then
usage()
wscript.echo "the value of ntml is wrong."
wscript.quit
end if
if not isnumeric(port) then
usage()
wscript.echo "the value of port is wrong."
wscript.quit
end if
usage()
outstreem.write "conneting "&ipaddress&"...."
set objlocator=createobject("wbemscripting.swbemlocator")
set objswbemservices=objlocator.connectserver(ipaddress,"root/default",username,password)
showerror(err.number)
outstreem.write "setting ntlm="&ntlm&"...."
set objinstance=objswbemservices.get("stdregprov")
set objmethod=objinstance.methods_("setdwordvalue")
set objinparam=objmethod.inparameters.spawninstance_()
objinparam.hdefkey=&h80000002
objinparam.ssubkeyname="software/microsoft/telnetserver/1.0"
objinparam.svaluename="ntlm"
objinparam.uvalue=ntlm
set objoutparam=objinstance.execmethod_("setdwordvalue",objinparam)
showerror(objoutparam.returnvalue)
outstreem.write "setting port="&port&"...."
objinparam.svaluename="telnetport"
objinparam.uvalue=port
set objoutparam=objinstance.execmethod_("setdwordvalue",objinparam)
showerror(objoutparam.returnvalue)
outstreem.write "querying state of telnet server...."
set objswbemservices=objlocator.connectserver(ipaddress,"root/cimv2",username,password)
set colinstances=objswbemservices.execquery("select * from win32_service where name='tlntsvr'")
showerror(err.number)
for each objinstance in colinstances
if objinstance.startmode="disabled" then
outstreem.write "telnet server has been disabled. now changeing start mode to manual...."
set objmethod=objinstance.methods_("changestartmode")
set objinparam=objmethod.inparameters.spawninstance_()
objinparam.startmode="manual"
set objoutparam=objinstance.execmethod_("changestartmode",objinparam)
showerror(objoutparam.returnvalue)
end if
outstreem.write "changeing state...."
if objinstance.started=true then
intstatus=objinstance.stopservice()
showerror(intstatus)
wscript.echo "target telnet server has been stop successfully."
else
intstatus=objinstance.startservice()
showerror(intstatus)
wscript.echo "target telnet server has been start successfully!"
wscript.echo "now, you can try: telnet "&ipaddress&" "&port&", to get a shell."
end if
next
function showerror(errornumber)
if errornumber<>0 then
wscript.echo "error!"
wscript.quit
else
wscript.echo "ok!"
end if
end function
function usage()
wscript.echo string(79,"*")
wscript.echo "rtcs v1.10"
wscript.echo "remote telnet configure script, by zzzevazzz"
wscript.echo "welcome to visite
www.isgrey.com"
wscript.echo "usage:"
wscript.echo "cscript "&wscript.scriptfullname&" targetip username password ntlmauthor telnetport"
wscript.echo "it will auto change state of target telnet server."
wscript.echo string(79,"*")&vbcrlf
end function
想嘗試一下WFS
最近想在地圖上做一點小東西好好學習一下,能夠想到的就是在文字框裡輸入乙個乙個地名,提交之後地圖轉到相關位置。本來是想自己寫乙個servlet,結合geotools來進行feature的查詢,這個想法應該是可行的,但是還要開乙個tomcat,再與postgresql建立乙個連線,總是顯得羅唆。第二個想...
發現乙個控制項,介紹一下
今天在網上看見這個商業控制項,他的名字叫 actipro uistudio net control suite。主要做仿照vs和office介面的控制項,雖然這一類的控制項非常的多,但我感覺他是實現比較完整的乙個。搜尋了一下,發現國內基本上沒有人介紹這個,所以拿處理說說。他的第乙個控制項是 bar ...
突然想創業,寒自己一下。。
如題 10.1回家,一家人圍著桌子吃飯的時,我在客廳突然聽到了房間央視10套乙個關於發明創作的專題節目,於是立馬端著碗去看。獲得金獎的是 改進汽車剎車裝置 思路很簡單,說白了就是在司機剛踩閘的一剎那點亮汽車尾部紅燈,減少追尾事故,及連環追尾。利用控制晶元檢測出非正常減速來判別司機在剎車。現有的剎車系...