Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- original code https://pastebin.com/Gz3dDwra
- console output
- increasing number of percent signs, set without quotes, echo without quotes
- Environment variable testvar not defined
- 1
- testvar=%
- 2 %
- testvar=%
- 3 %
- testvar=%%
- 4 %%
- testvar=%%
- 5 %%
- testvar=%%%
- 6 %%%
- testvar=%%%
- 7 %%%
- testvar=%%%%
- 8 %%%%
- observations : single percentsigns are discarded, double percentsigns are reduced to one
- three percentsigns, two of them get reduced to one and the extra is discarded
- four percentsigns gets reduced to two and so on
- increasing number of percent signs, set with quote, echo without quote
- Environment variable testvar not defined
- 1
- testvar=%
- 2 %
- testvar=%
- 3 %
- testvar=%%
- 4 %%
- testvar=%%
- 5 %%
- testvar=%%%
- 6 %%%
- testvar=%%%
- 7 %%%
- testvar=%%%%
- 8 %%%%
- observation, putting set variable in quotes had no effect on percentsigns parsing
- increasing number of percent signs, set without quotes, echo with quotes
- Environment variable testvar not defined
- 1 ""
- testvar=%
- 2 "%"
- testvar=%
- 3 "%"
- testvar=%%
- 4 "%%"
- testvar=%%
- 5 "%%"
- testvar=%%%
- 6 "%%%"
- testvar=%%%
- 7 "%%%"
- testvar=%%%%
- 8 "%%%%"
- observation, putting echo variable in double quotes had no effect on percentsigns parsing
- increasing number of percent signs, set with quote, echo with quote
- Environment variable testvar not defined
- 1 ""
- testvar=%
- 2 "%"
- testvar=%
- 3 "%"
- testvar=%%
- 4 "%%"
- testvar=%%
- 5 "%%"
- testvar=%%%
- 6 "%%%"
- testvar=%%%
- 7 "%%%"
- testvar=%%%%
- 8 "%%%%"
- observation, again doublequotes have had no effect on percent sign parsing
- increasing number of percent signs, set without quotes, echo without quotes
- added letter A or B alternating before and after every percentsign
- testvar=AB
- 1 AB
- testvar=AA
- 2 AA
- testvar=AAB
- 3 AAB
- testvar=AAA
- 4 AAA
- testvar=AAAA
- 5 AAAA
- testvar=AAAA
- 6 AAAA
- testvar=AAAAB
- 7 AAAAB
- testvar=AAAAA
- 8 AAAAA
- observation, all characters enclosed between sets of percentsigns are expanded into variable
- in this case, empty variables
- increasing number of percent signs, set with quotes, echo without quotes
- added letter A or B alternating before and after every percentsign
- testvar=AB
- 1 AB
- testvar=AA
- 2 AA
- testvar=AAB
- 3 AAB
- testvar=AAA
- 4 AAA
- testvar=AAAA
- 5 AAAA
- testvar=AAAA
- 6 AAAA
- testvar=AAAAB
- 7 AAAAB
- testvar=AAAAA
- 8 AAAAA
- observation, set with quotes had no effect of percentsign parsing
- increasing number of percent signs, set without quotes, echo with quotes
- added letter A or B alternating before and after every percentsign
- testvar=AB
- 1 "AB"
- testvar=AA
- 2 "AA"
- testvar=AAB
- 3 "AAB"
- testvar=AAA
- 4 "AAA"
- testvar=AAAA
- 5 "AAAA"
- testvar=AAAA
- 6 "AAAA"
- testvar=AAAAB
- 7 "AAAAB"
- testvar=AAAAA
- 8 "AAAAA"
- observation, echo with quotes had no effect of percentsign parsing
- increasing number of percent signs, set with quotes, echo with quotes
- added letter A or B alternating before and after every percentsign
- testvar=AB
- 1 "AB"
- testvar=AA
- 2 "AA"
- testvar=AAB
- 3 "AAB"
- testvar=AAA
- 4 "AAA"
- testvar=AAAA
- 5 "AAAA"
- testvar=AAAA
- 6 "AAAA"
- testvar=AAAAB
- 7 "AAAAB"
- testvar=AAAAA
- 8 "AAAAA"
- observation, set and set with quotes had no effect of percentsign parsing
- increasing number of percent signs, set without quotes, echo without quotes
- added letter AAA or BBB alternating before and after every percentsign
- testvar=AAABBB
- 1 AAABBB
- testvar=AAAAAA
- 2 AAAAAA
- testvar=AAAAAABBB
- 3 AAAAAABBB
- testvar=AAAAAAAAA
- 4 AAAAAAAAA
- testvar=AAAAAAAAAAAA
- 5 AAAAAAAAAAAA
- testvar=AAAAAAAAAAAA
- 6 AAAAAAAAAAAA
- testvar=AAAAAAAAAAAABBB
- 7 AAAAAAAAAAAABBB
- testvar=AAAAAAAAAAAAAAA
- 8 AAAAAAAAAAAAAAA
- 'observation' is not recognized as an internal or external command,
- operable program or batch file.
- increasing number of percent signs, set with quotes, echo without quotes
- added letter AAA or BBB alternating before and after every percentsign
- testvar=AAABBB
- 1 AAABBB
- testvar=AAAAAA
- 2 AAAAAA
- testvar=AAAAAABBB
- 3 AAAAAABBB
- testvar=AAAAAAAAA
- 4 AAAAAAAAA
- testvar=AAAAAAAAAAAA
- 5 AAAAAAAAAAAA
- testvar=AAAAAAAAAAAA
- 6 AAAAAAAAAAAA
- testvar=AAAAAAAAAAAABBB
- 7 AAAAAAAAAAAABBB
- testvar=AAAAAAAAAAAAAAA
- 8 AAAAAAAAAAAAAAA
- 'observation' is not recognized as an internal or external command,
- operable program or batch file.
- increasing number of percent signs, set without quotes, echo with quotes
- added letter AAA or BBB alternating before and after every percentsign
- testvar=AAABBB
- 1 "AAABBB"
- testvar=AAAAAA
- 2 "AAAAAA"
- testvar=AAAAAABBB
- 3 "AAAAAABBB"
- testvar=AAAAAAAAA
- 4 "AAAAAAAAA"
- testvar=AAAAAAAAAAAA
- 5 "AAAAAAAAAAAA"
- testvar=AAAAAAAAAAAA
- 6 "AAAAAAAAAAAA"
- testvar=AAAAAAAAAAAABBB
- 7 "AAAAAAAAAAAABBB"
- testvar=AAAAAAAAAAAAAAA
- 8 "AAAAAAAAAAAAAAA"
- 'observation' is not recognized as an internal or external command,
- operable program or batch file.
- increasing number of percent signs, set with quotes, echo with quotes
- added letter AAA or BBB alternating before and after every percentsign
- testvar=AAABBB
- 1 "AAABBB"
- testvar=AAAAAA
- 2 "AAAAAA"
- testvar=AAAAAABBB
- 3 "AAAAAABBB"
- testvar=AAAAAAAAA
- 4 "AAAAAAAAA"
- testvar=AAAAAAAAAAAA
- 5 "AAAAAAAAAAAA"
- testvar=AAAAAAAAAAAA
- 6 "AAAAAAAAAAAA"
- testvar=AAAAAAAAAAAABBB
- 7 "AAAAAAAAAAAABBB"
- testvar=AAAAAAAAAAAAAAA
- 8 "AAAAAAAAAAAAAAA"
- 'observation' is not recognized as an internal or external command,
- operable program or batch file.
- increasing number of percent signs
- added letter AAA or BBB alternating before and after every percentsign
- This one will have 8 percent signs with various locations to include doublequotes
- testvar=A"AAAAAAAAAAAAAA
- 1 A"AAAAAAAAAAAAAA
- testvar=AAAAAAAAAAAAAAA
- 2 AAAAAAAAAAAAAAA
- testvar=AAAAA"AAAAAAAAAA
- 3 AAAAA"AAAAAAAAAA
- testvar=AAAAA"AAAAAAAAAA
- 4 AAAAA"AAAAAAAAAA
- testvar=A"AAAA"AAAAAAAAAA
- 5 A"AAAA"AAAAAAAAAA
- testvar=AAA"AAAAAAAAAAAA
- 6 AAA"AAAAAAAAAAAA
- testvar=A"A"AAAAAAAAAAAAA
- 7 A"A"AAAAAAAAAAAAA
- testvar=AAAAAAAAAAAAAAA
- 8 AAAAAAAAAAAAAAA
- testvar=AAAAAAAAAAAAAAA
- 9 AAAAAAAAAAAAAAA
- testvar=AAAAAAAAAAAAAAA
- 1 AAAAAAAAAAAAAAA
- testvar=AAAAAAAAAAA"AAAA
- 2 AAAAAAAAAAA"AAAA
- testvar=AAAAAAAAAAA"AAAA
- 3 AAAAAAAAAAA"AAAA
- testvar=AAAAAAAAA"A"A"AAAA
- 4 AAAAAAAAA"A"A"AAAA
- testvar=AAAAAAAAAA"A"A"AAA
- 5 AAAAAAAAAA"A"A"AAA
- testvar=AAAAAAAAA"A"A"A"AAA
- 6 AAAAAAAAA"A"A"A"AAA
- observation, no matter where the quotes are places, appears to have no impact on the percentsign parsing
- same pattern as previous, this time with added carrets ^ for escaping percent signs
- Doublequotes are left in, expected to have no effects on percent sign parsing
- testvar=A"AA^AAAAAAAAAAAA
- 1 A"AA^AAAAAAAAAAAA
- testvar=AAAAAAAAAAAAAAA
- 2 AAAAAAAAAAAAAAA
- testvar=AAAAA"AAAAAAAAAA
- 3 AAAAA"AAAAAAAAAA
- testvar=AAAAA"AAA^AAAAAAA
- 3 AAAAA"AAA^AAAAAAA
- testvar=AAAAA"AAA^AAAAAAA
- 3 AAAAA"AAA^AAAAAAA
- testvar=AAA^AA"AAA^AAAAAAA
- 3 AAAAA"AAA^AAAAAAA
- testvar=AAA^AA"AAA^AAAAAAA
- 3 "AAA^AA"AAAAAAAAAA"
- testvar=^AAA^^AA"AAAAA^AAA^AA
- 3 "^AAA^^AA"AAAAAAAAAA"
- observation, carrets appear to have no effect on percentsign parsing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement