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 01-07-2018, 12:23 PM
bstedh bstedh is offline
Registered User
 
Join Date: Jan 2018
Posts: 41
Get session IP

I need to get the Ip address that a tab is connected to.

I assume it would be the following command with a different parameter??

Code:
szSessionOption = crt.Session.Config.GetOption("Script Filename")
MsgBox szSessionOption
I can not hard code it because users will be connecting to different servers through different methods. ssh from jumbox will be the most problematic as the server ip will not be the session ip... but most will be connecting in a new tab port forwarded from the jumbox firewall.
__________________
Version 6.7.3 (build 292)
Reply With Quote
  #2  
Old 01-08-2018, 08:22 AM
ekoranyi ekoranyi is offline
VanDyke Technical Support
 
Join Date: Jan 2017
Posts: 654
Hi bstedh,

There are a couple of options. You could use the method you touched on using the Hostname parameter like:
Code:
strHostname = crt.Session.Config.GetOption("Hostname")
crt.Dialog.MessageBox strHostname
Or you could get at the Remote Address using:

Code:
strRemoteAddress = crt.Session.RemoteAddress
crt.Dialog.MessageBox strRemoteAddress
Do either of these options give you the results you're looking for?
__________________
Thanks,
--Eric

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 01-09-2018, 12:50 PM
bstedh bstedh is offline
Registered User
 
Join Date: Jan 2018
Posts: 41
I will give that a try. It looks to be exactly what I was looking for. I just published a document on how all users should setup their Secure CRT so that the script doesn't break because they are using different setups.
__________________
Version 6.7.3 (build 292)
Reply With Quote
  #4  
Old 01-09-2018, 12:56 PM
ekoranyi ekoranyi is offline
VanDyke Technical Support
 
Join Date: Jan 2017
Posts: 654
Hi bstedh,

It's nice to hear that it's working for you.

Have a great rest of the day.
__________________
Thanks,
--Eric

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
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 01:06 AM.