Skip to main content
*************
Batchscanner
*************

**Note: Project still under development.**

Batchscanner is a script to batch-scan and/or query and/or configure multiple Siklu radios
via their CLI (SSH) interface.
It operates over a user-defined range of IP addresses and/or networks, executes some action,
and writes the results to csv/txt files.

**Note**: This program is a personal initiative and contribution.
Although it is designed for managing radios by `Siklu Communications <https://www.siklu.com>`_, no use
has been made of any company resources, nor any intellectual proprietary nor
confidential information.

Batchscanner supports the following *actions*:

- **scan**: For each IP address, identify if the device is a Siklu radio, and if so what kind.
Information is extracted from the SSH banner (if one exists) and/or from the CLI prompt.
- **show**: executes CLI 'show' commands to extract key metrics from each radios (e.g., link up/down).
- **script**: executes a sequence of commands read from text file.
- **set_tod**: configure the date and time of the radios based on that of the computer.

Actions can be applied to specific types of radios, according to the following classification:

- **EH**: Etherhaul radios
- **BU**: Classic MultiHaul base units (BUs)
- **TU**: Classic MultiHul terminal units (TUs)
- **TG**: MultiHaul TG radios. For these radios, there is a further option for batchscanner to action
over remote CNs (which may not have unique IP addresses).

Installation
=============

As a standalone (executable) script
------------------------------------

This option does not require a Python environment set up.

#. Download one of the following zip files based on your OS:

- Windows 64bit:
`download link <https://github.com/DanielEphraty/batchscanner/releases/latest/download/batchscanner-x64-0.1.3.zip>`_

#. Extract the zip file to your local drive

As a Python script
--------------------

.. code-block:: shell

$ pip install batchscanner-siklu

Note: you might like to copy the files: *config.toml*, *sikssh_config.toml*, and *network.txt*
from the *Lib/site-packages/batchscanner* directory (in your Python environment) to
your working directory - as templates, then edit them as required.

Usage
======

#. Use a standard text editor to edit the default `network file <Network file_>`_ ``network.txt`` to specify
the range of IP addresses, and log-in credentials to the radio.
Alternatively, create a new file and refer to it with the -c option (below).
#. If required, use a standard text editor to edit the default program
`configuration file <Config file_>`_ ``config.toml``.
Alternatively, create a new file and refer to it with the -p option (below).
#. Run the script:

.. code-block:: none

Usage: batchscanner [-h] [-a {scan,show,script,set_tod}] [-n NETWORK_FILENAME] [-c CONFIG_FILENAME]

options:
-h, --help Show this help message and exit
-a {scan,show,script,set_tod}
Action for batchscanner to take (default: show). One of:
scan: scan the network and identify which IP address is a Siklu radio;
show: extract key metrics from radios (parsed outputs of 'show' commands);
script: execute a script: send list of commands read from text file;
set_tod: set date and time.
-n NETWORK_FILENAME Mandatory filename specifying the Network (range of IP addresses to scan and login credentials.
Default: 'network.txt'
-c CONFIG_FILENAME Optional configuration file for overriding default program parameters.
Default: 'config.toml'



Network file
--------------

The range of IP addresses is specified as a text file, with the following format:

* Username and password to log into the radios
* A range of IP addresses, described by any number of the following (which can be mixed and matched):

- A single IP address
- A range of IP addresses: start and end addresses, separated by a hyphen
- A subnet with a forward slash denoting the number of subnet bits.

Example content of network file defining a total of 1 + 200 + 252 IP addresses:

.. code-block:: shell

username = admin
password = admin
192.168.0.1
10.11.12.1 - 10.11.12.200
10.10.10.0/24


Config file
--------------

The configuration file (simple `TOML <https://toml.io/en/>`_ format) may be used to override
the default program parameters. For a list of these parameters and their respective
meanings, refer to the *Parameters* section of the documentation for the
`run_batch function <https://batchscanner.readthedocs.io/en/latest/batchscan.html#function-information>`_.

Example content of configuration file:

.. code-block:: shell

batch_size = 1000 # Number of IP addresses in single batch (results saved after each batch)
script_filename = 'script.txt' # filename containing list of commands to send to radio (applicable only if action='script')
include_eh = true # If true, action EtherHaul radios
include_bu = true # If true, action MultiHaul BU radios
include_tu = true # If true, action MultiHaul TU radios
include_tg = true # If true, action MultiHaul TG radios
include_tg_remote_cns = false # If true, action all remote CNs (applicable only to TG DNs)
multiprocessing_flag = true # If true, Run concurrently (much faster running time)
multiprocessing_num_processes = 50 # Number of processes to run concurrently
output_directory = 'output' # Results are written to this directory
save_show_tg_per_radio = false # If true, save also parsed 'show' output per radio (applicable only to TG)
save_show_tg_per_radio_raw = false # If true, save aso the raw (unparsed) 'show' output per radio (applicable only to TG)
time_shift = 0 # Number of hours to add to computer time when configuring date/time (applicable only if action='set_tod')

Metadata

Release files for batchscanner-siklu 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for batchscanner-siklu 0.1.7
File Size Uploaded Provenance
batchscanner-siklu-0.1.7.tar.gz 38.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for batchscanner-siklu 0.1.7
File Interpreter ABI Platform
batchscanner_siklu-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 78.0 kB

Release files / batchscanner-siklu-0.1.7.tar.gz

Download URL batchscanner-siklu-0.1.7.tar.gz
Size 38.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ff74faa572d1002e3a7c2659188074b3ee72c96547e7066f9823a4aca58d46e7
BLAKE2b-256 checksum
How to use checksums
3fdf48bbd3427c226e410a30ed7aba8d2b16479e0417bba51f1be79abd0d3ac5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / batchscanner_siklu-0.1.7-py3-none-any.whl

Download URL batchscanner_siklu-0.1.7-py3-none-any.whl
Size 39.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3645965d3be7f592ff79a141642b51eb20b31b03cbf4335604f45e89840544e2
BLAKE2b-256 checksum
How to use checksums
8b3a71ec0f8ac69b9b698a04220862922445ec1cba1ebb10ccfa2c3d328adbd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for batchscanner-siklu 0.1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page