Documentation

Index

Introduction

This page of documentation describes essential features of PYNBM version 1.1 and higher. 

Installation

Grid Edition

PYNBM grid can be edited like a classic spreadsheet. You can copy/paste directly from and to classic kind of spreadsheet (MS Excel or OpenOffice Calc).

The grid can be switched in read-only mode with the 'lock the grid' button and menu, thus avoinding accidental modification.

Right-click on column header to sort ascending or desending. Double click on column header resizes the width to fit the contents.

ALT+ENTER Keys combination lets you enter a newline so that you can enter multiline text in a cell.

Using the Poller

The Poller can be toggled to start / stop the periodic polling, each host's RTT and Rate field will automatically be filled.

Settings

PYNBM settings screen lets you define

The settings menu also presents a button that will bring up your text editor upon the Extensions.conf file, thus letting you update its contents. No restart of the application is required after saving changes to the file, the next right-click on the grid will reflect your changes.

The settings menu lets you choose with a checkbox if you want to automatically load the last opened CSV file upon startup or not. 

Finally, you can select if you want PYNBM to check for any available update on startup.

CSV Import/Export

PYNBM lets you import data to the grid from a CSV file (semi-colon field separator). The export functionnality dumps the grid to a CSV file, and prompts you for an optionnal passphrase to encrypt the password field with AES algorithm. Imports of encrypted files in PYNBM automatically ask you for the decrypt passphrase.

Context Menu Tools Customization

By default the context menu contains http and https tools, they both launch your default web browser upon the related host.

On MS Windows only, you'll get a RDP tool that launches the terminal service client (mstsc.exe) upon the related host, and will try to authenticate you automatically with the informations entered in login and password fields. To log with a Domain user, you have to define the username in the form <DOMAIN>\<username>.

Context menu is customizable. Its configuration file "extensions.conf" is located in your "Application Data\PYNBM" directory on MS Windows, and in "~/Library/Application Support/PYNBM" on Mac OSX platforms. You can also get a direct access to the file from the settings menu by clicking on the "customize extensions" button. Saving your changes to the configuration file will immediately bring your modifications in the right-click menu.

To access grid parameters when launching a tool, you can use specific variables of kind ${n} with n corresponding to the index of column.

${1} references first column in the grid, ie host
${2} references second column in the grid, ie alias
${3} references third column in the grid, ie login
${4} references fourth column in the grid, ie password
... and so on.

Example settings for commonly used tools :

SFTP-autologin=C:\Program Files\Winscp\winscp.exe sftp://${3}:${4}@${1}
SCP-autologin=C:\Program Files\Winscp\winscp.exe scp://${3}:${4}@${1}
Putty-autologin=C:\Program Files\Putty\Putty.exe ${3}@${1} -pw ${4}
FTP=C:\Program Files\FileZilla FTP Client\filezilla.exe ftp://${3}:${4}@${1}


Don't hesitate to send me your custom command-line tools, so that I can share them here !

Contributions from Benoît :

Auto Login to Cisco CUCM with Firefox (on one line. Benoît uses custom columns and refers for login and password respectively in columns id 9 and 10) :
cucm-autologin=C:\Program Files (x86)\Mozilla Firefox\firefox.exe https://${1}:8443/ccmadmin/j_security_check?j_password=${10}&j_username=${9}

Auto Login to Cisco Unity Connection with Firefox (on one line, like above login and password respectively taken from columns id 9 and 10) :

cuc-autologin=C:\Program Files (x86)\Mozilla Firefox\firefox.exe https://${1}:8443/cuadmin/j_security_check?j_password=${10}&j_username=${9}

vSphere (on one line) :
vSphere=C:\Program Files (x86)\VMware\
Infrastructure\Virtual Infrastructure Client\Launcher\VpxClient.exe -s ${1} -u ${3} -p ${4}

To organize the items in context menu, you can insert separators by inserting the keyword "Context_Menu_Separator" on a line. This way, tools defined above and below this keyword will appear separated by a line in the context menu.

Since version 1.0, you can now add one-level submenus, thus providing a better organization of you tools. You need to add square braquets to enclose the submenu name, the next line will be considered as submenus items. An empty line will mark the end of the submenu. See the Extensions.conf file for more examples.

 

Context Menu Tools Customization : returned values

You can make PYNBM get the value returned by an external program, and put this value in a a column of you choice.

Let's take a simple example to illustrate the concept. You can imagine a custom tool that performs a DNS name-lookup, and returns the IP address of a host defined in the grid. We can also imagine that you want the returning value to be written in the column id 10.

To achieve this, on a Mac OSX system you would create an custom extension tool like this :

${10}:NameLookup=dig ${1} +short

Literally, this will create a right-click menu labelled "NameLookup" which performs a "dig <host> +short" and the returned value would be inserted in column 10.

Now you can imagine whatever you want, and for example you can :

Combined with the capability to select multiple items and start any custom extension tool sequentially upon them, PYNBM lets you industrialize many tasks.

Windows Examples for respectively Name Lookup, and reverse Name Lookup (uses MS Powershell one-liners):

${9}:NameLookup=powershell ([System.Net.Dns]::GetHostAddresses('${1}')[0].ipaddresstostring)
${10}:Reverse-NameLookup=powershell ([System.Net.Dns]::GetHostEntry('${1}').HostName)

Want to work on code ?

Feel free to work on code, in respect of the GPLv3 License. Below is the list of pre-requisites you'll need to compile your own version of PYNBM :

 


Identi.ca Twitter Digg Stumble Delicious Technorati Facebook