--- lang: ja-jp breaks: true --- AlphaComplex1 === ## 問題概要 ### ジャンル Crypto ### 点数 300 points ### 問題文 AlphaComplex1 Mission: Decrypt ac1.pwn.seccon.jp:31337 AlphaComplex1.zip ### フラグ ??? ### 挑戦者 tkmru mzyy94 idzuna ## 解法 ## 議論 とりあえず計算を持ってくるコード ```python= #!/usr/bin/env python import socket import hashlib HOST = 'ac1.pwn.seccon.jp' # 'localhost' PORT = 31337 s = socket.create_connection((HOST, PORT)) def getdata(): skip = 77 # skip until prefix s.recv(skip) prefix = s.recv(128).rstrip() i = 0 while hashlib.sha1(prefix + str(i)).hexdigest()[:5] != "00000": i += 1 s.send(str(i) + "\n") # request data set dataline = s.recv(1024).splitlines() print(dataline[0]) print(dataline[1]) s.send(str(0) + "\n") print("C(m, y)**e = " + s.recv(1024)) if __name__=='__main__': getdata() ``` こんなの書いたけど法の世界には無力 ```python def __div__(self, other): if isinstance(other, CZimpl): X = other.x Y = other.y # should be Zero a = self.x b = self.y return self.C(a / X, b / X) else: return self.C(self.x / other, self.y / other) ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up