Skip to main content
added 7004 characters in body
Source Link
Conor O'Brien
  • 40.2k
  • 3
  • 91
  • 180

[A]Glypho and [B]Somme, 747 bytes, vulnerablerevealed

Explanation

For this approach, I thought it would make sense to choose two languages which cared very little about the actual content of their source codes, and instead cared about some properties the code has.

Glypho is a language who cares about the distinct permutations formed by chunks of 4 bytes. It has 15 commands, and is a stack-based language. For example, the string UU{u corresponds to the push command, since it is equivalent to aabc (in terms of uniqueness).

Somme is a language which is usually a fairly innocuous stack-based language, but once multiple lines are involved, the columns are summed and converted into a corresponding command. (Addition is performed by treating space, 32, as 0, ! as 1, etc., then taking the result mod 95.)

Hence, the programs consist almost entirely of red herrings.

Recall that

Both [A] and [B] work:a string chosen because I thought it was funny.

Both Glypho and Somme work:

OnlyThis corresponds to the [A] worksGlypho (shorthand) program ([eeeeeeeeeee] is a loop that never runs):

11+d+d+[1d+d+d+dddd+d+dd++++1-+dod1d+d+d++oo1-+d1d+-+*1d+-+o1-+][eeeeeeeeeee]
11+                                                                 stack: 2
   d+d+                                                             stack: 8 (loop counter)
       [                                                    1-+]    loop 8 times
        1d+d+d+                                                     stack: LC, 8
               dddd                                                 stack: LC, 8, 8, 8, 8, 8
                   +d+dd++++                                        stack: LC, 8, 112
                            1-+                                     stack: LC, 8, 111
                               do                                   output and keep 'o'
                                 d1d+d+d++                          stack: LC, 8, 111, 119
                                          oo                        output 'wo'
                                            1-+                     stack: LC, 7
                                               d1d+-+*              stack: LC, 35
                                                      1d+-+         stack: LC, 33
                                                           o        output '!'
                                                            1-+     stack: LC-1

In Somme, this corresponds to the following program after the columns are summed:

F1+7*1-::8+\3B*m,m,m,m,m,m,m,m,0;!fw'@9AH     `
F                                                   stack: 15
 1+                                                 stack: 16
   7*1-                                             stack: 111
       ::                                           stack: 111, 111, 111
         8+\                                        stack: 111, 119, 111
            3B*                                     stack: 111, 119, 111, 33
               m,                                   map output (,) over stack
                 m,m,m,m,m,m,m,                     ...eight times in total
                               0;                   exit with exit code 0
                                 !fw'@9AH     `     (never executed)

Only Glypho works:

OnlyThis corresponds to the following [B] worksGlypho (shorthand) program:

1d+dd+*[11+d+d+dd+\1-+*1-+dddo1d+d+d++oo1d+d*d*d+1+o!1-+]!n
1d+dd+*                                                       stack: 8
       [                                             1-+]     loop 8 times
        11+d+d+dd+                                            stack: LC, 8, 16
                  \1-+*1-+dd                                  stack: LC, 8, 111, 111, 111
                            do                                output and keep 'o'
                              1d+d+d++                        stack: LC, 8, 111, 111, 119
                                      oo                      output 'wo'
                                        1d+d*d*d+1+           stack: LC, 8, 111, 33
                                                   o          output '!'
                                                    !         discard 111
                                                     1-+      stack: LC-1
                                                         !n   discard; no-op

And also to the (gibberish) Somme program:

u>B-t$?@+@@v)IUnX'PFK;~{k**bj2Q1J02is?F}zRC/)mmU-U-w

This errors out immediately because u is not a command that exists.

Only Somme works:

NeitherThis corresponds to the following Somme program:

F1+7*1-::8+\3B*r`,{`FF+2+*0;
F1+7*1-::8+\3B*                 same as previous
               r                reverse stack
                `,{`            push this string
                    FF+2+       push 32
                         *      execute that string 32 times
                                (once for each character)
                          0;    exit with exit code 0

And to the [A] nor(gibberish) [B] workGlypho (shorthand) program:

eeeeee*eeeeeeeeee-!ee-e1e1e[neeee]]eeeeeeee

This errors out immediately due to e (execute) having no parameters.

Neither [A] nor [B] work:

Didn't need to spend too much time here, since the answer was probably fine without it.

print("owo!"*8)
#&7("owo!"-1)

Good luckThanks for reading!

[A] and [B], 747 bytes, vulnerable

Both [A] and [B] work:

Only [A] works:

Only [B] works:

Neither [A] nor [B] work:

print("owo!"*8)
#&7("owo!"-1)

Good luck!

Glypho and Somme, 747 bytes, revealed

Explanation

For this approach, I thought it would make sense to choose two languages which cared very little about the actual content of their source codes, and instead cared about some properties the code has.

