Skip to content

Instantly share code, notes, and snippets.

@c272
Last active July 2, 2019 20:27
Show Gist options
  • Save c272/17986de80316778e3c0517263301723c to your computer and use it in GitHub Desktop.
Save c272/17986de80316778e3c0517263301723c to your computer and use it in GitHub Desktop.
:think:
function(ctx, args)
{
//ca = call arguments, r = response, ezs = ez index.
var ca={},r,i
var ez = "open unlock release".split(" ")
, p = "2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97".split(' ')
//initially call func to get response.
function c() {
r = args.t.call(ca)
}
c()
//check for errors
function n(){return !r.includes("not the")}
//pwn the "ez_x" parameter
function pwn(ezs) {
for (i of ez) {
ca[ezs] = i;
c()
if (n()) break
}
}
for (;;) {
//done yet?
if (r.includes("Con")) return ca
//ez21
if (r.includes("Z_2"))
{
pwn("ez_21")
}
//ez35
else if (r.includes("Z_3"))
{
pwn("ez_35")
for (i=0; i<10; i++) {
ca.digit = i
c()
if(n()) break
}
}
//ez40
else
{
pwn("ez_40")
//6-30
for (i of p) {
ca.ez_prime = +p
c()
if(n()) break
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment