How To Script Nipper Studio
How To Script Nipper Studio
Before we start
This document makes use of the command line version of Nipper Studio to perform an audit on
Microsoft Windows, GNU/Linux or Apple Mac. It will assume that you can execute the command line
version by entering the command “nipper”.
Microsoft Windows
Nipper Studio 2.5.2 installs the command line tool by default and adds Nipper Studio to the global
path to allow users to launch Nipper Studio from any directory and run audits easier and more
efficient. This feature will be present in all future versions of Nipper Studio.
With all version of Nipper Studio up to and including 2.5.1.4644, the default installation options
for Nipper Studio do not include the command line tools. If “nipper.exe” is not included in your
Nipper Studio directory, then you will have to re-run setup and include it on the installation
options screen.
When installing, the Nipper Studio directory is not automatically added to the Windows search
path. To be able to execute “nipper” you will need to open a command prompt in the directory
where you installed the software, or use the full path when you run it. E.g. “C:\Program
Files\NipperStudio\nipper” instead of just “nipper”.
Throughout this document we will detail command line options and give examples of how they are used.
If the commands include any of the conventions detailed in the table below, then the convention and its
contents should be replaced entirely. The conventions used in this document are:
Convention Description
[] Describes optional command text – it is not required.
<> Describes an option that you must choose.
| Used to divide a list of options that could be used – it will always appear within
one of the previous conventions.
Nipper Studio is a powerful auditing tool with a huge number of command line options. The command
line tool includes a built-in help facility. To access this, just enter the following command:
nipper
The help has been split into topics such as “Report”, “Devices” and “Save”. To get help on any given
topic, enter the command:
nipper --help=<topic>
For example, you can get help on setting profiles by using the following command:
nipper --help=profile
The basics – auditing using the command line
You can perform an audit of a device configuration that has been saved to a local file using the following
command:
For example, to audit the demo configuration file “cisco-router.txt” from the “demo-files” directory and
save the report to my Windows desktop, I could enter:
To audit a device over the network (remote), such as a Cisco router, you could use a command such as
the following:
If you want to audit multiple devices in the same report, you can just add other configurations as an
input for Nipper Studio:
For auditing multiple remote devices, you can stack the commands such as:
To audit a directory containing configuration files from lots of different devices you could use a
command such as:
All those examples assume that we are using the Nipper Studio settings that are currently configured
and accepting any defaults. You can configure other settings by adding them to the command too, for
example:
To change settings using the command line, you can enter one or many settings at a time on the
command line:
nipper --company-name=Titania
All the settings are saved, so they are remembered between each time you run Nipper Studio. This
functionality can be changed by modifying the auto save setting:
For the purpose of this guide though, it is helpful for auto save to be enabled (the default setting). To
save the current settings as a new profile, you can use the following command:
nipper --save-profile=<name>
nipper --show-profiles
If a current profile is being used, it will be shown with a * next to the name.
Now when you run an audit you can specify the name of the profile to use at the start and all the
options set for that profile will be used.
As an example, we will focus on creating a scheduled task to perform a daily audit of all the
configurations stored in a single directory. We will also use a profile to ensure that the same settings are
used for each audit.
Microsoft Windows
1. Start the Windows Task Scheduler (on Windows 10 you can do this by clicking on the Start button
and then entering “task scheduler” and clicking on “Task Scheduler”).
4. Select “Daily” for the trigger, then click on the “Next” button.
5. Select a start time for the task, then click on the “Next” button.
6. Select “Start a program” from the actions, then click on the “Next” button.
7. Select the “nipper.exe” program in the “program/script” box. Then add the arguments “--
input=<configuration directory> --report=<report file>”. Also add the nipper.exe program file
directory to the “Start in (optional)” box – DO NOT USE QUOTES. Then click on the “Next” button.
2. Open the “crontab.txt” file using your favorite text editor. There may or may not already been
entries in the schedule.
3. The file is expected to be in a specific format, with comment lines beginning with a “#” character.
The format covers six individual elements, each separated by a space. They are minute (0-59),
hour (0-23), day-of-month (1-31), month (1-12), day-of-week (0-6 starting with Sunday) and the
command. A “*” is used wherever a value should be “any”.
4. Add the following line to the file to schedule a Nipper Studio audit at 11:30pm every day:
30 23 * * * nipper --input=<configuration directory> --report=<report file>
Now you should have an audit job scheduled on your Linux system.
Just like with Windows Scheduler, there may be something that prevents a Cron job from being run.
In those cases, the following may help:
Check the log files (usually in /var/log/) to see if there any events that could indicate the reason
for the failure.
Check in “/etc/cron.deny” and “/etc/cron.allow” to see if the user has been denied or given
permission to schedule jobs.
Check to see if the system has the correct time, it may be in a different timezone.
You can run the batch file by clicking on it in Windows Explorer or from the command line. When you
are happy that everything is working as expected, follow the task scheduler steps to schedule the audit.