inctf2021

InCTF 2021 | Gold digger

#inctf2021 import random from Crypto.Util.number import * flag=open("flag","rb").read() def encrypt(msg, N,x): msg, ciphertexts = bin(bytes_to_long(msg))[2:], [] for i in msg: while True: r = random.randint(1, N) if gcd(r, N) == 1: bin_r =…

InCTF 2021 | Lost Baggage

#inctf2021 #!/usr/bin/python3 from random import getrandbits as rand from gmpy2 import next_prime, invert import pickle FLAG = open('flag.txt', 'rb').read() BUF = 16 def encrypt(msg, key): msg = format(int(msg.hex(), 16), f'0{len(msg)*8}b'…

InCTF 2021 | Eazy Xchange

#inctf2021 import os, hashlib, pickle from Crypto.Cipher import AES from Crypto.Util.Padding import pad, unpad key = os.urandom(4) FLAG = open('flag.txt', 'rb').read() p = 0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF …

InCTF 2021 | Trouble With Pairs

#inctf2021 #!/usr/bin/env python3 from BLS import G2ProofOfPossession as bls from secret import data, bytexor, fake_flag, flag from json import loads import sys class Unbuffered(object): def __init__(self, stream): self.stream = stream def…

InCTF 2021 | Right Now Generator

#inctf2021 #!/usr/bin/env python3 import random import hashlib import os import gmpy2 import pickle from Crypto.Cipher import AES from Crypto.Util.Padding import pad FLAG = open('flag.txt', 'rb').read() class RNG(): pad = 0xDEADC0DE sze = …

InCTF 2021 | Encrypted Operations

#inctf2021 #include <vector> #include <string> #include <random> #include <sstream> #include <iostream> #include <algorithm> #include <boost/lexical_cast.hpp> #include "utils.cpp" #define HIGH 9 #define LOW 0 using namespace std; //####################################################################…</boost/lexical_cast.hpp></algorithm></iostream></sstream></random></string></vector>

InCTF 2021 | Tabula Recta

#inctf2021 global allowed , matrix_entries allowed = "%UQh13S2dbjj,V6K1g$PTdaN4f!T023KUe#hi0PMOQiVN&cOcLR74+MLfeSgbaR*" matrix_entries = 37*37 class Cipher : def __init__(self, master_pass) : self.n = len(master_pass) self.key = [ord(i) fo…

カテゴリ一覧