遠程或本地獲取系統信息的腳本RGIS.vbs
2024-07-09 22:40:51
供稿:網友
*******************************************************************************
RGIS v1.03
Remote Get Infomation Script, by zzzEVAzzz
Welcome to visite www.isgrey.com & www.h4h4.com
Usage:
cscript rgis.vbs [/r targetIP username password] [/o filename] [/v] [/a] [/h]
/r: remote get info.
/o: output to file.
/v: get more infomation.
/a: get applications infomation.
/h: show usage.
*******************************************************************************
描述:遠程或本地獲取系統信息的腳本。
特點:不依賴于目標的ipc$開放與否。
原理:直接訪問目標的windows管理規范服務(WMI)。
支持平臺:win2kpro win2kserver winxp
使用方法:
在命令行方式下使用windows自帶的腳本宿主程序cscript.exe調用腳本,例如:
c:/>cscript rgis.vbs [/r 目標IP 用戶名 密碼] [/o 輸出文件] [/v] [/a] [/h]
參數都是可選的。
/r 用于遠程獲得信息??彰艽a用""表示。
/o 加輸出文件路徑和名字,如文件不存在則自動新建,如存在則添加信息在末尾。
/v 獲取詳細信息。
/a 獲取應用程序信息。
/h 顯示Usage。
不加參數則顯示本地信息。
腳本訪問的目標的135端口,如果目標135端口未開放,或者WMI服務關閉,那么腳本無法使用。
另外,網絡不是很好時,可能會等待較多的時間。
有問題和建議請到 灰色軌跡論壇 或 H4網絡安全論壇 發短消息給我。我的ID是zzzevazzz
最后更新:2002-12-7
更新記錄:
1.03 增加獲得應用程序信息的功能
1.02 增加獲得HotFix和端口過濾簡單信息的功能
1.01 增加輸出到文件的功能
1.00 最初版本
復制代碼 代碼如下:
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
with wscript.arguments
if .count>0 then
ipaddress="."
outfile=""
username=""
password=""
viewtype=0
program=0
for arg=0 to .count-1
select case left(lcase(.item(arg)),2)
case "/h","/?","/h","/?"
usage()
wscript.quit
case "/r","/r"
if arg+3<=.count-1 then
ipaddress=.item(arg+1)
username=.item(arg+2)
password=.item(arg+3)