Skip to content

Commit

Permalink
TJCTF challs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sajjad "JJ" Arshad committed May 17, 2024
1 parent 95f468b commit e412717
Show file tree
Hide file tree
Showing 93 changed files with 6,130 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2387,7 +2387,11 @@
<td><a href="https://ctftime.org/event/2361/tasks/" target="_blank">CTFtime</a></td>
</tr>
<tr>
<td rowspan=3><a href="ctfs/TJCTF">TJCTF</a></td>
<td rowspan=4><a href="ctfs/TJCTF">TJCTF</a></td>
<td><a href="ctfs/TJCTF/2024">2024</a></td>
<td><a href="https://ctftime.org/event/2321/tasks/" target="_blank">CTFtime</a></td>
</tr>
<tr>
<td><a href="ctfs/TJCTF/2023">2023</a></td>
<td><a href="https://ctftime.org/event/1865/tasks/" target="_blank">CTFtime</a></td>
</tr>
Expand Down
1 change: 1 addition & 0 deletions ctfs/TJCTF/2024/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[CTFtime Page](https://ctftime.org/event/2321)
3 changes: 3 additions & 0 deletions ctfs/TJCTF/2024/crypto/accountleak/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vninja007

Uncrackable password? I thought this was a CTF; get me my friends minecraft password pls <3
47 changes: 47 additions & 0 deletions ctfs/TJCTF/2024/crypto/accountleak/server.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/usr/local/bin/python3.10 -u

import time
from Crypto.Util.number import getPrime, getRandomInteger, getRandomNBitInteger

flag = open("flag.txt").read().strip()
p = getPrime(512)
q = getPrime(512)

sub = getRandomInteger(20)

# hehe u cant guess it since its random :P
my_password = getRandomNBitInteger(256)

n = p*q
c = pow(my_password, 65537, n)
dont_leak_this = (p-sub)*(q-sub)


def gamechat():
print("<Bobby> i have an uncrackable password maybe")
print(f"<Bobby> i'll give you the powerful numbers, {c} and {n}")
print("<Bobby> gl hacking into my account")
print("<Bobby> btw do you want to get my diamond stash")
resp = input("<You> ")
if (resp.strip() == "yea"):
print("<Bobby> i'll send coords")
print(f"<Bobby> {dont_leak_this}")
print("<Bobby> oop wasnt supposed to copypaste that")
print("<Bobby> you cant crack my account tho >:)")
tic = time.time()
resp = input("<You> ")
toc = time.time()
if (toc-tic >= 2.5):
print("<Bobby> you know I can reset my password faster than that lol")
elif (resp.strip() != str(my_password)):
print("<Bobby> lol nice try won't give password that easily")
else:
print("<Bobby> NANI?? Impossible?!?")
print("<Bobby> I might as wel give you the flag")
print(f"<Bobby> {flag}")
else:
print("<Bobby> bro what, who denies free diamonds?")
print("Bobby has left the game")


gamechat()
3 changes: 3 additions & 0 deletions ctfs/TJCTF/2024/crypto/alkane/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
stosp

I hate standing in line for gas....
73 changes: 73 additions & 0 deletions ctfs/TJCTF/2024/crypto/alkane/main.py

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions ctfs/TJCTF/2024/crypto/alkane/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
m: bytearray(b'yellow submarine')
c: b'\xb7\x8e\xb3\xd9\xfd\xf2\x1f\xa2\xeaz\xe3\x0f\x00xj\x08'
3 changes: 3 additions & 0 deletions ctfs/TJCTF/2024/crypto/assume/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
samarth

assume for the sake of contradiction that pet the catloe
Loading

0 comments on commit e412717

Please sign in to comment.