Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #16  
Old 04-06-2012, 10:52 AM
zeunasc zeunasc is offline
Registered User
 
Join Date: Apr 2012
Posts: 9
PERFECT!

Thank you both so much for the help! The script works perfectly!
Reply With Quote
  #17  
Old 04-06-2012, 11:00 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,140
Hi zeunasc,

Great, thanks for posting the update!
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #18  
Old 04-11-2012, 12:35 PM
ddnllc ddnllc is offline
Registered User
 
Join Date: Apr 2012
Posts: 7
Sample of the final script.

Hello. The script mentioned above seems to be very similar to what I need to accomplish. Will you please provide a sample of the final script? Thanks.
Reply With Quote
  #19  
Old 05-27-2017, 07:57 AM
hooknife hooknife is offline
Registered User
 
Join Date: Mar 2007
Posts: 28
I know this thread is old but I wanted to see if you would please provide a copy of your working script?

Thanks in advance!
Reply With Quote
  #20  
Old 08-09-2017, 06:57 PM
aaronfneal aaronfneal is offline
Registered User
 
Join Date: Oct 2015
Posts: 2
Lightbulb Follow Up Any One?

Is there a follow up thread or post to this. It was great and would love to see the finished product.
Reply With Quote
  #21  
Old 08-10-2017, 03:18 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,140
Hi aaronfneal,

I am not sure zeunasc ever posted a copy of the final, completed script, but he did post much of the code and any changes discussed after that post also include code snippets.

The most complete full script seems to be in this post.

If you make the tweaks to the script that were suggested after post #12, does it help you to accomplish your objective?
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #22  
Old 08-24-2017, 08:19 AM
thera34's Avatar
thera34 thera34 is offline
Registered User
 
Join Date: May 2015
Location: Romania
Posts: 6
Hey guys,

I made a similar script, feel free to test it out

It has a different approach, as I personalized it for my own environments.
Basically you need to be connected to a Unix/Linux jump station from which you can access the network you manage. Also added some few checks in it (like ping, ssh/telnet etc).
And for obvious security reasons, you will be prompted at the beginning for username/password/etc

Please let me know if you like/hate/have questions about it.
This script works flawless in my networks, any improvement ideas will be highly appreciated
------------------------------
Usage requirements:
1. SecureCRT
2. To be connected to an Unix/Linux Terminal Server from which you have access to the target network
3. You will be prompted for MAC address (in Cisco format) , the core switch IP and credentials
Attached Files
File Type: txt MAC_Finder_for_Cisco.vbs.txt (14.6 KB, 26 views)
Reply With Quote
  #23  
Old 08-24-2017, 10:18 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,140
Hi thera34,

Thanks for contributing to the forum community!
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #24  
Old 08-28-2017, 08:50 AM
hooknife hooknife is offline
Registered User
 
Join Date: Mar 2007
Posts: 28
Quote:
Originally Posted by thera34 View Post
Hey guys,

I made a similar script, feel free to test it out

It has a different approach, as I personalized it for my own environments.
Basically you need to be connected to a Unix/Linux jump station from which you can access the network you manage. Also added some few checks in it (like ping, ssh/telnet etc).
And for obvious security reasons, you will be prompted at the beginning for username/password/etc

Please let me know if you like/hate/have questions about it.
This script works flawless in my networks, any improvement ideas will be highly appreciated
------------------------------
Usage requirements:
1. SecureCRT
2. To be connected to an Unix/Linux Terminal Server from which you have access to the target network
3. You will be prompted for MAC address (in Cisco format) , the core switch IP and credentials
First off - THANK YOU!

I'm a scripting beginner so please excuse my ignorance. Is there a way of running this on a Windows machine?

Thanks again!
Reply With Quote
  #25  
Old 08-28-2017, 09:39 AM
ekoranyi ekoranyi is offline
VanDyke Technical Support
 
Join Date: Jan 2017
Posts: 266
Hi hooknife,

To run this script you would choose Run from SecureCRT's main Script drop down menu. You would then navigate to where you have saved the script and select it.

Using these steps are you able to successfully run the script that was provided?
__________________
Thanks,
--Eric

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #26  
Old 08-28-2017, 09:47 AM
hooknife hooknife is offline
Registered User
 
Join Date: Mar 2007
Posts: 28
Quote:
Originally Posted by ekoranyi View Post
Hi hooknife,

To run this script you would choose Run from SecureCRT's main Script drop down menu. You would then navigate to where you have saved the script and select it.

Using these steps are you able to successfully run the script that was provided?
I was asking because of the requirements listed in the script itself. Take a look a number two below. Again, please excuse me if I'm missing something obvious.

Usage requirements:
1. SecureCRT
2. To be connected to an Unix/Linux Terminal Server from which you have access to the target network
3. You will be prompted for MAC address (in Cisco format) , the core switch IP and credentials
Reply With Quote
  #27  
Old 08-28-2017, 09:55 AM
ekoranyi ekoranyi is offline
VanDyke Technical Support
 
Join Date: Jan 2017
Posts: 266
Hi hooknife,

It appears the script was designed to be ran on a Windows machine, it does require that SecureCRT be connected to a terminal server. You would launch SecureCRT on your Windows machine, connect to a terminal server that has access to your Cisco devices, then launch the script from SecureCRT.

Do you have access to a terminal server that you can connect to using SecureCRT?
__________________
Thanks,
--Eric

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #28  
Old 08-28-2017, 10:05 AM
hooknife hooknife is offline
Registered User
 
Join Date: Mar 2007
Posts: 28
No, unfortunately. Any way around this requirement?
Reply With Quote
  #29  
Old 08-28-2017, 12:14 PM
ekoranyi ekoranyi is offline
VanDyke Technical Support
 
Join Date: Jan 2017
Posts: 266
Hi hooknife,

This script may be able to be modified although it may require some extensive work. It appears it uses the Terminal Server to make the connections to each switch.

How are you connecting to your devices? Are you connecting directly to each switch?
__________________
Thanks,
--Eric

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #30  
Old 08-29-2017, 07:31 AM
thera34's Avatar
thera34 thera34 is offline
Registered User
 
Join Date: May 2015
Location: Romania
Posts: 6
Hi hooknife,

ekoranyi got it right. I use SecureCRT from a Windows machine to connect to a Linux terminal server first. From there I can connect to the rest of my networks

If you connect directly to your switches from a Windows machine, could be a good idea to play around with the ConnectInTab function.
Something like:

new_session = "/ssh2 /accepthostkeys " & strIP
Set tab = crt.session.ConnectInTab(new_session)

Be aware the above is just a suggestion and a very raw pseudo-code (didn't actually tried it myself).
Maybe some others here have more experience with this technique

Cheers,
Adrian

Last edited by thera34; 08-29-2017 at 08:02 AM. Reason: new idea
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 2 (0 members and 2 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 08:25 PM.