@ECHO OFF Title Local Scan Utility ::Assembled by F1X3R setlocal setlocal enabledelayedexpansion CLS COLOR 0A ECHO. ECHO _/_/_/_/ _/ _/ _/_/_/ ECHO _/ _/ _/ _/ _/ ECHO _/_/_/ _/ _/_/_/ ECHO _/ _/ _/ _/ _/ ECHO _/ _/ _/ _/ _/ ECHO. :LOCALSCAN ECHO. FOR /f "tokens=2 delims==" %%f in ('wmic computersystem get domain /value') do SET "LocalDomain=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic systemenclosure get SMBIOSAssetTag /value') do SET "LocalAssetTag=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic csproduct get Identifyingnumber /value') do SET "LocalSN=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic csproduct get Name /value') do SET "LocalModel=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic csproduct get vendor /value') do SET "LocalVendor=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic csproduct get version /value') do SET "LocalVersion=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic os get Caption /value') do SET "LocalOSName=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic os get Version /value') do SET "LocalOSVers=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic os get OSArchitecture /value') do SET "LocalOSArch=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic path softwarelicensingservice get OA3xOriginalProductKey /value') do SET "LocalProdKey=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic os get LastBootUpTime /value') do SET "LOSLB=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic os get LocalDateTime /value') do SET "LOSDT=%%f" SET LocalOSLastBoot=%LOSLB:~0,4%-%LOSLB:~4,2%-%LOSLB:~6,2% %LOSLB:~8,2%:%LOSLB:~10,2%:%LOSLB:~12,2% SET LocalOSDateTime=%LOSDT:~0,4%-%LOSDT:~4,2%-%LOSDT:~6,2% %LOSDT:~8,2%:%LOSDT:~10,2%:%LOSDT:~12,2% ECHO __SOFTWARE________________________________________________________________________________ ECHO System Name = %computername% ECHO Computer Domain = %LocalDomain% ECHO Serial Number = %LocalSN% ECHO Asset Tag = %LocalAssetTag% ECHO Make and Model = %LocalVendor% %LocalModel% ECHO Operating System = %LocalOSName% - %LocalOSVers% - %LocalOSArch% ECHO Product Key = %LocalProdKey% ECHO Last Startup Time = %LocalOSLastBoot% ECHO Current Date and Time = %LocalOSDateTime% ECHO. ECHO __PROCESSOR_______________________________________________________________________________ wmic cpu get DeviceID,Name,NumberofCores,NumberOfLogicalProcessors ECHO __MEMORY__________________________________________________________________________________ wmic MEMORYCHIP get banklabel, capacity, devicelocator, partnumber ECHO __HARD DRIVE______________________________________________________________________________ wmic diskdrive get Model, Size, SerialNumber, mediaType ECHO __LOGICAL DISK____________________________________________________________________________ wmic logicaldisk GET name,freespace,SystemName,FileSystem,Size,VolumeSerialNumber ECHO __NETWORK_________________________________________________________________________________ wmic nic WHERE PhysicalAdapter="TRUE" get Name, MACAddress, NetConnectionID PAUSE :LOCALPATHASK ECHO. ECHO Would you like to save the full output to a text file? [Y/N] choice /c YN if %errorlevel%==1 goto LOCALPATH if %errorlevel%==2 goto END :LOCALPATH ECHO. ECHO Enter the local path to save the file. ECHO ** The path should be something like %USERPROFILE%\Desktop ** ECHO. SET LPATH=C SET /P LPATH= IF /I %LPATH% EQU C GOTO LOCALPATH ECHO. ECHO The file will save to "%LPATH%", is this correct? [Y/N/Q] choice /c YNQ ECHO. ECHO Thank you. if %errorlevel%==1 goto LPATHCHECK if %errorlevel%==2 goto LOCALPATH if %errorlevel%==3 goto END ECHO. :LPATHCHECK ECHO. ECHO. ECHO Testing if the local path "%LPATH%" exists... ECHO. IF not exist "%LPATH%" echo Invalid path, try again. & GOTO LOCALPATH > nul ECHO Entered path is valid, moving to next step :LOCALDATAOUTPUT ECHO. FOR /f "tokens=2 delims==" %%f in ('wmic computersystem get domain /value') do SET "LocalDomain=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic systemenclosure get SMBIOSAssetTag /value') do SET "LocalAssetTag=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic csproduct get Identifyingnumber /value') do SET "LocalSN=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic csproduct get Name /value') do SET "LocalModel=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic csproduct get vendor /value') do SET "LocalVendor=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic csproduct get version /value') do SET "LocalVersion=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic os get Caption /value') do SET "LocalOSName=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic os get Version /value') do SET "LocalOSVers=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic os get OSArchitecture /value') do SET "LocalOSArch=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic path softwarelicensingservice get OA3xOriginalProductKey /value') do SET "LocalProdKey=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic os get LastBootUpTime /value') do SET "LOSLB=%%f" FOR /f "tokens=2 delims==" %%f in ('wmic os get LocalDateTime /value') do SET "LOSDT=%%f" SET LocalOSLastBoot=%LOSLB:~0,4%-%LOSLB:~4,2%-%LOSLB:~6,2% %LOSLB:~8,2%:%LOSLB:~10,2%:%LOSLB:~12,2% SET LocalOSDateTime=%LOSDT:~0,4%-%LOSDT:~4,2%-%LOSDT:~6,2% %LOSDT:~8,2%:%LOSDT:~10,2%:%LOSDT:~12,2% ECHO Information from %computername% > "%LPATH%\InfoDump_%computername%.txt" ECHO. >> "%LPATH%\InfoDump_%computername%.txt" ECHO __SOFTWARE________________________________________________________________________________ >> "%LPATH%\InfoDump_%computername%.txt" ECHO System Name = %computername% >> "%LPATH%\InfoDump_%computername%.txt" ECHO Computer Domain = %LocalDomain% >> "%LPATH%\InfoDump_%computername%.txt" ECHO Serial Number = %LocalSN% >> "%LPATH%\InfoDump_%computername%.txt" ECHO Asset Tag = %LocalAssetTag% >> "%LPATH%\InfoDump_%computername%.txt" ECHO Make and Model = %LocalVendor% %LocalModel% >> "%LPATH%\InfoDump_%computername%.txt" ECHO Operating System = %LocalOSName% - %LocalOSVers% - %LocalOSArch% >> "%LPATH%\InfoDump_%computername%.txt" ECHO Product Key = %LocalProdKey% >> "%LPATH%\InfoDump_%computername%.txt" ECHO Last Startup Time = %LocalOSLastBoot% >> "%LPATH%\InfoDump_%computername%.txt" ECHO Current Date and Time = %LocalOSDateTime% >> "%LPATH%\InfoDump_%computername%.txt" ECHO. >> "%LPATH%\InfoDump_%computername%.txt" ECHO __PROCESSOR_______________________________________________________________________________ >> "%LPATH%\InfoDump_%computername%.txt" wmic /append:"%LPATH%\InfoDump_%computername%.txt" cpu get DeviceID,Name,NumberofCores,NumberOfLogicalProcessors ECHO __MEMORY__________________________________________________________________________________ >> "%LPATH%\InfoDump_%computername%.txt" wmic /append:"%LPATH%\InfoDump_%computername%.txt" MEMORYCHIP get banklabel, capacity, devicelocator, partnumber ECHO __HARD DRIVE______________________________________________________________________________ >> "%LPATH%\InfoDump_%computername%.txt" wmic /append:"%LPATH%\InfoDump_%computername%.txt" diskdrive get Model, Size, SerialNumber, mediaType ECHO __LOGICAL DISK____________________________________________________________________________ >> "%LPATH%\InfoDump_%computername%.txt" wmic /append:"%LPATH%\InfoDump_%computername%.txt" logicaldisk GET name,freespace,SystemName,FileSystem,Size,VolumeSerialNumber ECHO __NETWORK_________________________________________________________________________________ >> "%LPATH%\InfoDump_%computername%.txt" wmic /append:"%LPATH%\InfoDump_%computername%.txt" nic WHERE PhysicalAdapter="TRUE" get Name, MACAddress, NetConnectionID for /F %%I in ('curl -s http://ifconfig.me') do set ExtIP=%%I ECHO. ECHO Your likely external IP is %ExtIP%. >> "%LPATH%\InfoDump_%computername%.txt" ECHO. nslookup %ExtIP% >> "%LPATH%\InfoDump_%computername%.txt" ECHO. ECHO The User logged into %computername% is ... >> "%LPATH%\InfoDump_%computername%.txt" wmic /append:"%LPATH%\InfoDump_%computername%.txt" computersystem get username ECHO ^*^*^* The Current Network Shares . . . ^*^*^* >> "%LPATH%\InfoDump_%computername%.txt" net view /all \%computername% >> "%LPATH%\InfoDump_%computername%.txt" ECHO ^*^*^* The Installed AntiVirus, if any, is . . . ^*^*^* >> "%LPATH%\InfoDump_%computername%.txt" ECHO. >> "%LPATH%\InfoDump_%computername%.txt" wmic /append:"%LPATH%\InfoDump_%computername%.txt" /namespace:\root\securitycenter2 path antivirusproduct get displayname,pathToSignedReportingExe,timestamp ECHO. >> "%LPATH%\InfoDump_%computername%.txt" ECHO ^*^*^* The Current Network Adapter Information is . . . ^*^*^* >> "%LPATH%\InfoDump_%computername%.txt" ipconfig /all >> "%LPATH%\InfoDump_%computername%.txt" ECHO. ECHO. >> "%LPATH%\InfoDump_%computername%.txt" ECHO ^*^*^* The Installed Updates and Hotfixes . . . ^*^*^* >> "%LPATH%\InfoDump_%computername%.txt" ECHO. >> "%LPATH%\InfoDump_%computername%.txt" wmic /append:"%LPATH%\InfoDump_%computername%.txt" qfe get Caption, Description, HotFixID, InstalledOn CLS ECHO Output file "InfoDump_%computername%.txt" has been created ECHO in %LPATH%. ECHO. PAUSE GOTO END :END endlocal CLS COLOR TITLE Command Prompt EXIT /B 1