记录一下特征吧
Elymas语言编写。谁会啊、、、、、
strings命令;
编译后:
secret = [ ???? ]
f = [ ???? ]
l = len(secret)
buffer = []
i = 0
j = 0
print "Enter Password line by line"
for line in sys.stdin.readlines():
j = read_int(line)
buffer = buffer + [j]
if secret[i] != j:
sys.exit(1)
i += 1
if i == l:
print to_string(map(lambda x,y: x^y, buffer, f))
sys.exit(0)
python脚本:
import sys
import subprocess
ans = []
while True:
for j in range(256):
if j % 16 == 15:
print j
p = subprocess.Popen("./ey_or.elf", stdin=subprocess.PIPE, stdout=subprocess.PIPE)
for x in ans:
p.stdin.write(str(x) + '
')
p.stdin.write(str(j) + '
')
p.stdin.close()
ret = p.wait()
if ret != 1:
ans.append(j)
print ans
break
import sys
import subprocess
s = [36, 30, 156, 30, 43, 6, 116, 22, 211, 66, 151, 89, 36, 82, 254, 81, 182, 134, 24, 90, 119, 6, 88, 137, 64, 197, 251, 15, 116, 220, 161, 94, 154, 252, 139, 11, 41, 215, 27, 158, 143, 140, 54, 189, 146, 48, 167, 56, 84, 226, 15, 188, 126, 24]
ans = []
p = subprocess.Popen("./ey_or.elf", stdin=subprocess.PIPE, stdout=subprocess.PIPE)
for x in s:
p.stdin.write(str(x) + '
')
p.stdin.close()
print p.stdout.read()
得到flag。