主頁(yè) > 知識(shí)庫(kù) > 獲取遠(yuǎn)程機(jī)器共享目錄的物理路徑的代碼

獲取遠(yuǎn)程機(jī)器共享目錄的物理路徑的代碼

熱門標(biāo)簽:前鋒辦理400電話申請(qǐng) 辦理膠州400電話財(cái)稅 百度地圖標(biāo)注怎么卸載 海外美發(fā)店地圖標(biāo)注 外呼營(yíng)銷下單系統(tǒng) 新密防封卡外呼系統(tǒng)違法嗎 打電話的外呼系統(tǒng)貴不貴 加盟電銷機(jī)器人好的品牌 陜西高頻外呼回?fù)芟到y(tǒng)哪家好

第一:依靠135端口,用wmi。像下邊的腳本是得到共享目錄ttt的物理目錄。

復(fù)制代碼 代碼如下:

strPath ="\\192.168.1.55\ttt"
strPath = Replace(strPath, "\\", "")
arrPath = Split(strPath, "\")
strComputer = arrPath(0)
strShare = arrPath(1)
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIService =objSWbemLocator.ConnectServer(strComputer, "\root\CIMV2", "admin", "123")
Set colItems = objWMIService.ExecQuery _
("Select * From Win32_Share Where Name = '" strShare "'")
For Each objItem in colItems
Wscript.Echo objItem.Path
Next
/*********************************微軟的腳本有問題,只能得到本機(jī)***********************************************/
strPath = "\\atl-fs-01\public"
strPath = Replace(strPath, "\\", "")
arrPath = Split(strPath, "\")
strComputer = arrPath(0)
strShare = arrPath(1)
Set objWMIService = GetObject("winmgmts:\\" strComputer "\root\cimv2")
Set colItems = objWMIService.ExecQuery _
("Select * From Win32_Share Where Name = '" strShare "'")
For Each objItem in colItems
Wscript.Echo objItem.Path
Next
/*********************************微軟的腳本有問題,只能得到本機(jī)***********************************************/

第二、依靠445端口,靠smb。bt5下的 nmap
復(fù)制代碼 代碼如下:

root@bt:~# nmap --script smb-enum-shares --script-args=smbuser=administrator,smbpass=toor 192.168.1.108 -p445

Starting Nmap 5.59BETA1 ( http://nmap.org ) at 2012-02-14 15:29 CST
Nmap scan report for 192.168.1.108
Host is up (0.00013s latency).
PORT STATE SERVICE
445/tcp open microsoft-ds
MAC Address: 00:0C:29:B3:F6:79 (VMware)
Host script results:
| smb-enum-shares:
| ADMIN$
| Type: STYPE_DISKTREE_HIDDEN
| Comment: Remote Admin
| Users: 0, Max: unlimited>
| Path: C:\WINDOWS
| Anonymous access: none>
| Current user ('administrator') access: READ/WRITE
| C$
| Type: STYPE_DISKTREE_HIDDEN
| Comment: Default share
| Users: 0, Max: unlimited>
| Path: C:\
| Anonymous access: none>
| Current user ('administrator') access: READ/WRITE
| IPC$
| Type: STYPE_IPC_HIDDEN
| Comment: Remote IPC
| Users: 1, Max: unlimited>
| Path:
| Anonymous access: READ not a file share>
| Current user ('administrator') access: READ not a file share>
| NETLOGON
| Type: STYPE_DISKTREE
| Comment: Logon server share
| Users: 0, Max: unlimited>
| Path: C:\WINDOWS\SYSVOL\sysvol\haiyangtop.com\SCRIPTS
| Anonymous access: none>
| Current user ('administrator') access: READ/WRITE
| SYSVOL
| Type: STYPE_DISKTREE
| Comment: Logon server share
| Users: 0, Max: unlimited>
| Path: C:\WINDOWS\SYSVOL\sysvol
| Anonymous access: none>
| Current user ('administrator') access: READ/WRITE
| ttt
| Type: STYPE_DISKTREE
| Comment:
| Users: 0, Max: unlimited>
| Path: c:\sharettt
| Anonymous access: none>
|_ Current user ('administrator') access: READ
Nmap done: 1 IP address (1 host up) scanned in 0.56 seconds
root@bt:~#

標(biāo)簽:咸陽(yáng) 阜陽(yáng) 四平 武威 伊春 牡丹江 河南 梅州

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《獲取遠(yuǎn)程機(jī)器共享目錄的物理路徑的代碼》,本文關(guān)鍵詞  獲取,遠(yuǎn)程,機(jī)器,共享,目錄,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《獲取遠(yuǎn)程機(jī)器共享目錄的物理路徑的代碼》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于獲取遠(yuǎn)程機(jī)器共享目錄的物理路徑的代碼的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章