ACTF也算是结束了,浙大的那帮人脑洞也是够大的 π__π 这题目也是坑得可以。。。像我这样的渣渣只能是挑所有题目中最简单的来了。
这次的ctf好坑啊,竟然所有逆向破解题都是apk,我完全不会啊(>﹏<),只能弄到ppc了。
Dice Game 题目直接把python的源码贴了出来。源码如下:
#!/usr/bin/env python
# coding: utf-8
"""
Yet another problem for ACTF2015.
By H4sIAOzUQ1UCAwtIzUuvLFVwzkjNU9AoAHMccjKTiksSi4oy0yr1ivM1uQCpNCsJJAAAAA==
COPYLEFT, ALL WRONGS RESERVED.
"""
import random
import time
import sys
assert sys.version_info >= (3, 2)
NUM_ROUNDS = 1000
SCORE_INITIAL = 100
SCORE_ROUND = 10
SCORE_BONUS = 2
class WeBreakup(Exception):
"""Hmmm.. :("""
pass
def play_round(scores):
"""Plays a single round. Returns round status and new scores."""
print('..and your guess is?')
guess = input()
point = random.randint(1, 6)
mapping = {x: 'small' if x <= 3 else 'big' for x in range(1, 7)}
if guess == mapping[point]:
print('Correct. :(')
guessing_correct = True
# You know I'm the boss, right?
score_delta = SCORE_ROUND - SCORE_BONUS
scores = (scores[0] - score_delta, scores[1] + score_delta)
else:
print('Incorrect! :)')
guessing_correct = False
# You know I'm the boss, right?
score_delta = SCORE_ROUND + SCORE_BONUS
scores = (scores[0] + score_delta, scores[1] - score_delta)
return (guessing_correct, scores)
def play_game():
"""Plays a game."""
print('Hey hey, you you, I wanna play a game! :)')
reply = input()
if reply not

最低0.47元/天 解锁文章
2452

被折叠的 条评论
为什么被折叠?



