|
What do you mean by "all available information"? Are you talking about getting any DNS record for the IP address?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
all available information here is can be:
- Opened ports
- Domain
- NetBIOS name
- Groups
- Users
- Transport
- Share
I have a question for scan algorithm.
Scenarion:
1) User input IPs range (from IP -> to IP).
2) Application scan the range and return live host associated with IP in range
3) Gather information about IP scanned
Can you show me the way to do this? I mean how to scan and how to find the live host associated with its (with code for scaning process is very helpful)
|
|
|
|
|
THen you going to need to use WMI and the System.Management namespace to get at the information. There is no one function call you can make to do this. It's going to be alot of code to write because you looking to get all kinds of dissimilar information.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
When use WMI, the target computer must have WMI installed too rite? I want to check every possible getted information. You know what i mean. If there anything available to get, just get other wise do nothing. Therefore, i think should not use WMI.
How about your opinion?
|
|
|
|
|
In that case, most of the information you want is not available without writing a client inventory application that must be running on each client machines you want to scan. For that app, you'll have to write LOTS, and I mean A LOT, of code to get each little piece you want and put it together into a form that you can transfer to the server machine collecting this data.
WMI is the ONLY way to go for this if you want to keep the code down to a minimum... Granted, WMI is not available without installing software for it on WIndows NT SP3, Me, 98, 95 and below. Windows 2000 and above come with WMI standard.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank Dave for remine me, sound good!
I agree that we must use WMI to get information. Now i wonder how can i do that. I mean, i'm a newbie to do that. Can you show me the way to check for all available port and other information by using WMI (working on Win2K SP4) and programming in VB6
|
|
|
|
|
Actually, I'm working on such a solution now. The code is pretty ruff, but it gets the point acrossed. In order to see the SWbem* classes, you'll need to add a Reference to the Microsoft WMI Scripting Library.
Dim wmiLocator As New SWbemLocator
Dim wmiService As SWbemServices
Dim wmiObjectSet As SWbemObjectSet
Dim wmiObject As SWbemObject
Dim intIndex As Long
On Error Resume Next
Set wmiService = wmiLocator.ConnectServer(strNameOrAddress, "root\CIMV2")
If Err.Number = 0 Then
Set wmiObjectSet = wmiService.ExecQuery("SELECT * FROM Win32_ComputerSystem")
For Each wmiObject In wmiObjectSet
With objWMIDataBlock
.strMachineName = Trim(wmiObject.Properties_("Name"))
.strDomain = Trim(wmiObject.Properties_("Domain"))
.strManufacturer = Trim(wmiObject.Properties_("Manufacturer"))
.strModel = Trim(wmiObject.Properties_("Model"))
.intRAMSize = Round((wmiObject.Properties_("TotalPhysicalMemory") \ 1048576) / 32, 0) * 32
End With
Next
Set wmiObjectSet = wmiService.ExecQuery("SELECT * FROM Win32_OperatingSystem")
For Each wmiObject In wmiObjectSet
With objWMIDataBlock
.strOSName = Trim(wmiObject.Properties_("Caption"))
.strOSServicePack = Trim(wmiObject.Properties_("CSDVersion"))
.strOSVersion = Trim(wmiObject.Properties_("Version"))
End With
Next
Set wmiObjectSet = wmiService.ExecQuery("SELECT * FROM Win32_BIOS")
For Each wmiObject In wmiObjectSet
With objWMIDataBlock
.strBIOSManufacturer = Trim(wmiObject.Properties_("Version"))
.strBIOSVersion = Trim(wmiObject.Properties_("SMBIOSMajorVersion")) & _
"." & Trim(wmiObject.Properties_("SMBIOSMinorVersion"))
.strBIOSRevision = Trim(wmiObject.Properties_("SMBIOSBIOSVersion"))
.strSerialNumber = Trim(wmiObject.Properties_("SerialNumber"))
End With
Next
Set wmiObjectSet = wmiService.ExecQuery("SELECT * FROM Win32_NetworkAdapter WHERE AdapterType='Ethernet 802.3'")
ReDim objWMIDataBlock.arrNICs(wmiObjectSet.Count - 1)
objWMIDataBlock.NICCount = wmiObjectSet.Count
intIndex = 0
For Each wmiObject In wmiObjectSet
With objWMIDataBlock.arrNICs(intIndex)
.strMAC = MACCleanup(wmiObject.Properties_("MACAddress"))
.strDescription = Trim(wmiObject.Properties_("Caption"))
End With
intIndex = intIndex + 1
Next
Set wmiObjectSet = wmiService.ExecQuery("SELECT * FROM Win32_QuickFixEngineering")
intIndex = 0
For Each wmiObject In wmiObjectSet
If Left(wmiObject.Properties_("HotFixID"), 4) <> "File" Then
ReDim Preserve objWMIDataBlock.arrHotFixes(intIndex)
With objWMIDataBlock.arrHotFixes(intIndex)
.strHoxFixID = Trim(wmiObject.Properties_("HotFixID"))
.strDescription = Trim(wmiObject.Properties_("Description"))
End With
intIndex = intIndex + 1
End If
Next
objWMIDataBlock.HotFixCount = intIndex
Else
objWMIDataBlock.strMachineName = strNameOrAddress
status strNameOrAddress & " is alive but WMI Service could not be reached."
LogError strNameOrAddress, "", Err.Number, Err.Description
End If
On Error GoTo 0
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank for posting, nice post. I have an example to follow:
I want to display the following information of a remote computer. The following information displayed when i input IP/Hostname then click a function to enumarate the information. I don't know how it process and how can i do that? (i mean the solution, the code and many more, 'cause i'm starting to research it). The result is display while using SuperScan to scan it (for more information please refer to it, i just want to develop an application like that).
The Enumaration Type of display is:
- NetBIOS Name Table
- NULL Session
- MAC Address
- Workstation Type
- Users
- Groups
- Account Policies
- Shares
- Domains
- Remote Time of Day
- Logon Sessions
- Drives
- Trusted Domains
- Services
=====================================================================
NetBIOS information on 192.168.2.13
5 names in table
HIEULN 00 UNIQUE Workstation service name
HIEULN 20 UNIQUE Server services name
WORKGROUP 00 GROUP Workstation service name
WORKGROUP 1E GROUP Group name
HIEULN 03 UNIQUE Messenger name
MAC address 0: 00:0D:60:35:B2:11
Attempting a NULL session connection on 192.168.2.13
NULL session successful to \\192.168.2.13\IPC$
MAC addresses on 192.168.2.13
MAC address 0: 00:00:00:00:00:00
\Device\NetbiosSmb
MAC address 1: 00:0D:60:35:B2:11
\Device\NetBT_Tcpip_{2D3783AA-F4A7-44BF-9776-3CE86BC1890C}
Workstation/server type on 192.168.2.13
Windows 2000
Workstation/Server Name : "192.168.2.13"
Platform ID : 500
Version : 5.0
Comment : ""
Type : 00011003
LAN Manager Workstation
LAN Manager Server
NT/2000 Workstation
Users on 192.168.2.13
Total Users: 8
--- 1 ---
User "a"
Full Name: "a"
System Comment: "a"
User Comment: ""
Last logon: Never
Password expires: Never
Password changed: Never
Locked out: No
Disabled: No
Number of logons: 0
Bad password count: 0
--- 2 ---
User "ACTUser"
Full Name: "Application Center Test Account"
System Comment: "Account used to launch the Application Center Test Broker and Controller services"
User Comment: ""
Last logon: Thu Sep 30 15:26:58 2004 (10 days ago)
Password expires: Never
Password changed: 27 days ago
Locked out: No
Disabled: No
Number of logons: 57
Bad password count: 0
--- 3 ---
Admin "Administrator"
Full Name: ""
System Comment: "Built-in account for administering the computer/domain"
User Comment: ""
Last logon: Mon Oct 11 08:37:23 2004 (0 days ago)
Password expires: Never
Password changed: 28 days ago
Locked out: No
Disabled: No
Number of logons: 56
Bad password count: 26
--- 4 ---
User "ASPNET"
Full Name: "ASP.NET Machine Account"
System Comment: "Account used for running the ASP.NET worker process (aspnet_wp.exe)"
User Comment: "Account used for running the ASP.NET worker process (aspnet_wp.exe)"
Last logon: Never
Password expires: Never
Password changed: 27 days ago
Locked out: No
Disabled: No
Number of logons: 0
Bad password count: 0
--- 5 ---
User "Guest"
Full Name: ""
System Comment: "Built-in account for guest access to the computer/domain"
User Comment: ""
Last logon: Never
Password expires: Never
Password changed: 27 days ago
Locked out: No
Disabled: Yes
Number of logons: 0
Bad password count: 0
--- 6 ---
Admin "hieuln"
Full Name: "hieuln"
System Comment: ""
User Comment: ""
Last logon: Never
Password expires: Never
Password changed: 27 days ago
Locked out: No
Disabled: No
Number of logons: 0
Bad password count: 0
--- 7 ---
User "isphere"
Full Name: "isphere"
System Comment: ""
User Comment: ""
Last logon: Mon Oct 11 08:51:33 2004 (0 days ago)
Password expires: Never
Password changed: 27 days ago
Locked out: No
Disabled: No
Number of logons: 0
Bad password count: 0
--- 8 ---
User "SQLDebugger"
Full Name: "SQLDebugger"
System Comment: "This user account is used by the Visual Studio .NET Debugger"
User Comment: ""
Last logon: Never
Password expires: Never
Password changed: 27 days ago
Locked out: No
Disabled: No
Number of logons: 0
Bad password count: 0
Groups on 192.168.2.13
Group: Administrators
HIEULN\Administrator
HIEULN\hieuln
Group: Backup Operators
Group: Guests
HIEULN\Guest
Group: Power Users
Group: Replicator
Group: Users
NT AUTHORITY\INTERACTIVE
NT AUTHORITY\Authenticated Users
HIEULN\ASPNET
HIEULN\ACTUser
HIEULN\SQLDebugger
HIEULN\Guest
HIEULN\hieuln
HIEULN\isphere
HIEULN\a
Group: Debugger Users
HIEULN\Administrator
Group: NC_S_ISLCK
Group: VS Developers
Password and account policies on 192.168.2.13
Account lockout threshold is 0
Account lockout duration is 30 mins
Minimum password length is 0
Maximum password age is 42 days
Shares on 192.168.2.13
IPC: IPC$ (Remote IPC)
Disk: D$ (Default share)
Disk: virus ()
Disk: books ()
Disk: setup ()
Disk: share ()
Disk: ERP_PCS ()
Disk: hieulnwork_atnight_29 ()
Disk: Windows Script Host 2.0 ()
Disk: ADMIN$ (Remote Admin)
Disk: C$ (Default share)
Domains on 192.168.2.13
Remote time of day on 192.168.2.13
Date: 10/11/2004
Time: 05:06:16
Timezone: GMT +07:00
Uptime: 0 days, 3 hours, 30 minutes
Logon sessions on 192.168.2.13
Total Sessions: 3
\\THIENHD ISPHERE Uptime: 3:14:43 Idle: 0:02:33
\\DEV007 ISPHERE Uptime: 2:50:14 Idle: 0:13:45
\\192.168.2.12 Uptime: 0:00:01 Idle: 0:00:00
Trusted Domains on 192.168.2.13
Remote services on 192.168.2.13
Enumeration complete
==============================================================================
|
|
|
|
|
http://www.microsoft.com/technet/community/scriptcenter/compmgmt/default.mspx
|
|
|
|
|
Hi, I use open dialog control in my VB.NET project to get the file name to the label control on form. It is working fine when I choose the file then it return the value to the label, but How could I control the user if they choose the CANCEL button?
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
If he clicks the Cancel Button the ShowDialog method of OpenFileDialog button will return DialogResult.Cancel and you can check for this to do what you want. Hope I understand your question.
|
|
|
|
|
Thank you very much, now it is working.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Wouldn't it be viable to use a message box to alert the user that he or she has clicked on the cancel button, after using the DialogResult.Cancel to the OpenFileDialog?
bravo659
|
|
|
|
|
Hi,
How could I create COM objects in VB.NET?
I'd be glad if someone tells me.
Thanks.
|
|
|
|
|
|
I have a project to make a spread sheet application like Microsoft Excel using c++. I have problem with the library that i should use. Maybe one of you can help me? Thank's before
|
|
|
|
|
First, this is not a very specific question. You say you "have a problem with the library that i should use". But use for what? There are hundreds of libraries out there, all specialising in one thing or another.
Second, and more importantly, this is not the C++ forum. I suggest you post your question to the correct place and then you might get a response that will help you from people who know the subject area.
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
Hi Help Me I Want Write VBScript Of ("Outlook.Application")
1 ) I want Send E-Mail In list AddressBook Of Outlook At set create list AddressBook
I don't Sent Item.To = "a@a.com;b@asp.com" I want send Program As Question 1
2 ) Function Object ("Outlook.Application") and each Set In Ex.Code I am write Have Properties and Manton P.write Ex. Give Me
Thank
-----------------------
Ex Code Email.vbs
--------------------
'On Error Resume Next ' start code
Set Outlook = CreateObject("Outlook.Application")
Set Item = Outlook.CreateItem(OlTaskItem)
'Item.Assign
Set myDelegate = Item.Recipients.Add("info@microsoft.com")
myDelegate.Resolve
If myDelegate.Resolved Then
Item.Subject = "test"
Item.body= "test"
Item.To = "a@a.com;b@asp.com"
Item.Cc="a@a.com"
Item.Bcc ="a@a.com"
Item.Attachments.Add wScript.ScriptFullName
'Item.DueDate = Now +30
Item.Display
'Item.Send
End If
msgbox "ha"
Set Outlook= CreateObject("Outlook.Application")
Set MAPI = Outlook.GetNameSpace("MAPI")
Set MyFolder = MAPI.GetDefaultFolder(10)
Set Item = MyFolder.Items.Add("IPM.Contact.MyForm")
'Item.Display
Item.FirstName = "FirstName"
Item.LastName = "LastName"
Item.FullName = "FirstName LastName"
Item.CompanyName = "CompanyName"
Item.JobTitle = ""
Item.Department = ""
Item.Email1Address = "info@microsoft.com"
Item.Email1AddressType = "SMTP"
Item.Display
'Item.save ' end code
--------------
fff
|
|
|
|
|
What??? I couldn't understand a single thing you said.
Are you asking how to send an email to a list of addresses found in the Outlook Address Book?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
My customer need to speed dialer program. This is will built into their existing Customer Information System. Whenever they need to call the customer they just need to click on a button and my system need to call to the #. If the line is connected the user just need to pick up the telephone and start talking.
I think i will need to use modem to connect. Problem is if the line is connected, and when the user pick up the phone, my modem is still connected to the line, can they talk like that??? and can i keep track how long they talking to the customer???
i need this urgently, please help. thanx.
|
|
|
|
|
wlho wrote:
I think i will need to use modem to connect.
You could use the modem or there are TAPI modems/cards that will do this. The TAPI version will give you more functionality over a normal modem. A normal modem will dial the phone andlet the user pick it up when the person answers, but after that, the modem will either hang up or will keep the phone off-hook. In either case, it usually will not start a timer tracking the call and will not let you pick that time up in
your software.
wlho wrote:
can they talk like that???
Yes, but anyone around will be able to here everything being said and the speaker in the modem usually will not shut off until there is a data connection.
wlho wrote:
can i keep track how long they talking to the customer???
Not while using a normal modem. You'll need a device specifically designed for such work.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How can I refresh or reload datagrid? I have a main window there is a datagrid, and a child window to add more data into db, I want the datagrid to reload the new data when the child window close and return to the main window. how can I do it?
Lisa
|
|
|
|
|
Use the public void SetDataBinding(
object dataSource,
string dataMember
) of DataGrid to refresh the grid.
|
|
|
|
|
where should I call the SetDataBinding? should I call it at the child window when it close?
|
|
|
|
|
Add an EventHandler for the child window closing in the parent form handle the things in the EventHandler.
Hope this will help.
|
|
|
|