downloaded challenges
didnt know they would publish everything
This commit is contained in:
16
DownUnderCTF 2023/beginner/complementary/ape.py
Normal file
16
DownUnderCTF 2023/beginner/complementary/ape.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import math
|
||||
|
||||
ctf = b"DUCTF{"
|
||||
|
||||
ctf = int.from_bytes(ctf)
|
||||
|
||||
# 0x44554354467b
|
||||
# 0x3bd4fca9d0d3e400000000000000000000000
|
||||
# 6954494065942554678316751997792528753841173212407363342283423753536991947310058248515278
|
||||
|
||||
crypt = 6954494065942554678316751997792528753841173212407363342283423753536991947310058248515278
|
||||
|
||||
print(hex(int(math.sqrt(crypt))))
|
||||
ctf2 = 0x44554354467b0000000000000000000000000
|
||||
|
||||
print(int(crypt / ctf2))
|
||||
14
DownUnderCTF 2023/beginner/complementary/complementary.py
Normal file
14
DownUnderCTF 2023/beginner/complementary/complementary.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import math
|
||||
|
||||
flag = open('./flag.txt', 'rb').read().strip()
|
||||
m1 = int.from_bytes(flag[:len(flag)//2])
|
||||
m2 = int.from_bytes(flag[len(flag)//2:])
|
||||
print(flag[:len(flag)//2], flag[len(flag)//2:])
|
||||
print(m1, m2)
|
||||
print(hex(m1), hex(m2))
|
||||
n = m1 * m2
|
||||
print(n)
|
||||
|
||||
print("SOLVING!")
|
||||
sq = int(math.sqrt(n))
|
||||
print(hex(sq))
|
||||
1
DownUnderCTF 2023/beginner/complementary/flag.txt
Normal file
1
DownUnderCTF 2023/beginner/complementary/flag.txt
Normal file
@@ -0,0 +1 @@
|
||||
DUCTF{NOTAFLAG}
|
||||
1
DownUnderCTF 2023/beginner/complementary/output.txt
Normal file
1
DownUnderCTF 2023/beginner/complementary/output.txt
Normal file
@@ -0,0 +1 @@
|
||||
6954494065942554678316751997792528753841173212407363342283423753536991947310058248515278
|
||||
Reference in New Issue
Block a user