Giter Club home page Giter Club logo

llamnuds / wskr Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 37.14 MB

A simple command line program for scanning a range of Windows machines FAST! Can look for a registry value, a file or folder, who's logged on, or indeed whether no user is logged on, machines IP settings, serial numbers are etc. No installation required, no configuration files, just download and run the EXE on your Windows machine.

License: MIT License

Go 100.00%
admin administrate administration administrator go golang scanner scanning scanning-tool utility windows llamnuds scan cli command-line simple

wskr's Introduction

WSKr

Do you manage hundreds or thousands of machines? Then this simple tool could be of use to you. Just download and run the EXE on your Windows machine. Scan a single machine or thousands in just a few seconds. It basically fronts calls to Windows PING, REG and WMIC executables, but we get the benefit of parrallelism with Go's go-routines.

FEATURES

  • Scan a range of Windows machines quickly
  • Look for a registry value
  • Look for the presence or absence of a file or folder
  • Look for files and folders inside the USER folder on machines.
  • See which machines are alive, or not
  • Use WMI to find machines ...
    • IP address
    • DHCP or DNS settings
    • See who is logged on
    • Find machines with no-one logged on
    • Installed software or patches
    • Serial or Asset Tag numbers
    • Installed printers
    • OS version
    • ...and more...
  • No installation required, wskr.exe is all you need.
  • No configuration files

GETTING STARTED

To get started, download the WSKr.exe file from the Github repository and run it on your Windows machine. For example, if you have a thousand machines, named WS000 through WS999, then you can then use the following command to run a simple Ping scan on them all. You'll know which are on in just a few seconds :-

wskr --range=WS000..WS999  --ping

MANDATORY PARAMETER 1 of 2 - Tell WSKr what to do.

You must have one, and only one, of these. (But do NOT use = after any of these.)

--file|-f      some-file           Search for a file.
--dir|-i       some-path           Show the contents of a given directory.
--userfile|-u  some-path           Show files/folders in a specified folder for all users on all machines.
--registry|-r  some-reg-value      Search for a registry value.	
--wmic|-m      some-wmic-command   Run your WMIC your command.
--ping|-g                          Search for LIVE machines.
--free|-3                          Search for machines with no active user.
--bitlocker|-b                     Retrieve Bitlocker Recovery key.
  • With --wmic, For an HTML formatted output postfix this /format:hform ...or for a LIST output use this /format:list

MANDATORY PARAMETER 2 of 2 - Tell WSKr on which machines to operate.

You will need to state a RANGE of computers to look at.

--range=|-n=   string[..string]    FirstMachine[.. LastMachine]
--range=|-n=   'filename.txt'      Name of text file to read in, it should end in .txt.
  • The text file must be in the same directory that WSKR.EXE is run from.
  • Each line of the text file should start with a machine name, then a space; everything after the space is ignored.
  • Blank lines are ignored, as are any lines starting with a space, hash symbol or tab.

OPTIONAL PARAMETERS

[--show=|-w=]     String    Return successes(1), Failures(0).             Default = 1 i.e. Only successes (-w=10 to show all)
[--delay=|-d=]    Integer   Seconds of Delay between machines.            Default = 0 Seconds
[--save=|-v=]     'String'  File name, to save in same location as EXE.   Use single quotes.
[--summary|-y]              Just give final counts.
[--timings|-t]              Display the timings of the results that come back.
[--help|-?]                 Show a help page.

SAVING THE RESULTS

You can save the results of your scan to a file using the following option: --save= or -v= followed by the filename to save to. The file will be saved to the same location as EXE. Successes are saved to the file that you specified but prefixed with a 1-, and the failure file is prefixed with 0-.

EXAMPLES

To search PC0001 through PC1234, finding machines that do NOT have c:\data\some file.txt use :-

(Note the --show=0, to see only the failures.)

wskr --show=0 --range=pc0001..pc1234 --file 'c:\data\some file.txt'

To search PC00 through PC99, showing the files present for each user on each machine in a specific folder try something like :-

wskr --range-pc00..pc99 --userfile 'AppData\roaming\icaclient'

To show the contents of a given directory :-

wskr -n=comp456 --dir 'c:\windows\program files'

To search for a REGISTRY Value on a single computer :-

wskr -n=comp456 -r 'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell'

WMIC is useful to see a whole bunch of different things, such as :-

Logged in users, saving result:  wskr.exe --range=WS123 --wmic computersystem get username --save='output.txt'
OS version:                      wskr.exe --range=WS123 --wmic os get version
Installed software MSI's:        wskr.exe --range=WS123 --wmic product get name,vendor,version
System serial number:            wskr.exe --range=WS123 --wmic bios get serialnumber	
Installed printers:              wskr.exe --range=WS123 --wmic printerconfig list
The IP,DHCPserver, Gateway:      wskr.exe --range=WS123 --wmic nicconfig get IPAddress,dhcpserver,defaultipgateway
AssetTag (not the SerialNumber): wskr.exe --range=WS123 --wmic systemenclosure get SMBIOSAssetTag
HTML for all COMPUTERSYSTEM:     wskr.exe --range=WS123 --wmic computersystem get /format:hform --save='cs-output.html'
EFS running as a service:        wskr.exe --range=ws123 --wmic service "where name='efs'" get Started

The above ranges could be in the machine name range format: --range=SSnnn..SSmmm ,or file name format: --range=myMachines.txt

DEPENDENCIES

  1. The machine you are running this on must be running Windows.
  2. --ping is reliant on Windows PING.EXE
  3. --wmic is reliant on Windows WMIC.EXE
  4. --registry is reliant on Windows REG.EXE

ASSUMPTIONS

  1. Your machine names have at least one character at the start, followed by at least one digit.
  2. The machines you are scanning are running Windows.
  3. You have sufficient rights on the remote machines.
  4. Ensure that WMI service is enabled and running on the remote machines.
  5. Ensure any required firewall ports are open between your machine and the remote machines.

RESTRICTIONS

The following are not allowed in conjunction with --WMIC :-

  1. CALL
  2. CREATE
  3. UNINSTALL
  4. DELETE
  5. JSCRIPT.DLL
  6. VBSCRIPT.DLL
  7. SHADOWCOPY

Copyright 2023 - llamnuds

wskr's People

Contributors

llamnuds avatar

Stargazers

 avatar

Watchers

 avatar

wskr's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.