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 12-10-2014, 07:45 AM
dhucaby dhucaby is offline
Registered User
 
Join Date: Dec 2014
Posts: 1
Passing variables between scripts

I have written a logon script and I would like to be able to set a variable there, then pick up the same variable in a separate script that is manually run within the same session. Is there a way to pass variables between scripts in the same session?

Thanks!
Dave H
Reply With Quote
  #2  
Old 12-10-2014, 08:00 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,305
Hi Dave,

Thanks for the post. It isn't currently possible to perform direct inter-script communication.

It would be possible to write data to a file in one script, and then read the data from the file in another script.

Would this work for you?

Can you tell me more about what problem you are trying to solve?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #3  
Old 01-07-2015, 01:10 AM
morgun morgun is offline
Registered User
 
Join Date: Dec 2014
Posts: 8
Hello,

please advice method, how to give password from file to the script and dont store it in clear text
Reply With Quote
  #4  
Old 01-07-2015, 06:43 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,305
Hi morgun,

I am not sure that I fully understand your question.

Are you asking how to save a password in a file that is not in clear text, or are you asking how to pass the password from a file to a script, but not use clear text in memory?

If I understood more about what you are trying to accomplish, I could make some relevant suggestions.

Would you provide more specific details about your overall goal?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #5  
Old 01-07-2015, 02:35 PM
powerkor powerkor is offline
Registered User
 
Join Date: May 2012
Posts: 5
I would write a base64 encoding function and store it in a txt file, and the other script could read and decode it and delete the file when done... seems okay to me as long as the time between the two scripts is minimal. The only way you'd discover the file is looking in the slack space with a special tool and know to reverse it, if you find it with a base64 function.
Reply With Quote
  #6  
Old 01-08-2015, 04:13 PM
morgun morgun is offline
Registered User
 
Join Date: Dec 2014
Posts: 8
thanks powerkor.

I am trying to have script for automatic loging into devices. For this I need to store password in file and I dont want it to be cleartext.
can you please provide short code?
Lets say I will store it in "notpassword.txt"
and the password is "highlySECURE"

I need function to save encoded into file
and another function to open file and decode the password/hash

thanks
Reply With Quote
Reply

Tags
scripts , variables

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 06:31 AM.