Glypho is a language who cares about the distinct permutations formed by chunks of 4 bytes. It has 15 commands, and is a stack-based language. For example, the string UU{u corresponds to the push command, since it is equivalent to aabc (in terms of uniqueness).

Somme is a language which is usually a fairly innocuous stack-based language, but once multiple lines are involved, the columns are summed and converted into a corresponding command. (Addition is performed by treating space, 32, as 0, ! as 1, etc., then taking the result mod 95.)

Hence, the programs consist almost entirely of red herrings.

Recall that

a string chosen because I thought it was funny.

Both Glypho and Somme work:

This corresponds to the Glypho (shorthand) program ([eeeeeeeeeee] is a loop that never runs):

11+d+d+[1d+d+d+dddd+d+dd++++1-+dod1d+d+d++oo1-+d1d+-+*1d+-+o1-+][eeeeeeeeeee]
11+                                                                 stack: 2
   d+d+                                                             stack: 8 (loop counter)
       [                                                    1-+]    loop 8 times
        1d+d+d+                                                     stack: LC, 8
               dddd                                                 stack: LC, 8, 8, 8, 8, 8
                   +d+dd++++                                        stack: LC, 8, 112
                            1-+                                     stack: LC, 8, 111
                               do                                   output and keep 'o'
                                 d1d+d+d++                          stack: LC, 8, 111, 119
                                          oo                        output 'wo'
                                            1-+                     stack: LC, 7
                                               d1d+-+*              stack: LC, 35
                                                      1d+-+         stack: LC, 33
                                                           o        output '!'
                                                            1-+     stack: LC-1

In Somme, this corresponds to the following program after the columns are summed:

F1+7*1-::8+\3B*m,m,m,m,m,m,m,m,0;!fw'@9AH     `
F                                                   stack: 15
 1+                                                 stack: 16
   7*1-                                             stack: 111
       ::                                           stack: 111, 111, 111
         8+\                                        stack: 111, 119, 111
            3B*                                     stack: 111, 119, 111, 33
               m,                                   map output (,) over stack
                 m,m,m,m,m,m,m,                     ...eight times in total
                               0;                   exit with exit code 0
                                 !fw'@9AH     `     (never executed)

Only Glypho works:

This corresponds to the following Glypho (shorthand) program:

1d+dd+*[11+d+d+dd+\1-+*1-+dddo1d+d+d++oo1d+d*d*d+1+o!1-+]!n
1d+dd+*                                                       stack: 8
       [                                             1-+]     loop 8 times
        11+d+d+dd+                                            stack: LC, 8, 16
                  \1-+*1-+dd                                  stack: LC, 8, 111, 111, 111
                            do                                output and keep 'o'
                              1d+d+d++                        stack: LC, 8, 111, 111, 119
                                      oo                      output 'wo'
                                        1d+d*d*d+1+           stack: LC, 8, 111, 33
                                                   o          output '!'
                                                    !         discard 111
                                                     1-+      stack: LC-1
                                                         !n   discard; no-op

And also to the (gibberish) Somme program:

u>B-t$?@+@@v)IUnX'PFK;~{k**bj2Q1J02is?F}zRC/)mmU-U-w

This errors out immediately because u is not a command that exists.

Only Somme works:

This corresponds to the following Somme program:

F1+7*1-::8+\3B*r`,{`FF+2+*0;
F1+7*1-::8+\3B*                 same as previous
               r                reverse stack
                `,{`            push this string
                    FF+2+       push 32
                         *      execute that string 32 times
                                (once for each character)
                          0;    exit with exit code 0

And to the (gibberish) Glypho (shorthand) program:

eeeeee*eeeeeeeeee-!ee-e1e1e[neeee]]eeeeeeee

This errors out immediately due to e (execute) having no parameters.

Neither [A] nor [B] work:

Didn't need to spend too much time here, since the answer was probably fine without it.

print("owo!"*8)
#&7("owo!"-1)

Thanks for reading!

Source Link
Conor O'Brien
  • 40.2k
  • 3
  • 91
  • 180

[A] and [B], 747 bytes, vulnerable

S = owo!owo!owo!owo!owo!owo!owo!owo!

Both [A] and [B] work:

UU{uOOwo!??!oOoOowwoSRSR<ww<W!WOOOw0oWoW>ww>!
!
owwo!0!0
!!
QwQwOwOw!?!?.,.,owwo@?@?<ww<W!W!OwOwoWWo>ww>!

!owwo!!0w
!W
QwwQOwOw!???oOoOoow
@?@?<ww<W!W!OwwOoWoW>ww>!

!owww!000

!WQwqQOwwO!?!?ooO!owow@??@<w><W!!WOww0ooW!>w>w!

!owOo!00!
SSSQQwqOwoO!??!oO!O>!>?
#A` C=Z6fyC[U`SSmT5@)m`>3] =^OE^;"owO!"*4/qK_(_

Only [A] works:

[[4]?!?!?00?OwOw
o
oo  owoo
0 0o]]4[00wO<!!<w#w#?##?owow[44[?!?!?0?0OwwO

oooo 0wo
w0  0]44[00wO<!?<w##w?#?#owow[8[8?!!!??0wOwOw
oo
o o woow0 0 ]44]0ww0<!!!w###??#wowow[ww[?!?!?00wOwOw
##>o o woow00 o]44]0www<!??ww#""#w"owwo"4*4/q]]]]]]

Only [B] works:

if print("owO") then: #V
  print("Owo")
end
#e0;*~E>dbqAMz}+Gra=y:Pie
between each output call, do:
  print("!")     n[\@6l{: 0
end
repeat twice
X[*g20@"kW({4L-rSk$w.4})~*;Ke

Neither [A] nor [B] work:

print("owo!"*8)
#&7("owo!"-1)

Good luck!