This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import string | |
def xor(msg, key): | |
o = '' | |
for i in range(len(msg)): | |
o += chr(ord(msg[i]) ^ ord(key[i % len(key)])) | |
return o | |
msg="\x05F\x17\x12\x14\x18\x01\x0c\x0b4" | |
msg2=">\x1f\x00\x14\n\x08\x07Q\n\x0e" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from string import ascii_lowercase as l | |
class CypherTable: | |
def __init__(self): | |
self.final_table = [l[i:]+l[:i] for i in range(len(l))] | |
ciphertext = "g4iu{ocs_oaeiiamqqi_qk_moam!}e0gi" | |
flag = "" | |
flag2 = "" | |
table = CypherTable().final_table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pwn import * | |
from Crypto.Util.number import * | |
import gmpy2 | |
import math | |
context.log_level = "error" | |
e = 65537 | |
r = remote('68.183.158.95', 7777) | |
r.recvuntil("\n") | |
c = int(r.recvuntil("\n").strip().split("- ")[1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socketserver | |
import random | |
import signal | |
import time | |
import gmpy2 | |
from Crypto.Util.number import inverse, bytes_to_long, long_to_bytes | |
FLAG = open('flag', 'r').read().strip() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socketserver | |
import random | |
import signal | |
import time | |
import gmpy2 | |
from pwn import * | |
from Crypto.Util.number import * | |
from itertools import product | |
context.log_level = 'error' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pwn import * | |
import string | |
context.log_level = 'error' | |
charset = '}_{.' + string.ascii_letters + string.digits + "!@#$%^&*()-+=[]?" | |
def count_same(a1, a2): | |
c = 0 | |
le = len(a1) if len(a1) < len(a2) else len(a2) | |
for i in range(le): | |
if a1[i] == a2[i]: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sage.all import * | |
from Crypto.Util.number import * | |
n1 = 16665162598091416675035243372929255215330237988600063606115453406246759269279788760269977993441302227754535063989940158801403082299136924692382379772238783511717805089453627769958409474798262234585212880036578100065244955419654350030210214612873050000707217728997449651244785327256673209001617229204596903739745000294771409411741050416912250410842101344110865361910624576900847453308353320549785990249062848385268654951594713494728031930339317011245422247813046177464952338694367015023462166849724348822067012372916419798329882575892837697474973759070677459272935998500533063881083981623170007582400032456357369057331 | |
n2 = 123279676666084000896842926376977238866927430473119431176344532976966725966021328327701807637064104811363854287970644304707443032608751300253649681840334402781681492300150126513397003619114552462765351792990039086498200554781665325023328969783148395484562214984096890201377302019618026617965229591852896762931689581009947892789279286140606 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Crypto.Util.number import * | |
from Crypto.Cipher import PKCS1_OAEP | |
from Crypto.PublicKey import RSA | |
n = 0x00b96b6278808668de6ce3d0b75315b1129300feb48ba23353f097b67c023fbdcdd0e63086ee8c711a9b153ea2c2a3121fc141e27a7d662e72b8c31e5890a0314be92a328ed8b6dbcc90c3d7f0a75dc8c13b0f41aa34776253650dfa27d3c3809b81bfb103a356ec2761b6dd233549a22bab33224092342e7027964c70a9e3eecb | |
e = 65537 | |
a = 84733215803103612460901465701232424798609470209825913961212238457798293111098195061837071495218083197429913141798442522950831495758395873695688189182925448736211066067276791533151828542439575601763801135131479532656528730453020404557236783254278625529895480234633323403399468237577058553920576024305830379725 | |
r = 21700996784810065805847020455080940987640304282783092123992896363328128691169420271855815648912121417792054646557156071514079520782530801688062034321252682229729442734741486715339008457753023855600772948737800521010217600436912058582658334252483984244806083617513596479033871117464319239681526924092910597300 | |
c = 854071817597552 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pwn import * | |
from z3 import * | |
context.log_level = 'error' | |
def checkGuess(sample, predictions): | |
for i, val in enumerate(sample): | |
if (val != predictions[i]): | |
return False | |
return True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Crypto.Util.number import * | |
from pwn import * | |
from Crypto.Cipher import AES | |
from Crypto.Util.strxor import strxor | |
from binascii import hexlify, unhexlify | |
from Crypto.Util.number import * | |
import sys | |
def sign(key, message): | |
try: |
OlderNewer