目录
yst的小游戏
题解
bmp文件wbstego分解
十六进制转字符
十六进制转字符
23636F64696E673D7574662D380A0A696D706F7274206F732C746872656164696E670A0A636C617373207573657228293A0A202020204D41585F48503D3430300A2020202048503D3430300A202020204D503D3230300A2020202044616E6765723D33300A20202020446566656E63653D32300A636C61737320485028293A0A202020206E616D655F313D27E5B08FE793B6E7949FE591BDE88DAFE6B0B4270A2020202048505F313D35300A202020206E616D655F323D27E5A4A7E793B6E7949FE591BDE88DAFE6B0B4270A2020202048505F323D3130300A202020206E616D655F333D27E6BBA1E8A180E88DAFE6B0B4270A2020202048505F333D757365722E48500A636C617373204D5028293A0A202020206E616D655F313D27E5B08FE793B6E9AD94E6B395E88DAFE6B0B4270A202020204D505F313D35300A202020206E616D655F323D27E5A4A7E793B6E9AD94E6B395E88DAFE6B0B4270A202020204D505F323D3130300A202020206E616D655F333D27E6BBA1E9AD94E88DAFE6B0B4270A202020204D505F333D757365722E4D500A636C6173732055534528293A0A202020206E616D655F313D27E699AEE9809AE694BBE587BB270A202020204D505F313D300A2020202044616E6765725F313D757365722E44616E6765720A202020206E616D655F323D27E7A3A8E58880E79FB3270A202020204D505F323D31300A2020202044616E6765725F323D757365722E44616E6765722A320A202020206E616D655F333D27E9B8A1E6B1A4270A202020204D505F333D32300A2020202044616E6765725F333D757365722E44616E6765722A330A202020206E616D655F343D27E694BBE587BBE5BCBAE58C96270A202020204D505F343D35300A7072696E742827E5BC80E5A78BE6B8B8E6888F272E63656E746572283130302C272A2729290A7072696E742827797374E79A84E5B19EE680A7E580BC5C74E7949FE591BDE580BC25735C74E9AD94E6B395E580BC25735C74E694BBE587BBE58A9B25735C74E998B2E5BEA1E580BC25735C74272528757365722E48502C757365722E4D502C757365722E44616E6765722C757365722E446566656E636529290A6C6576656C3D3132390A636C61737320426F737328293A0A2020202048503D3330300A2020202044616E6765723D33300A20202020446566656E63653D32300A2020202048503D48502B32302A6C6576656C0A202020204D503D3430300A2020202044616E6765723D44616E6765722B332A6C6576656C0A20202020446566656E63653D446566656E63652B6C6576656C2A340A757365722E44616E6765723D757365722E44616E6765722D426F73732E446566656E63650A426F73732E44616E6765723D426F73732E44616E6765722D757365722E446566656E63650A696620757365722E44616E676572203C3D303A0A20202020757365722E44616E6765723D310A696620426F73732E44616E676572203C3D303A0A20202020426F73732E44616E6765723D310A7072696E742827E6A091E69CA8E79A84E5B19EE680A7E580BC5C74E7949FE591BDE580BC25735C74E9AD94E6B395E580BC25735C74E694BBE587BBE58A9B25735C74E998B2E5BEA1E580BC25735C74272528426F73732E48502C426F73732E4D502C426F73732E44616E6765722C426F73732E446566656E636529290A7072696E742827E68898E69697E5BC80E5A78B272E63656E746572283130302C272A2729290A72616E3D300A7768696C6520313A0A2020202072616E3D72616E2B310A202020207072696E742827E58FAFE794A8E68A80E883BD5C74257320E694BBE587BBE58A9B25735C74257320E694BBE587BBE58A9B25735C74257320E694BBE587BBE58A9B25735C74257320E694BBE587BBE58A9B25735C742725285553452E6E616D655F312C757365722E44616E6765722C5553452E6E616D655F322C757365722E44616E6765722A322C5553452E6E616D655F332C757365722E44616E6765722A332C5553452E6E616D655F342C757365722E44616E6765722A3229290A202020207072696E742827E58FAFE794A8E88DAFE6B0B45C74257320E59B9EE5A48DE7949FE591BDE580BC25735C74257320E59B9EE5A48DE7949FE591BDE580BC25735C74257320E59B9EE5A48DE7949FE591BDE580BC25735C745C6E5C745C74257320E59B9EE5A48DE9AD94E6B395E580BC25735C74257320E59B9EE5A48DE9AD94E6B395E580BC25735C74257320E59B9EE5A48DE9AD94E6B395E580BC25735C7427252848502E6E616D655F312C48502E48505F312C48502E6E616D655F322C48502E48505F322C48502E6E616D655F332C48502E48505F332C4D502E6E616D655F312C4D502E4D505F312C4D502E6E616D655F322C4D502E4D505F322C4D502E6E616D655F332C4D502E4D505F3329290A202020207573653D696E7075742827E4BDBFE794A83A27290A202020206966205553452E6E616D655F3120696E207573653A0A2020202020202020757365722E4D503D757365722E4D502D5553452E4D505F310A2020202020202020696620757365722E4D503C5553452E4D505F313A0A2020202020202020202020207072696E742827E9AD94E58A9BE4B88DE8B6B32CE887AAE58AA8E4BDBFE794A8E699AEE9809AE694BBE587BB27290A202020202020202020202020426F73732E48503D426F73732E48502D757365722E44616E6765720A2020202020202020202020207072696E742827797374E4BDBFE794A8E4BA86257320E5AFB9E680AAE789A9E980A0E68890E4BA862573E4BCA4E5AEB32725285553452E6E616D655F312C757365722E44616E67657229290A2020202020202020656C73653A0A202020202020202020202020757365722E4D503D757365722E4D502D5553452E4D505F310A2020202020202020202020207072696E742827797374E4BDBFE794A8E4BA86257320E5AFB9E680AAE789A9E980A0E68890E4BA862573E4BCA4E5AEB32725285553452E6E616D655F312C757365722E44616E67657229290A202020202020202020202020426F73732E48503D426F73732E48502D757365722E44616E6765720A20202020656C6966205553452E6E616D655F3220696E207573653A0A2020202020202020696620757365722E4D503C5553452E4D505F323A0A2020202020202020202020207072696E742827E9AD94E58A9BE4B88DE8B6B32CE887AAE58AA8E4BDBFE794A8E699AEE9809AE694BBE587BB27290A202020202020202020202020426F73732E48503D426F73732E48502D757365722E44616E6765720A2020202020202020202020207072696E742827797374E4BDBFE794A8E4BA86257320E5AFB9E680AAE789A9E980A0E68890E4BA862573E4BCA4E5AEB32725285553452E6E616D655F312C757365722E44616E67657229290A2020202020202020656C73653A0A202020202020202020202020757365722E4D503D757365722E4D502D5553452E4D505F320A2020202020202020202020207072696E742827797374E4BDBFE794A8E4BA86257320E5AFB9E680AAE789A9E980A0E68890E4BA862573E4BCA4E5AEB32725285553452E6E616D655F322C757365722E44616E6765722A3229290A202020202020202020202020426F73732E48503D426F73732E48502D757365722E44616E6765722A320A20202020656C6966205553452E6E616D655F3320696E207573653A0A2020202020202020696620757365722E4D503C5553452E4D505F333A0A2020202020202020202020207072696E742827E9AD94E58A9BE4B88DE8B6B32CE887AAE58AA8E4BDBFE794A8E699AEE9809AE694BBE587BB27290A202020202020202020202020426F73732E48503D426F73732E48502D757365722E44616E6765720A2020202020202020202020207072696E742827797374E4BDBFE794A8E4BA86257320E5AFB9E680AAE789A9E980A0E68890E4BA862573E4BCA4E5AEB32725285553452E6E616D655F312C757365722E44616E67657229290A2020202020202020656C73653A0A202020202020202020202020757365722E4D503D757365722E4D502D5553452E4D505F330A2020202020202020202020207072696E742827797374E4BDBFE794A8E4BA86257320E5AFB9E680AAE789A9E980A0E68890E4BA862573E4BCA4E5AEB32725285553452E6E616D655F332C757365722E44616E6765722A3329290A202020202020202020202020426F73732E48503D426F73732E48502D757365722E44616E6765722A330A20202020656C6966205553452E6E616D655F3420696E207573653A0A2020202020202020696620757365722E4D503C5553452E4D505F343A0A2020202020202020202020207072696E742827E9AD94E58A9BE4B88DE8B6B32CE887AAE58AA8E4BDBFE794A8E699AEE9809AE694BBE587BB27290A202020202020202020202020426F73732E48503D426F73732E48502D757365722E44616E6765720A2020202020202020202020207072696E742827797374E4BDBFE794A8E4BA86257320E5AFB9E6A091E69CA8E980A0E68890E4BA862573E4BCA4E5AEB32725285553452E6E616D655F312C757365722E44616E67657229290A2020202020202020656C73653A0A202020202020202020202020757365722E4D503D757365722E4D502D5553452E4D505F340A202020202020202020202020757365722E44616E6765723D757365722E44616E6765722A320A2020202020202020202020207072696E742827797374E4BDBFE794A8E4BA86257320E5AFB9E6A091E69CA8E980A0E68890E4BA862573E4BCA4E5AEB32725285553452E6E616D655F342C757365722E44616E67657229290A202020202020202020202020426F73732E48503D426F73732E48502D757365722E44616E6765720A20202020656C69662048502E6E616D655F3120696E207573653A0A2020202020202020757365722E48503D757365722E48502B48502E48505F310A20202020202020207072696E742827797374E4BDBFE794A8E4BA86257320E681A2E5A48DE4BA862573E7949FE591BDE580BC27252848502E6E616D655F312C48502E48505F3129290A20202020656C69662048502E6E616D655F3220696E207573653A0A2020202020202020757365722E48503D757365722E48502B48502E48505F320A20202020202020207072696E742827797374E4BDBFE794A8E4BA86257320E681A2E5A48DE4BA862573E7949FE591BDE580BC27252848502E6E616D655F322C48502E48505F3229290A20202020656C69662048502E6E616D655F3320696E207573653A0A2020202020202020757365722E48503D757365722E48502B48502E48505F330A20202020202020207072696E742827797374E4BDBFE794A8E4BA86257320E681A2E5A48DE4BA862573E7949FE591BDE580BC27252848502E6E616D655F332C48502E48505F3329290A20202020656C6966204D502E6E616D655F3120696E207573653A0A2020202020202020757365722E4D503D757365722E4D502B4D502E4D505F310A20202020202020207072696E742827797374E4BDBFE794A8E4BA86257320E681A2E5A48DE4BA862573E9AD94E58A9BE580BC2725284D502E6E616D655F312C4D502E4D505F3129290A20202020656C6966204D502E6E616D655F3220696E207573653A0A2020202020202020757365722E4D503D757365722E4D502B4D502E4D505F320A20202020202020207072696E742827797374E4BDBFE794A8E4BA86257320E681A2E5A48DE4BA862573E9AD94E58A9BE580BC2725284D502E6E616D655F322C4D502E4D505F3229290A20202020656C6966204D502E6E616D655F3320696E207573653A0A2020202020202020757365722E4D503D757365722E4D502B4D502E4D505F330A20202020202020207072696E742827797374E4BDBFE794A8E4BA86257320E681A2E5A48DE4BA862573E9AD94E58A9BE580BC2725284D502E6E616D655F332C4D502E4D505F3329290A20202020656C73653A0A20202020202020207072696E742827E6B2A1E69C89E8AFA5E98193E585B720E887AAE58AA8E4BDBFE794A8E699AEE9809AE694BBE587BB27290A20202020202020207072696E742827797374E4BDBFE794A8E4BA86257320E5AFB9E6A091E69CA8E980A0E68890E4BA862573E4BCA4E5AEB32725285553452E6E616D655F312C757365722E44616E67657229290A2020202020202020426F73732E48503D426F73732E48502D757365722E44616E6765720A20202020757365722E48503D757365722E48502D426F73732E44616E6765720A202020207072696E742827E6A091E69CA8E5AFB9E4BDA0E980A0E68890E4BA862573E4BCA4E5AEB3272528426F73732E44616E67657229290A202020207072696E7428277973745C74E589A9E4BD99E7949FE591BDE580BC25735C74E694BBE587BBE58A9B25735C745C74E998B2E5BEA1E58A9B25735C74E9AD94E6B395E580BC2573272528757365722E48502C757365722E44616E6765722C757365722E446566656E63652C757365722E4D5029290A202020207072696E742827E6A091E69CA85C74E589A9E4BD99E7949FE591BDE580BC25735C74E694BBE587BBE58A9B25735C74E998B2E5BEA1E58A9B25735C745C6E272528426F73732E48502C426F73732E44616E6765722C426F73732E446566656E636529290A202020207072696E742827E7ACAC2573E59B9EE590882CE7BB93E69D9F212121272572616E290A20202020696620426F73732E48503C3D3020616E6420757365722E48503C3D303A0A20202020202020207072696E742827E5B9B3E5B18021212127290A2020202020202020627265616B0A20202020696620426F73732E4850203C3D303A0A20202020202020207072696E742827E6A091E69CA8E8A2ABE7A08DE7BFBBE4BA86EFBC8CE4BDA0E8B5A2E4BA862121215C7427290A2020202020202020627265616B0A20202020696620757365722E4850203C3D303A0A20202020202020207072696E742827E4BDA0E5AF84E4BA862121215C7427290A2020202020202020627265616B0A
********************************************开始游戏********************************************
yst的属性值 生命值400 魔法值200 攻击力30 防御值20
树木的属性值 生命值2880 魔法值400 攻击力397 防御值536
********************************************战斗开始********************************************
可用技能 普通攻击 攻击力1 磨刀石 攻击力2 鸡汤 攻击力3 攻击强化 攻击力2
可用药水 小瓶生命药水 回复生命值50 大瓶生命药水 回复生命值100 满血药水 回复生命值400
小瓶魔法药水 回复魔法值50 大瓶魔法药水 回复魔法值100 满魔药水 回复魔法值200
使用:求极限回合,单纯修改数值没有用,没血就加血,没蓝就回蓝,有空就强化攻击,取回合最小值+MD532位小写字母就是flag
碰撞脚本取最小值
#这里利用碰撞脚本,来确定最少回合胜利数
#coding=utf-8
import os,threading
class user():
HP=400
MP=200
Danger=30
Defence=20
class HP():
name_1='小瓶生命药水'
HP_1=50
name_2='大瓶生命药水'
HP_2=100
name_3='满血药水'
HP_3=user.HP
class MP():
name_1='小瓶魔法药水'
MP_1=50
name_2='大瓶魔法药水'
MP_2=100
name_3='满魔药水'
MP_3=user.MP
class USE():
name_1='普通攻击'
MP_1=0
Danger_1=user.Danger
name_2='磨刀石'
MP_2=10
Danger_2=user.Danger*2
name_3='鸡汤'
MP_3=20
Danger_3=user.Danger*3
name_4='攻击强化'
MP_4=50
print('开始游戏'.center(100,'*'))
print('玩家属性值\t生命值%s\t魔法值%s\t攻击力%s\t防御值%s\t'%(user.HP,user.MP,user.Danger,user.Defence))
level=input(':')
class Boss():
HP=300
Danger=30
Defence=20
HP=HP+20*level
MP=400
Danger=Danger+3*level
Defence=Defence+level*4
user.Danger=user.Danger-Boss.Defence
Boss.Danger=Boss.Danger-user.Defence
if user.Danger <=0:
user.Danger=1
if Boss.Danger <=0:
Boss.Danger=1
print('怪物属性值\t生命值%s\t魔法值%s\t攻击力%s\t防御值%s\t'%(Boss.HP,Boss.MP,Boss.Danger,Boss.Defence))
ran=0
while 1:
ran=ran+1
print('可用技能\t%s 攻击力%s\t%s 攻击力%s\t%s 攻击力%s\t%s 攻击力%s\t'%(USE.name_1,user.Danger,USE.name_2,user.Danger*2,USE.name_3,user.Danger*3,USE.name_4,user.Danger*2))
print('可用药水\t%s 回复生命值%s\t%s 回复生命值%s\t%s 回复生命值%s\t\n\t\t%s 回复魔法值%s\t%s 回复魔法值%s\t%s 回复魔法值%s\t'%(HP.name_1,HP.HP_1,HP.name_2,HP.HP_2,HP.name_3,HP.HP_3,MP.name_1,MP.MP_1,MP.name_2,MP.MP_2,MP.name_3,MP.MP_3))
if 0>=(user.HP-Boss.Danger):
use=HP.name_3
elif user.MP<50:
use=MP.name_3
elif Boss.HP<=user.Danger*3:
use=USE.name_3
else:
use=USE.name_4
if USE.name_1 in use:
user.MP=user.MP-USE.MP_1
if user.MP<USE.MP_1:
print('魔力不足,自动使用普通攻击')
Boss.HP=Boss.HP-user.Danger
print('你使用了%s 对怪物造成了%s伤害'%(USE.name_1,user.Danger))
else:
user.MP=user.MP-USE.MP_1
print('你使用了%s 对怪物造成了%s伤害'%(USE.name_1,user.Danger))
Boss.HP=Boss.HP-user.Danger
elif USE.name_2 in use:
if user.MP<USE.MP_2:
print('魔力不足,自动使用普通攻击')
Boss.HP=Boss.HP-user.Danger
print('你使用了%s 对怪物造成了%s伤害'%(USE.name_1,user.Danger))
else:
user.MP=user.MP-USE.MP_2
print('你使用了%s 对怪物造成了%s伤害'%(USE.name_2,user.Danger*2))
Boss.HP=Boss.HP-user.Danger*2
elif USE.name_3 in use:
if user.MP<USE.MP_3:
print('魔力不足,自动使用普通攻击')
Boss.HP=Boss.HP-user.Danger
print('你使用了%s 对怪物造成了%s伤害'%(USE.name_1,user.Danger))
else:
user.MP=user.MP-USE.MP_3
print('你使用了%s 对怪物造成了%s伤害'%(USE.name_3,user.Danger*3))
Boss.HP=Boss.HP-user.Danger*3
elif USE.name_4 in use:
if user.MP<USE.MP_4:
print('魔力不足,自动使用普通攻击')
Boss.HP=Boss.HP-user.Danger
print('你使用了%s 对怪物造成了%s伤害'%(USE.name_1,user.Danger))
else:
user.MP=user.MP-USE.MP_4
user.Danger=user.Danger*2
print('你使用了%s 对怪物造成了%s伤害'%(USE.name_4,user.Danger))
Boss.HP=Boss.HP-user.Danger
elif HP.name_1 in use:
user.HP=user.HP+HP.HP_1
print('你使用了%s 恢复了%s生命值'%(HP.name_1,HP.HP_1))
elif HP.name_2 in use:
user.HP=user.HP+HP.HP_2
print('你使用了%s 恢复了%s生命值'%(HP.name_2,HP.HP_2))
elif HP.name_3 in use:
user.HP=user.HP+HP.HP_3
print('你使用了%s 恢复了%s生命值'%(HP.name_3,HP.HP_3))
elif MP.name_1 in use:
user.MP=user.MP+MP.MP_1
print('你使用了%s 恢复了%s魔力值'%(MP.name_1,MP.MP_1))
elif MP.name_2 in use:
user.MP=user.MP+MP.MP_2
print('你使用了%s 恢复了%s魔力值'%(MP.name_2,MP.MP_2))
elif MP.name_3 in use:
user.MP=user.MP+MP.MP_3
print('你使用了%s 恢复了%s魔力值'%(MP.name_3,MP.MP_3))
else:
print('没有该道具 自动使用普通攻击')
print('你使用了%s 对怪物造成了%s伤害'%(USE.name_1,user.Danger))
Boss.HP=Boss.HP-user.Danger
user.HP=user.HP-Boss.Danger
print('怪物对你造成了%s伤害'%(Boss.Danger))
print('玩家\t剩余生命值%s\t攻击力%s\t\t防御力%s\t魔法值%s'%(user.HP,user.Danger,user.Defence,user.MP))
print('怪物\t剩余生命值%s\t攻击力%s\t防御力%s\t\n'%(Boss.HP,Boss.Danger,Boss.Defence))
print('第%s回合,结束!!!'%ran)
if Boss.HP<=0 and user.HP<=0:
print('平局!!!')
break
if Boss.HP <=0:
print('你赢了!!!\t')
break
if user.HP <=0:
print('你死了!!!\t')
break
测试以后发现1601回合为最少回合数
MD5加密32位小写字母
flag{c559da2ba967eb820766939a658022c8}
easy_python
解题wp
import math, base64
def battle(level):
HP = 4 * level + 100
ATK = max(3 * level - 90, 1)
M_ATK = max(3 ** 10 - level - 5, 1)
return True if math.ceil(3 ** 15 / ATK) < HP / M_ATK else False
geitaoshenketou = 3 ** 100 # 超大
l = [0, geitaoshenketou]
while True:
if l[1] - l[0] == 1:
res = base64.b64encode(str(l[1]).encode())
print('flag{' + res.decode() + '}')
break
elif battle(sum(l) // 2):
l = [l[0], sum(l) // 2]
else:
l = [sum(l) // 2, l[1]]