Useful Sites
https://zxing.org/w/decode.jspx
from PIL import Image
src = Image.new('RGB', (600, 500))
file=1
for j in range(1,61):
for i in range(1,51):
dst=Image.open('folder/'+str(file)+'.jpg')
if(j==1):
row=1
else:
row=(int(j)-1)*10
if(i==1):
column=1
else:
column=(int(i)-1)*10
src.paste(dst, (row, column))
file=int(file)+1
src.save('final.png')
#shaktictf{poll0w_lik3_a_g00d_c0nscience}
import pwn
import sympy
import re
import time
host, port = 'cgames-nm02.allyourbases.co', 9010
s = pwn.remote(host, port)
while True:
try:
ok=s.recv(1024).decode()
print(str(ok))
ok=re.sub("=","",str(ok))
ans=sympy.sympify(ok)
s.sendline(str(ans))
time.sleep(0.5)
except:
print('Done!')
break
import pwn
import time
host, port = 'imaginary.ml', 10069
s = pwn.remote(host, port)
target=s.recv(1024).decode()
target=target.splitlines()
target=target[1]
dictt={}
for alphabet in range(97,122):
time.sleep(0.5)
s.sendline(chr(alphabet))
out=s.recv(1024).decode()
out=out.splitlines()
dictt[chr(alphabet)] = out[1]
time.sleep(0.5)
#print(dictt)
for alphabet in range(0,10):
time.sleep(0.5)
s.sendline(str(alphabet))
out=s.recv(1024).decode()
out=out.splitlines()
dictt[str(alphabet)] = out[1]
time.sleep(0.5)
def ok(code):
s.sendline(str(code))
out=s.recv(1024).decode()
out=out.splitlines()
dictt[str(code)] = out[1]
time.sleep(0.5)
ok('!')
ok('_')
ok('-')
ok('@')
ok('{')
ok('}')
def get_key(val):
for key, value in dictt.items():
if val == value:
return key
return "key doesn't exist"
for char in target:
print(get_key(char), end = '')
ubuntu@DESKTOP-OSFLETN:~$ nc sgc.ch2.btsctf.pl 55126
_____ _____ _____ _
/ ___| __ \/ __ \ | |
\ `--.| | \/| / \/_ __ ___ __ _| |_ ___ _ __
`--. \ | __ | | | '__/ _ \/ _` | __/ _ \| '__|
/\__/ / |_\ \| \__/\ | | __/ (_| | || (_) | |
\____/ \____/ \____/_| \___|\__,_|\__\___/|_|
Welcome to Simple Game Creator where you can create your game of choice!
1. View all games
2. Create your own multiplayer game
3. Create your own singleplayer game
4. DEBUG //Added by Arqsz, remember to remove it before deploy
Choose wisely >> 1
Your games:
Singleplayers:
Multiplayers:
_____ _____ _____ _
/ ___| __ \/ __ \ | |
\ `--.| | \/| / \/_ __ ___ __ _| |_ ___ _ __
`--. \ | __ | | | '__/ _ \/ _` | __/ _ \| '__|
/\__/ / |_\ \| \__/\ | | __/ (_| | || (_) | |
\____/ \____/ \____/_| \___|\__,_|\__\___/|_|
Welcome to Simple Game Creator where you can create your game of choice!
1. View all games
2. Create your own multiplayer game
3. Create your own singleplayer game
4. DEBUG //Added by Arqsz, remember to remove it before deploy
Choose wisely >> 2
Name your own multiplayer game >> test
What difficulty will it have (hard, easy)? >> hard
How many players can play this? >> 2
You created your own multiplayer game
_____ _____ _____ _
/ ___| __ \/ __ \ | |
\ `--.| | \/| / \/_ __ ___ __ _| |_ ___ _ __
`--. \ | __ | | | '__/ _ \/ _` | __/ _ \| '__|
/\__/ / |_\ \| \__/\ | | __/ (_| | || (_) | |
\____/ \____/ \____/_| \___|\__,_|\__\___/|_|
Welcome to Simple Game Creator where you can create your game of choice!
1. View all games
2. Create your own multiplayer game
3. Create your own singleplayer game
4. DEBUG //Added by Arqsz, remember to remove it before deploy
Choose wisely >> 1
Your games:
Singleplayers:
Multiplayers:
2 can play this easy game called test
_____ _____ _____ _
/ ___| __ \/ __ \ | |
\ `--.| | \/| / \/_ __ ___ __ _| |_ ___ _ __
`--. \ | __ | | | '__/ _ \/ _` | __/ _ \| '__|
/\__/ / |_\ \| \__/\ | | __/ (_| | || (_) | |
\____/ \____/ \____/_| \___|\__,_|\__\___/|_|
Welcome to Simple Game Creator where you can create your game of choice!
1. View all games
2. Create your own multiplayer game
3. Create your own singleplayer game
4. DEBUG //Added by Arqsz, remember to remove it before deploy
Choose wisely >> 4
Loaded files:
from conf import flag
class Multiplayer(object):
def __init__(self, name, difficulty, players):
self.name = name
self.difficulty = "easy" # No one will create hard game, no need to implement it
self.players = players
def show_details(self):
print('{0.players} can play this easy game called ' + self.name).format(self)
class Singleplayer(object):
def __init__(self, name, difficulty):
self.name = name
self.difficulty = "easy"
def show_details(self):
print("This " + self.difficulty + " game is called " + self.name)
class CTFGame(object):
def __init__(self):
self.flag = flag#!/usr/bin/env python2
import os, sys
from games import Singleplayer, Multiplayer
games = {
'single': list(),
'multi': list()
}
def user_choice():
menu = """
Welcome to Simple Game Creator where you can create your game of choice!
1. View all games
2. Create your own multiplayer game
3. Create your own singleplayer game
4. DEBUG //Added by Arqsz, remember to remove it before deploy
"""
print(menu)
sys.stdout.write("Choose wisely >> ")
sys.stdout.flush()
return sys.stdin.readline()
# TODO remember to remove this piece of code - just need it for debbuging. After cleanup remember to sanitize input from users
def debug():
print("Loaded files:")
with open('/home/ctf/games.py', 'r') as f:
sys.stdout.write(f.read())
sys.stdout.flush()
with open(__file__, 'r') as f:
sys.stdout.write(f.read())
sys.stdout.flush()
def add_single():
sys.stdout.write("Name your own singleplayer game >> ")
sys.stdout.flush()
name = sys.stdin.readline().strip()
sys.stdout.write("What difficulty will it have (hard, easy)? >> ")
sys.stdout.flush()
diff = sys.stdin.readline().strip()
games['single'].append(Singleplayer(name, diff))
print("You created your own singleplayer game")
def add_multi():
sys.stdout.write("Name your own multiplayer game >> ")
sys.stdout.flush()
name = sys.stdin.readline().strip()
sys.stdout.write("What difficulty will it have (hard, easy)? >> ")
sys.stdout.flush()
diff = sys.stdin.readline().strip()
sys.stdout.write("How many players can play this? >> ")
sys.stdout.flush()
players = sys.stdin.readline().strip()
games['multi'].append(Multiplayer(name, diff, players))
print("You created your own multiplayer game")
def show_games():
print("\nYour games: ")
print("\nSingleplayers: ")
for single in games['single']:
single.show_details()
print("\nMultiplayers: ")
for multi in games['multi']:
multi.show_details()
print("")
def main():
banner = """\
_____ _____ _____ _
/ ___| __ \/ __ \ | |
\ `--.| | \/| / \/_ __ ___ __ _| |_ ___ _ __
`--. \ | __ | | | '__/ _ \/ _` | __/ _ \| '__|
/\__/ / |_\ \| \__/\ | | __/ (_| | || (_) | |
\____/ \____/ \____/_| \___|\__,_|\__\___/|_|
"""
while True:
print(banner)
sys.stdout.flush()
choice = user_choice().strip()
choices = {
'1': show_games,
'2': add_multi,
'3': add_single,
'4': debug
}
ans = choices.get(choice, None)
if not ans:
print("There is no such option mate")
else:
ans()
if __name__ == "__main__":
main()
_____ _____ _____ _
/ ___| __ \/ __ \ | |
\ `--.| | \/| / \/_ __ ___ __ _| |_ ___ _ __
`--. \ | __ | | | '__/ _ \/ _` | __/ _ \| '__|
/\__/ / |_\ \| \__/\ | | __/ (_| | || (_) | |
\____/ \____/ \____/_| \___|\__,_|\__\___/|_|
Welcome to Simple Game Creator where you can create your game of choice!
1. View all games
2. Create your own multiplayer game
3. Create your own singleplayer game
4. DEBUG //Added by Arqsz, remember to remove it before deploy
Choose wisely >>