Skip to main content
deleted 29 characters in body
Source Link
Eric Duminil
  • 1.1k
  • 8
  • 12

Dingus, Ruby and Dingus, Ruby

One password for both Ruby challenges by Dingus is:

G=->*x{i=0;i+=1 while x[0][i]!~x[1];x[0][i]};Q=method G[methods,/^[o-q]ri/];C=method G[q=Q[],/[o-r]ut[b-d]/];D=method G[q,/^de/];P=G[q,/^[o-r]\z/];D[P]{|x|};C[34];C[34];C[34];C[10]

Try it online! & Try it online!

  • Gets access to putc by listing all the available (private) methods and filters them with regexen.
  • Also redefines p to not do anything.
  • a lambda is used instead of def
  • method :method_name with [] is used instead of ()
  • . cannot be used, so only the methods for Object and Kernel are available
  • Since putc is available, any string could be written.

FORTRAN like code:

GET_METHODGREP = ->*xlambda do |l,r|
  i=0
  while x[0][i]l[i]!~x[1]~r do
    i+=1
  end
  x[0][i]l[i]
end
PRIVATE_METHODs=method GET_METHOD[methodsGREP[methods,/^[o-q]ri/]
PUTC=method GET_METHOD[PRIVATE_METHODs[]GREP[PRIVATE_METHODs[],/[o-r]ut[b-d]/]
DEFINE_METHOD=method GET_METHOD[PRIVATE_METHODs[]GREP[PRIVATE_METHODs[],/^de/]
P=GET_METHOD[PRIVATE_METHODs[]P=GREP[PRIVATE_METHODs[],/^[o-r]\z/]
DEFINE_METHOD[P]{|x|}
PUTC[34]
PUTC[34]
PUTC[34]
PUTC[10]

Try it online!Try it online!

Dingus, Ruby and Dingus, Ruby

One password for both Ruby challenges by Dingus is:

G=->*x{i=0;i+=1 while x[0][i]!~x[1];x[0][i]};Q=method G[methods,/^[o-q]ri/];C=method G[q=Q[],/[o-r]ut[b-d]/];D=method G[q,/^de/];P=G[q,/^[o-r]\z/];D[P]{|x|};C[34];C[34];C[34];C[10]

Try it online! & Try it online!

  • Gets access to putc by listing all the available (private) methods and filters them with regexen.
  • Also redefines p to not do anything.
  • a lambda is used instead of def
  • method :method_name with [] is used instead of ()
  • . cannot be used, so only the methods for Object and Kernel are available
  • Since putc is available, any string could be written.

FORTRAN like code:

GET_METHOD = ->*x do
  i=0
  while x[0][i]!~x[1] do
    i+=1
  end
  x[0][i]
end
PRIVATE_METHODs=method GET_METHOD[methods,/^[o-q]ri/]
PUTC=method GET_METHOD[PRIVATE_METHODs[],/[o-r]ut[b-d]/]
DEFINE_METHOD=method GET_METHOD[PRIVATE_METHODs[],/^de/]
P=GET_METHOD[PRIVATE_METHODs[],/^[o-r]\z/]
DEFINE_METHOD[P]{|x|}
PUTC[34]
PUTC[34]
PUTC[34]
PUTC[10]

Try it online!

Dingus, Ruby and Dingus, Ruby

One password for both Ruby challenges by Dingus is:

G=->*x{i=0;i+=1 while x[0][i]!~x[1];x[0][i]};Q=method G[methods,/^[o-q]ri/];C=method G[q=Q[],/[o-r]ut[b-d]/];D=method G[q,/^de/];P=G[q,/^[o-r]\z/];D[P]{|x|};C[34];C[34];C[34];C[10]

Try it online! & Try it online!

  • Gets access to putc by listing all the available (private) methods and filters them with regexen.
  • Also redefines p to not do anything.
  • a lambda is used instead of def
  • method :method_name with [] is used instead of ()
  • . cannot be used, so only the methods for Object and Kernel are available
  • Since putc is available, any string could be written.

FORTRAN like code:

GREP = lambda do |l,r|
  i=0
  while l[i]!~r do
    i+=1
  end
  l[i]
end
PRIVATE_METHODs=method GREP[methods,/^[o-q]ri/]
PUTC=method GREP[PRIVATE_METHODs[],/[o-r]ut[b-d]/]
DEFINE_METHOD=method GREP[PRIVATE_METHODs[],/^de/]
P=GREP[PRIVATE_METHODs[],/^[o-r]\z/]
DEFINE_METHOD[P]{|x|}
PUTC[34]
PUTC[34]
PUTC[34]
PUTC[10]

Try it online!

added 335 characters in body
Source Link
Eric Duminil
  • 1.1k
  • 8
  • 12

Dingus, Ruby, Ruby and Dingus, Ruby

TheOne password for both Ruby challenges by Dingus is:

G=->*x{i=0;i+=1 do;i=0;whilewhile x[0][i]!~x[1] do;i+=1;end;x[0][i];end;Q=method~x[1];x[0][i]};Q=method G[methods,/^[o-q]ri/];C=method G[q=Q[],/[o-r]ut[b-d]/];D=method G[q,/^de/];P=G[q,/^[o-r]\z/];D[P]{|x|};C[34];C[34];C[34];C[10]

Try it online! & Try it online!

  • Gets access to putc by listing all the available (private) methods and filters them with regexen.
  • Also redefines p to not do anything.
  • a lambda is used instead of def
  • method :method_name with [] is used instead of ()
  • . cannot be used, so only the methods for Object and Kernel are available
  • Since putc is available, any string could be written.

FORTRAN like code:

GET_METHOD = ->*x do
  i=0
  while x[0][i]!~x[1] do
    i+=1
  end
  x[0][i]
end
PRIVATE_METHODs=method GET_METHOD[methods,/^[o-q]ri/]
PUTC=method GET_METHOD[PRIVATE_METHODs[],/[o-r]ut[b-d]/]
DEFINE_METHOD=method GET_METHOD[PRIVATE_METHODs[],/^de/]
P=GET_METHOD[PRIVATE_METHODs[],/^[o-r]\z/]
DEFINE_METHOD[P]{|x|}
PUTC[34]
PUTC[34]
PUTC[34]
PUTC[10]

Try it online!

Dingus, Ruby

The password is:

G=->*x do;i=0;while x[0][i]!~x[1] do;i+=1;end;x[0][i];end;Q=method G[methods,/^[o-q]ri/];C=method G[q=Q[],/[o-r]ut[b-d]/];D=method G[q,/^de/];P=G[q,/^[o-r]\z/];D[P]{|x|};C[34];C[34];C[34];C[10]
  • Gets access to putc by listing all the available (private) methods and filters them with regexen.
  • Also redefines p to not do anything.
  • a lambda is used instead of def
  • method :method_name with [] is used instead of ()
  • . cannot be used, so only the methods for Object and Kernel are available
  • Since putc is available, any string could be written.

FORTRAN like code:

GET_METHOD = ->*x do
  i=0
  while x[0][i]!~x[1] do
    i+=1
  end
  x[0][i]
end
PRIVATE_METHODs=method GET_METHOD[methods,/^[o-q]ri/]
PUTC=method GET_METHOD[PRIVATE_METHODs[],/[o-r]ut[b-d]/]
DEFINE_METHOD=method GET_METHOD[PRIVATE_METHODs[],/^de/]
P=GET_METHOD[PRIVATE_METHODs[],/^[o-r]\z/]
DEFINE_METHOD[P]{|x|}
PUTC[34]
PUTC[34]
PUTC[34]
PUTC[10]

Try it online!

Dingus, Ruby and Dingus, Ruby

One password for both Ruby challenges by Dingus is:

G=->*x{i=0;i+=1 while x[0][i]!~x[1];x[0][i]};Q=method G[methods,/^[o-q]ri/];C=method G[q=Q[],/[o-r]ut[b-d]/];D=method G[q,/^de/];P=G[q,/^[o-r]\z/];D[P]{|x|};C[34];C[34];C[34];C[10]

Try it online! & Try it online!

  • Gets access to putc by listing all the available (private) methods and filters them with regexen.
  • Also redefines p to not do anything.
  • a lambda is used instead of def
  • method :method_name with [] is used instead of ()
  • . cannot be used, so only the methods for Object and Kernel are available
  • Since putc is available, any string could be written.

FORTRAN like code:

GET_METHOD = ->*x do
  i=0
  while x[0][i]!~x[1] do
    i+=1
  end
  x[0][i]
end
PRIVATE_METHODs=method GET_METHOD[methods,/^[o-q]ri/]
PUTC=method GET_METHOD[PRIVATE_METHODs[],/[o-r]ut[b-d]/]
DEFINE_METHOD=method GET_METHOD[PRIVATE_METHODs[],/^de/]
P=GET_METHOD[PRIVATE_METHODs[],/^[o-r]\z/]
DEFINE_METHOD[P]{|x|}
PUTC[34]
PUTC[34]
PUTC[34]
PUTC[10]

Try it online!

added 335 characters in body
Source Link
Eric Duminil
  • 1.1k
  • 8
  • 12

Dingus, Ruby

The password is:

G=->*x do;i=0;while x[0][i]!~x[1] do;i+=1;end;x[0][i];end;Q=method G[methods,/^[o-q]ri/];C=method G[q=Q[],/[o-r]ut[b-d]/];D=method G[q,/^de/];P=G[q,/^[o-r]\z/];D[P]{|x|};C[34];C[34];C[34];C[10]
  • Gets access to putc by listing all the available (private) methods and filters them with regexen.
  • Also redefines p to not do anything.
  • a lambda is used instead of def is replaced by a lambda
  • () is replaced by method :method_name with [] is used instead of ()
  • . cannot be used, so only the methods for Object and Kernel are available
  • Since putc is available, any string could be written.

 

FORTRAN like code:

GET_METHOD = ->*x do
  i=0
  while x[0][i]!~x[1] do
    i+=1
  end
  x[0][i]
end
PRIVATE_METHODs=method GET_METHOD[methods,/^[o-q]ri/]
PUTC=method GET_METHOD[PRIVATE_METHODs[],/[o-r]ut[b-d]/]
DEFINE_METHOD=method GET_METHOD[PRIVATE_METHODs[],/^de/]
P=GET_METHOD[PRIVATE_METHODs[],/^[o-r]\z/]
DEFINE_METHOD[P]{|x|}
PUTC[34]
PUTC[34]
PUTC[34]
PUTC[10]

Try it online!

Dingus, Ruby

  • Gets access to putc by listing all the available (private) methods and filters them with regexen.
  • Also redefines p to not do anything.
  • def is replaced by a lambda
  • () is replaced by method :method_name with []
  • . cannot be used, so only the methods for Object and Kernel are available

 
GET_METHOD = ->*x do
  i=0
  while x[0][i]!~x[1] do
    i+=1
  end
  x[0][i]
end
PRIVATE_METHODs=method GET_METHOD[methods,/^[o-q]ri/]
PUTC=method GET_METHOD[PRIVATE_METHODs[],/[o-r]ut[b-d]/]
DEFINE_METHOD=method GET_METHOD[PRIVATE_METHODs[],/^de/]
P=GET_METHOD[PRIVATE_METHODs[],/^[o-r]\z/]
DEFINE_METHOD[P]{|x|}
PUTC[34]
PUTC[34]
PUTC[34]
PUTC[10]

Try it online!

Dingus, Ruby

The password is:

G=->*x do;i=0;while x[0][i]!~x[1] do;i+=1;end;x[0][i];end;Q=method G[methods,/^[o-q]ri/];C=method G[q=Q[],/[o-r]ut[b-d]/];D=method G[q,/^de/];P=G[q,/^[o-r]\z/];D[P]{|x|};C[34];C[34];C[34];C[10]
  • Gets access to putc by listing all the available (private) methods and filters them with regexen.
  • Also redefines p to not do anything.
  • a lambda is used instead of def
  • method :method_name with [] is used instead of ()
  • . cannot be used, so only the methods for Object and Kernel are available
  • Since putc is available, any string could be written.

FORTRAN like code:

GET_METHOD = ->*x do
  i=0
  while x[0][i]!~x[1] do
    i+=1
  end
  x[0][i]
end
PRIVATE_METHODs=method GET_METHOD[methods,/^[o-q]ri/]
PUTC=method GET_METHOD[PRIVATE_METHODs[],/[o-r]ut[b-d]/]
DEFINE_METHOD=method GET_METHOD[PRIVATE_METHODs[],/^de/]
P=GET_METHOD[PRIVATE_METHODs[],/^[o-r]\z/]
DEFINE_METHOD[P]{|x|}
PUTC[34]
PUTC[34]
PUTC[34]
PUTC[10]

Try it online!

added 3 characters in body
Source Link
Eric Duminil
  • 1.1k
  • 8
  • 12
Loading
added 3 characters in body
Source Link
Eric Duminil
  • 1.1k
  • 8
  • 12
Loading
edited body
Source Link
Eric Duminil
  • 1.1k
  • 8
  • 12
Loading
added 141 characters in body
Source Link
Eric Duminil
  • 1.1k
  • 8
  • 12
Loading
Source Link
Eric Duminil
  • 1.1k
  • 8
  • 12
Loading