Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Notices

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-09-2016, 06:25 PM
AndrewEK AndrewEK is offline
Registered User
 
Join Date: Dec 2010
Posts: 36
Example of script with HTTP/HTTPS Query

I'm looking for an example of a script which does a HTTP / HTTPS type of query request to an IP address and captures the response. Anyone have such an example?
Reply With Quote
  #2  
Old 11-10-2016, 07:59 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,636
Hi AndrewEK,

We don't have an example, but if all you need to do is "send a command" and "capture" the response, in SecureCRT it probably just comes down to using the Send() and ReadString() methods available to the Screen object.

Are you using SecureCRT on Windows or Mac/Linux (ie: VBScript or Python)?

For example (in VBScript):

crt.Screen.Send "MyHTTPCommand" & vbcr
strResult = crt.Screen.ReadString(strPrompt)


These methods are described in SecureCRT's Help topic Scripting / Script Objects Reference / Screen Object. The scripting manual is also a valuable resource if using VBScript.

Or do you not know the HTTP/HTTPS queries (commands) you need to run? If so, we cannot really help with that, as our products are not geared towards those protocols. We will leave that to the community.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 11-11-2016, 02:03 PM
AndrewEK AndrewEK is offline
Registered User
 
Join Date: Dec 2010
Posts: 36
SecureCRT is running on Windows PC and connected to a remote Linux machine via SSH or telnet, and uses VBasic scripts. You can't just crt.Screen.Send a "http://..." command to Linux as http / https are not Linux commands. Hence my question - How do you send a http / https type of query on the network that the Linux machine is connected to and capture the response?
Reply With Quote
Reply

Tags
http

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 11:59 AM.