-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
892bc58
commit 61037cc
Showing
2 changed files
with
19 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import win32wnet | ||
import socket | ||
|
||
h=win32wnet.WNetOpenEnum(5,1,0,None) | ||
#5=RESOURCE_CONTEXT | ||
#1=RESOURCETYPE_DISK | ||
lst=win32wnet.WNetEnumResource(h,64) #65以上の指定不可 | ||
win32wnet.WNetCloseEnum(h); | ||
lst.pop(0) | ||
|
||
for l in lst: | ||
print("------------------") | ||
print(l.lpLocalName) | ||
print(l.lpRemoteName) | ||
for address in socket.getaddrinfo(l.lpRemoteName[2:],None): | ||
print(address[4][0]) | ||
|
||
#動かない時は下記を参考にサービスを起動するとよい | ||
#https://itojisan.xyz/trouble/12595/#3 |
This file was deleted.
Oops, something went wrong.