Need help, is there a common string encoding / decoding tool for php and the windows console (cmd / PowerShell)? More authoritative with the use of the key. Thank.
The situation is as follows. You need to create files for rdp connection, so that the user does not see the password. I try to create .bat files and if the password is stored in its pure form, the connection is triggered, when I try to use the banal base64 everything breaks.
@echo off doskey decode64=powershell "[Text.Encoding]::UTF8.GetString([convert]::FromBase64String(\"$*\"))" SET IP=xxx.xxx.xxx.xxx SET USERNAME=user SET EncodePass=xxxxx SET DOMAIN=MYDOMAIN start cmdkey /generic:"%IP%" /user:"%USERNAME%" /pass: call decode64 %EncodePass% start mstsc /f /v:"%IP%"
In this case, base64 encryption on windows and on the server (php) give different values. And for good I would like to use the encryption key.