# NetConnect - CHANGELOG # Network Authentication Tool # by Chris Mason v1.48 - 14th September 2011 o Added support for negative verbosity level to suppress printing of NetConnect header. o Fixed an issue where break was hanging when being used in a script. o Fixed an issue where the 'key' attribute wasn't working on 'ask' elements. o Fixed an issue where the sO->Option () function wasn't working. o Added support for matching 'PASSCODE' in the password prompt when nodes authenticate via RSA SecurID. o Verbose output and using a single logfile is now supported when processing multiple nodes - processed sequentially. o Added support for One-Time passwords which can be used for the 'password' attribute under a profile - this is to support RSA SecurID tokens. It will process nodes sequentially and prompt the user for a new password before connecting to each node. o Fixed a bug which stopped 'ask' attributes being used for the 'username' attribute when connecting to nodes using ssh. ----- v1.47 - 23rd February 2011 o Verbosity level is static and can't be changed through scripts. The 'verbose' option has been deprecated as well as the ScriptObject Print function. o In interactive mode 'clear history' has been deprecated and redesigned the aesthetics around interactive mode. Commands can now be entered without completing them (e.g. 'r' instead of 'run'). o Added a seperator on the node output report to make it easier on the eyes to see different profiles. o Added support for profile option 'interactive_key' which allows you to change or disable the key (default is CTRL+D) used for interactive mode. ----- v1.46 - 11th February 2011 o Added support for built-in node types. This allows NetConnect to define common generic node types that can be referenced without the user having to construct complex regular expressions. This feature also changes the node report slightly as it will now include a 'Type' heading for profiles. o Added support for selecting multiple nodes by group when running scripts. o Fixed a bug with 'chpass' functionaility which wasn't allowing you to specify ! or ? characters within the password. o Fixed a configuration parser error where it was removing actual values instead of comments. The parser wasn't correctly checking that a value was terminated with the same quote that it began with. Added more stricter checking of values. Updated 'netc.vim' to disallow end-of-line comments. o Ask attribute is now supported for the 'send' attribute in the 'expect' attribute as well as being supported when processing multiple nodes. Ask attribute is now also supported for the 'username' attribute. o Removed strict checking of script files - they no longer need to contain any contents. This can be used for connectivity checking of nodes (e.g. 'netc group:xx -x /dev/null') o Tweaked the usage screen for cosmetic improvements as well as the node output report to change the amount of spaces being used. o Changed the profile attribute 'break' to 'break_sequence' to be a bit more descriptive. o Renamed NetConnect option 'reconnect_on_timeout' to 'retry_on_timeout' and also added 'retry_count'. o Renamed NetConnect option 'count' to 'node_count' to be more descriptive. o Added a highly unportable way of determining if the last line to be written to STDOUT is terminated with a newline character or not. If the cursor is not at column 1 then it will output a newline character (this is only used when verbose mode is true). o Added ability to comment out nodes in a node file using a '#' sign at the beginning of the line. o ScriptObject functions SetNetcOptions, GetNetcOption and GetScriptOption have been replaced with a generic Option function to be a bit simpler. o Added a 'Print' ScriptObject function which outputs data and works out if a newline needs to be printed first. o Deprecated the 'interactive' option from the ScriptObject. o NetConnect now enforces the requirement of Expect.pm v1.21 due to bugs in earlier releases. Remove this check at your peril. o Fixed a memory issue when outputting a lot of data when connected to a node. o Fixed a bug which caused NetConnect to exit if the window was resized during an expect call. ----- v1.45 - 2nd January 2011 o Fixed a typo in an error message when importing additional configuration files. The name of the imported file was incorrect. o Fixed an issue with the standard prompt matching regular expression which when looked at again was a little silly. This was causing it to not match certain prompts on Redback devices. o NetConnect will now return shell exit codes to identify why it exited. These are as follows: 0 = no failure 1 = generic failure 2 = recoverable timeout (used with 'reconnect_on_timeout') 3 = fatal timeout 4 = script syntax errors 5 = invalid credentials o NetConnect will now automatically detect how many 'exit' commands it needs to send to exit a node successfully. o Added support for the 'inherit' keyword in Proxies and Profiles. This will inherit all attributes defined within a Profile or Proxy with the exception of nodes. o Chpass functionality now displays the context that the encoded string has been detected. o Redesigned the ScriptObject way of passing Script and NetConnect options. o Added support for 'reconnect_on_timeout' option for scripts. o Completely reworked the algorithm for child placement when processing multiple nodes after discovering a bug under certain scenarios. o If duplicate nodes are detected within the configuration file then NetConnect will output a warning as opposed to exiting to the shell. o Added bold colouring for output report headers. Removed the { xxx } output in the output report and also supressed the printing of empty profiles unless the -v option is specified. Profiles are also sorted alphabetically in the node report and the default profile no longer comes first. o Fixed problems with break sequence not working in lots of cases. o Provided a workaround to an issue which was caused by a bug in Expect.pm v1.21. If CTRL+C is pressed while Expect is waiting for a device to respond then it will hang indefinately. Expect.pm doesn't check the return code of the select() call correctly and assumes it was successfull if -1 is returned. This results in sysread() being called which blocks. The workaround is to allow signals to be sent multiple times which causes the sysread() call to be interupted as well. UPDATE: This was an old bug as we were running Expect 1.15 and not Expect 1.21 as originally thought. o Added a progress indicator when processing multiple nodes. It will update the title of the terminal window (xterm only) and provide an updating percentage as nodes are processed. o Fixed a bug if telnet or SSH was being spawned through a wrapper then NetConnect was leaving orphaned processes if the session timed out. ----- v1.44 - 6th October 2010 o Fixed a serious bug which caused NetConnect to loop indefinately if the terminal window was closed before disconnecting from the device. NetConnect would then consume all available CPU cycles until the process was killed. ----- v1.43 - 20th September 2010 o Added support for 'chdir' and 'exec' functions to interactive mode (CTRL+D) to allow running unix shells while still connected to a device. o Fixed a bug which was causing NetConnect to not update the XTerm title when connecting to a device using '-t' or '-s' command line options. ----- v1.42 - 9th September 2010 o Whilst in interactive mode (CTRL+D), persistent history will be written to ~/.netc_history as opposed to ~/.netc.history to be inline with other history files. o Fixed a bug which caused NetConnect to create an empty history file when it was run regardless of whether interactive mode (CTRL+D) was initiated. o When using the 'Callback' method of the 'Run' subroutine of the ScriptObject (sO), stdout logging will be disabled for the duration of the command. # ----- v1.41 - 27th August 2010 o Added support for a 'Callback' method of the 'Run' subroutine of the ScriptObject (sO). Instead of waiting for the command to finish and return the output as a return value of the 'Run' subroutine, the 'Callback' method allows you to specify a subroutine as a CODEREF which will be called after every line. The 'Run' subroutine will now process line by line for all calls regardless of the 'Callback' method or not. o Added support for graceful break when terminating NetConnect with CTRL+C. Previously NetConnect would just terminate leaving the session still open, but now CTRL+C can be used to gracefully terminate any running scripts. If the device is a Cisco device then it will also send the CTRL+^ break sequence to the device. The actual sent break sequence can now ben specified using the 'break' attribute under the profile within the configuration. o Fixed a bug with regards to the prompts where NetConnect would fail if you tried to 'enable' after logging in. Also enhanced the prompts so no spaces are allowed. o Persistent history in interactive mode (CTRL+D) has been changed so it won't store duplicate entries, but will move duplicate entries to the front of the queue. ----- v1.40 - 16th August 2010 o The configuration file format has changed and no longer relies on YAML::Syck. This reduces the memory requirements as it doesn't need the YAML::Syck Perl module. o Fixed a bug which would cause the 'match' attribute of the 'expect' attribute to fail when using uppercase profile ids. o Added support for selecting nodes for the output report based on their profile (e.g. 'netc -rn profile:edb') o Added tab completion support to interactive mode (CTRL+D). o Added support for omitting quotes within interactive mode (CTRL+D) when entering commands at the 'netc>' prompt if only passing a single parameter. ----- v1.30 - 2nd August 2010 o Fixed a bug where warnings were being repeated o Changed default expect timeout to 10 seconds o netconnect.yaml is now deprecated o Scriptlets are now deprecated o Contexts (Redback specific) are now deprecated o Node comment has now been deprecated o Added multi node script support o Added "file:" syntax to select nodes for scripts o netc> is always initiated with CTRL-D o Added '?' support to netc> instead of tab o Execute a script from the netc> prompt "run script.ncs ddd=ddd ddd=ddd o Added support for persisitent netc> history using '!' o Support for CTRL-A, CTRL-E and CTRL-X on the netc> command line o Revamped error reporting and nested anonymous subroutines - massive rewrite o Changed the default unpriv and priv prompts to be better o Added aliases to allow us to run scripts quicker o Massive redesign of output report - scrapped indidivual output reports (i.e. profile one) o Added expect attribute to configuration file o Added the Verbose method to the ScriptObject o Added Interactive function to tell us if we are running from a netc> prompt o Changed sub Verbose behaviour to return the current verbosity level o Changed Config() to Profile() and added extended support of Node() o Added support for sub PID to return the parent PID ----- v1.27 - 11th May 2010 o Scriptlets can be executed when you connect to a device. o ScriptObject Run - Match support o Profile 'Prompt' option o ScriptObject Config - accessing Profile parameters. ----- v1.26 - 16th April 2010 o Added support for Scriptlets o Fixed an issue which caused Reflection 8.0.2 to hang when setting terminal title o When using proxies it shows multiple methods on connect screen ----- v1.25 - 30th March 2010 o Added support for multiple rn|rp|rc command line options to provide logical AND behaviour o Added support for 'log_dir' option within configuration to set default log directory o Added support for 'timeout' within profile configuration to change default expect timeout o Added support for script options and cleaned up error handing for scripts ----- v1.24 o Fixed prompt issue when it was matching non-prompts o '-rn group:' can now be shorted to '-rn g:' ----- v1.23 o Default config file now 'netc.yaml' ----- v1.22 o YAML Merge Keys support o Better error handling with null entries and YAML syntax errors ----- v1.21 o Support for 'execute' attribute on attributes ----- v1.20 o Added support for scripts (-x command line option) o The logfile is now optional and will be auto-generated if omitted o You can now include additional configuration files using 'include' o Added support for '-rn group:re' syntax