In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces how to get the physical path of the remote machine shared directory in the server, which has a certain reference value. Interested friends can refer to it. I hope you will learn a lot after reading this article. Let's take the editor to know it.
First: rely on 135port, use wmi. Like the script below is the physical directory where you get the shared directory ttt.
The code is as follows:
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
/ * * there is something wrong with Microsoft's script, so you can only get the native machine * /
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
/ * * there is something wrong with Microsoft's script, so you can only get the native machine * /
Second, rely on port 445, rely on smb. Nmap under bt5
The code is as follows:
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:
| | Path: C:\ WINDOWS |
| Anonymous access:
| | Current user ('administrator') access: READ/WRITE |
| | C$ |
| | Type: STYPE_DISKTREE_HIDDEN |
| | Comment: Default share |
| Users: 0, Max:
| | Path: C:\ |
| Anonymous access:
| | Current user ('administrator') access: READ/WRITE |
| | IPC$ |
| | Type: STYPE_IPC_HIDDEN |
| | Comment: Remote IPC |
| Users: 1, Max:
| Path:
| | Anonymous access: READ |
| | Current user ('administrator') access: READ |
| | NETLOGON |
| | Type: STYPE_DISKTREE |
| | Comment: Logon server share |
| Users: 0, Max:
| | Path: C:\ WINDOWS\ SYSVOL\ sysvol\ haiyangtop.com\ SCRIPTS |
| Anonymous access:
| | Current user ('administrator') access: READ/WRITE |
| | SYSVOL |
| | Type: STYPE_DISKTREE |
| | Comment: Logon server share |
| Users: 0, Max:
| | Path: C:\ WINDOWS\ SYSVOL\ sysvol |
| Anonymous access:
| | Current user ('administrator') access: READ/WRITE |
| | ttt |
| | Type: STYPE_DISKTREE |
| Comment:
| Users: 0, Max:
| | Path: C:\ sharettt |
| Anonymous access:
| | _ Current user ('administrator') access: READ |
Nmap done: 1 IP address (1 host up) scanned in 0.56 seconds
Root@bt:~#
Thank you for reading this article carefully. I hope the article "how to get the physical path of the remote machine shared directory in the server" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.