Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-27-2017, 11:04 AM
mike1572 mike1572 is offline
Registered User
 
Join Date: Apr 2010
Posts: 10
Script fails after latest upgrade

This script worked great until i upgraded to the latest version of SecureCRT.
Any ideas on how to fix it? I cant live without this script, its a life saver.

here is a screenshot of the error that i get.

[IMG]ftp://208.40.72.165/2017-06-27_125723.jpg[/IMG]
Attached Images
File Type: jpg 2017-06-27_125723.jpg (606.0 KB, 136 views)
Attached Files
File Type: zip Cisco-SaveDeviceConfigToFile.zip (4.8 KB, 117 views)
Reply With Quote
  #2  
Old 06-27-2017, 12:22 PM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 920
I can confirm that in version 8.1.3, the usage of that specific platform python module is now broken.

I've created a bug report so that our development team can investigate.

In the mean time, there are some workarounds you can employ to get the script working for you, since it's known that you're running SecureCRT on Windows. These steps are given in a specific order designed to ensure that line numbers associated with each instruction don't change out from underneath you.
  1. Remove line #370 (strOSVer = platform.release()). It's spurious and not even needed in the original.

  2. Remove lines 121-137 (from if not os.path.isdir(g_strMyDocs) through g_strMyDocs = strHome), since you're not on Windows XP or Mac OS X.

  3. Remove line #117 (strOSver = platform.release())

Do those steps help get you back into operation with the script running in version 8.1.3?

--Jake
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support
Reply With Quote
  #3  
Old 06-27-2017, 12:48 PM
mike1572 mike1572 is offline
Registered User
 
Join Date: Apr 2010
Posts: 10
Fixed

Thanks JDEV, as usual, you fixed it!!

Also just as a note, incase anyone else uses this script, I edit line 224 from the original you made with me some time back.

Instead of a show run, it issues a command that results in a show run that INCLUDES all pre-shared keys on ASA configuration saves, as a SHOW RUN does not show these, it only saves as *****'s

This is the new line 224 that saves the keys in plain text.
strCmd = "more system:running-config\r"

Attached is the script with the fixes you sent me.
"Fixed-6-27-2017_Cisco-SaveDeviceConfigToFile.zip"
Attached Files
File Type: zip Fixed-6-27-2017_Cisco-SaveDeviceConfigToFile.zip (4.5 KB, 108 views)
Reply With Quote
  #4  
Old 06-27-2017, 04:29 PM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 920
Quote:
Originally Posted by mike1572 View Post
Thanks JDEV, as usual, you fixed it!!
Glad to hear the changes worked for you.

Quote:
Originally Posted by mike1572 View Post
Also just as a note, incase anyone else uses this script, I edit line 224 from the original you made with me some time back.

Instead of a show run, it issues a command that results in a show run that INCLUDES all pre-shared keys on ASA configuration saves, as a SHOW RUN does not show these, it only saves as *****'s

This is the new line 224 that saves the keys in plain text.
strCmd = "more system:running-config\r"
Thanks for the explanation. I've updated the Cisco Save Running Config to File example script in the script sticky so all can benefit from the changes.

--Jake
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 09:42 AM.