DAM_86
DAM_86

Reputation: 67

nmap to check battery installed or not

I'm working on a project which scan the LAN and display reslut in html/PHP/mysql using NMAP Commands. Similar application to spiceworks.

In spiceworks they said they categorized their nmap output according to following criteria.

Laptops: Machines that respond to the WMI or SSH ports and are found to have a battery installed.

Desktops: Machines that respond to the WMI or SSH ports, but do not have a battery installed and are not running a server operating system.

Now I can categorized my results according to open ports butIi can't find battery status (available or not). Is there any nmap command to find battery status in given IP? Or do you have any idea what they are using to find battery installes during the scan?

Upvotes: 1

Views: 242

Answers (1)

Avraham Zhurba
Avraham Zhurba

Reputation: 76

powercfg -DEVICEQUERY all_devices|find "Battery" >battery.log
set Empty=Y
for /f %%i in (battery.log) do set empty=N
if %empty%==Y (
      ...
del battery.log
) else (
...
del battery.log
) 
pause

Upvotes: 1

Related Questions