problem with @YENCODE

Aug 2, 2011
258
4
Berlin, Germany
I want to see what @yencode is doing, but it doesn't work for me.
What am I doing wrong?
Code:
F:\Temp >ver /r

TCC  14.00.30 x64   Windows 7 [Version 6.1.7601]
TCC Build 30   Windows 7 Build 7601  Service Pack 1
Registered to ...
 
F:\Temp >echo %@hexENcode[s,Password]
50617373776f7264

F:\Temp >echo %@hexDEcode[s,50617373776f7264]
Password

F:\Temp >echo %@yencode[s,50617373776f7264]
TCC: No closing quote
 

rconn

Administrator
Staff member
May 14, 2008
12,344
149
I want to see what @yencode is doing, but it doesn't work for me.
What am I doing wrong?

WAD -- what you're doing wrong is using ECHO to display the output.

@YENCODE is returning this result:

=ybegin line=128 size=16_Z`[a]a]aa`a\`^=yend size=16 crc32=aa2aedda

That is passed as an argument to ECHO, the parser sees that there is a mismatch on the number of backquotes in the line, and it displays the "no closing quote" error message.
 
Aug 2, 2011
258
4
Berlin, Germany
WAD -- what you're doing wrong is using ECHO to display the output.

@YENCODE is returning this result:

=ybegin line=128 size=16_Z`[a]a]aa`a\`^=yend size=16 crc32=aa2aedda

That is passed as an argument to ECHO, the parser sees that there is a mismatch on the number of backquotes in the line, and it displays the "no closing quote" error message.
Ok, that's evident.
But what can I do with this function at all, if the result string is so unhandily?
The only method I can imagine is a "here redirection".
 

rconn

Administrator
Staff member
May 14, 2008
12,344
149
Ok, that's evident.
But what can I do with this function at all, if the result string is so unhandily?
The only method I can imagine is a "here redirection".

I can't imagine why you would ever want to use @YENCODE to echo something to the display. Normally you would write the output to a file; if you need to put it in a string/environment variable you would normally assign it and then use that variable directly. If you feel compelled to write dubious output to the display, use the SAFECHARS plugin.
 
Aug 2, 2011
258
4
Berlin, Germany
I had the vision to obfuscate passwords with it (my colleague allways says "if you have visions, got to a doctor" :)) .
And I thought I can try back and forth like with @hex en/de code.
Never mind.
 
May 31, 2008
382
2
Example with the SAFECHARS plugin (below * stands for a safe-encoded character)
Code:
C:\temp>echo %@SAFEEXP[@yencode[s,50617373776f7264]]
=ybegin line=128 size=16
_Z**a*a*aa*a\**
=yend size=16 crc32=aa2aedda
 
C:\temp>SAFEECHO %@SAFEEXP[@yencode[s,50617373776f7264]] >uuu
 
C:\temp>type uuu
=ybegin line=128 size=16
_Z`[a]a]aa`a\`^
=yend size=16 crc32=aa2aedda
 
Similar threads
Thread starter Title Forum Replies Date
Dick Johnson Weird Color Problem Support 8
fishman@panix.com Problem with 27.15 Support 2
M Problem with VSDevCmd.bat in VS 16.7.3 Support 0
R Problem with @INT[ value] in V26 Support 9
M Selecting test "off by one" problem in Take command Support 4
Alpengreis UTF-8 problem in TCC related to Python Support 7
K_Meinhard Small problem in german IDE 26 Support 3
B Problem with color in nested shells Support 1
Joe Caverly Problem creating and switching to a DESKTOP Support 9
vefatica Another popup problem Support 10
Alpengreis ffind dialog (/W) problem Support 4
Alpengreis [TCMD v25.00.24] Small space problem with the DE translation in Prefs-GUI Support 1
Alpengreis [TCMD v25.00.24] Problem with copy and paste and the # char via mouse in TCC Support 6
A Problem with functions @int @decimal and identifying Powershell as a shell. Support 12
B IF command problem in tcexit.btm Support 9
fishman@panix.com Problem at Startup of TCC Support 3
P Problem with SFTP copies Support 7
P Problem with FTP copies Support 10
Jay Sage Problem with Context Menu Copy+Paste+Run Key Assignment Support 7
R Problem with %_do_loop in nested do loops Support 2
fishman@panix.com New Problem with later Windows 10 Support 10
Peter Murschall A little problem with LEAVE and COMMENT Support 5
M Handling of %~I problem Support 4
WinLanEm FOR problem Support 18
K Problem With SCRPUT /u Support 3
vefatica What's TCMD's problem with ^e[0m? Support 13
Peter Murschall IDE: RTL with non-English resources-problem is back in Build 28 Support 4
rps Regex problem: \xnn not recognized as a hex character Support 0
rps PRIORITY LOW problem Support 1
old coot Regex problem: \xnn not recognized as a hex character Support 12
vefatica Another problem with build 22. Support 3
Alpengreis [23.x] Download-Problem Support 2
S Problem with " Support 3
C Problem navigating forums Support 11
x13 Problem listing repository files using DIR http(s)://... Support 8
Joe Caverly Problem with TEE in v22 Support 2
Alpengreis Problem with thousands delimiter and colors Support 17
M Take Command 18, migrating to another machine, license problem. Support 1
B TCC 21.01.50 Problem with ALIAS /r and SET /r Support 2
rps How to? @search problem Support 2
WinLanEm @SELECT problem Support 6
T Fixed Problem with use of Batch parameters in the IDE Support 1
Oz Solomon Problem with "list" Support 14
S V21.24 theme problem Support 2
Alpengreis Problem if command prompt is not legacy Support 4
Alpengreis TCMD.INI: The "super hidden" problem ... Support 6
G Odd problem - screen brightness Support 4
rps V20 In-process pipes problem Support 8
Alpengreis Again theme problem [v20.0.21]? Support 11
WinLanEm INPUT problem Support 1

Similar threads