|
#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 |
#2
|
|||
|
|||
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? |
#3
|
|||
|
|||
Hello,
please advice method, how to give password from file to the script and dont store it in clear text |
#4
|
|||
|
|||
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? |
#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.
|
#6
|
|||
|
|||
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 |
![]() |
Tags |
scripts , variables |
Thread Tools | |
Display Modes | Rate This Thread |
|
|