Sujet : Re: The lost key
De : chris.m.thomasson.1 (at) *nospam* gmail.com (Chris M. Thomasson)
Groupes : sci.cryptDate : 30. Mar 2025, 20:52:15
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vsc7dg$28n4g$2@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : Mozilla Thunderbird
On 3/30/2025 12:32 PM, Rich wrote:
Marcel Logen <333200007110-0201@ybtra.de> wrote:
Rich in sci.crypt:
>
Marcel Logen <333200007110-0201@ybtra.de> wrote:
Rich in sci.crypt:
Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
>
[...]
>
No, you have now /discovered/ that "the command shell" interprets some
characters itself, and not passing them through to the command.
>
Perhaps he uses the "here documents" feature of the shell.
>
That is possible, but even so, there's two versions of here docs, one
that interpretes shell metacharacters and one that does not. Using the
'interpreting' variant would produce the same results.
^ not (?)
The word 'same' there was referring to the output Chris received,
although looking it over now, that was also an ambigious back
reference.
| user15@o15:/tmp$ ./scos2-ok e 55 77 <<"EOF"
| > Hello World, this is a test. And I will see what happens.
| > EOF
| !(8sf <|#5h[ R@&9 jd > \86r( 7@4 T rNA[ *mW Y?"^ mPO\$5u+
|
>
| user15@o15:/tmp$ ./scos2-ok d 55 77 <<qqqq
| > !(8sf <|#5h[ R@&9 jd > \86r( 7@4 T rNA[ *mW Y?"^ mPO\$5u+
| > qqqq
| Hello World, this is a test. And I will see what hapOXc_
|
>
| user15@o15:/tmp$ ./scos2-ok d 55 77 <<"qqqq"
| > !(8sf <|#5h[ R@&9 jd > \86r( 7@4 T rNA[ *mW Y?"^ mPO\$5u+
| > qqqq
| Hello World, this is a test. And I will see what happens.
>
man bash, chapter "Here Documents":
>
| If any part of word is quoted, the delimiter is the
| result of quote removal on word, and the lines in the
| here-document are not expanded. If word is
| unquoted, all lines of the here-document are
| subjected to parameter expansion, command substitution,
| and arithmetic expansion, the character sequence
| \<newline> is ignored, and \ must be used to quote
| the characters \, $, and `.
>
"word" is here "EOF" or "qqqq".
We (you and I) do not know:
1) if chris was even using here docs -- he *might* very well be trying to
pass SCOS input via a CLI parameter;
2) in the case he was using here docs, we don't know which one he used
-- if he used the unquoted version, then it is likely at least one meta
character was consumed by the unquoted here doc
espansions/substitutions, and if that happens, all characters after
that point become garbled.
The \ quotes the $ sign before the 5 in the qqqq
version.
Yes, one can escape the metacharacters in the unquoted here doc
version. But, under the assumption Chris was using here docs, did Chris
perform the escaping, and perform the escaping correctly?
I am using the damn command line from windows:
Microsoft Windows [Version 10.0.26100.3476]
Yikes! ;^o