⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmshare.frm

📁 全面网络扫描器VB源代码 很实用
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmshare 
   BackColor       =   &H00000000&
   BorderStyle     =   1  'Fixed Single
   Caption         =   " list shares on a remote computer"
   ClientHeight    =   4275
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   6525
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   4275
   ScaleWidth      =   6525
   StartUpPosition =   3  '窗口缺省
   Begin VB.ListBox List1 
      Height          =   3300
      Left            =   3720
      TabIndex        =   7
      Top             =   600
      Width           =   2655
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00FFFFFF&
      Caption         =   "List Shares"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   9.75
         Charset         =   178
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   4080
      Style           =   1  'Graphical
      TabIndex        =   6
      Top             =   120
      Width           =   1455
   End
   Begin VB.TextBox Text3 
      Height          =   285
      IMEMode         =   3  'DISABLE
      Left            =   1080
      PasswordChar    =   "*"
      TabIndex        =   5
      Top             =   1680
      Width           =   2415
   End
   Begin VB.TextBox Text2 
      Height          =   285
      Left            =   1080
      TabIndex        =   3
      Top             =   1200
      Width           =   2415
   End
   Begin VB.TextBox Text1 
      Height          =   285
      Left            =   120
      TabIndex        =   1
      Top             =   600
      Width           =   3375
   End
   Begin VB.Label Label3 
      BackColor       =   &H00FFFFFF&
      Caption         =   "Password"
      Height          =   255
      Left            =   120
      TabIndex        =   4
      Top             =   1680
      Width           =   855
   End
   Begin VB.Label Label2 
      BackColor       =   &H00FFFFFF&
      Caption         =   "User Name"
      Height          =   255
      Left            =   120
      TabIndex        =   2
      Top             =   1200
      Width           =   855
   End
   Begin VB.Label Label1 
      BackColor       =   &H00FFFFFF&
      Caption         =   "Computer Name"
      Height          =   255
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   1335
   End
End
Attribute VB_Name = "frmshare"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' by nima bagheri form  THECRACKERS_GROUP@yahoo.ca
'TEL 098-0151-2210510



Private Sub Command1_Click()
 Dim strComputer, strUser, strPassword

If Text1.Text <> "" And Text2.Text <> "" And Text3.Text <> "" Then
   strComputer = Text1.Text
   strUser = Text2.Text
   strPassword = Text3.Text

   ListShares strComputer, strUser, strPassword

Else
 MsgBox "Please Enter Value", vbInformation
End If

End Sub

Sub ListShares(strComputer, strUser, strPassword)
    Dim strObject
    Dim objLocator, objWMIService, objShare
    Dim colShares
On Error Resume Next
    Set objLocator = CreateObject("WbemScripting.SWbemLocator")
    Set objWMIService = objLocator.ConnectServer(strComputer, "root/cimv2", strUser, strPassword)
    objWMIService.Security_.ImpersonationLevel = 3
    Set colShares = objWMIService.ExecQuery("Select * from Win32_Share")
    For Each objShare In colShares
      List1.AddItem objShare.Name & " [" & objShare.path & "]"
    Next

End Sub


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -