This file contains hidden or 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 hashlib import md5 | |
from base64 import b64decode | |
from base64 import b64encode | |
from Crypto.Cipher import AES | |
from time import ctime | |
from Secret import __SECRET__ | |
import os | |
BLOCK_SIZE = 16 |
This file contains hidden or 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 * | |
import random | |
flag = 'Hidden' | |
def egcd(a, b): | |
if a == 0: | |
return (b, 0, 1) | |
else: | |
g, y, x = egcd(b % a, a) | |
return (g, x - (b // a) * y, y) |
This file contains hidden or 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 random | |
from gmpy2 import * | |
from message import mes | |
from secret import m,n,c | |
assert "ISITDTU" in mes | |
s = [] | |
for i in mes: | |
x = (m* ord(i) + c) % n |
This file contains hidden or 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 os | |
import socket | |
import threading | |
from hashlib import * | |
import SocketServer | |
import random | |
from flag import flag | |
host, port = '0.0.0.0', 33337 | |
BUFF_SIZE = 1024 |
This file contains hidden or 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
enc_flag = '1d14273b1c27274b1f10273b05380c295f5f0b03015e301b1b5a293d063c62333e383a20213439162e0037243a72731c22311c2d261727172d5c050b131c433113706b6047556b6b6b6b5f72045c371727173c2b1602503c3c0d3702241f6a78247b253d7a393f143e3224321b1d14090c03185e437a7a607b52566c6c5b6c034047'.decode('hex') | |
# print len(enc_flag) | |
key = [i for i in range(10)] | |
flag = [chr(i) for i in range(len(enc_flag))] | |
m = [] | |
for a in range(len(key)): | |
i = a | |
for b in range(len(flag)/len(key)): |
This file contains hidden or 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
# Took from SO | |
def egcd(a, b): | |
if a == 0: | |
return (b, 0, 1) | |
g, y, x = egcd(b%a,a) | |
return (g, x - (b//a) * y, y) | |
def modinv(a, m): | |
g, x, y = egcd(a, m) | |
if g != 1: |
This file contains hidden or 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
p = """.rodata:08048880 db 0DBh | |
.rodata:08048881 db 1Dh | |
.rodata:08048882 db 0 | |
.rodata:08048883 db 0 | |
.rodata:08048884 db 0E1h | |
.rodata:08048885 db 1Dh | |
.rodata:08048886 db 0 | |
.rodata:08048887 db 0 | |
.rodata:08048888 db 0F5h | |
.rodata:08048889 db 1Dh |
This file contains hidden or 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
sss = """.rodata:08048880 db 43h ; C | |
.rodata:08048881 db 0 | |
.rodata:08048882 db 0 | |
.rodata:08048883 db 0 | |
.rodata:08048884 db 70h ; p | |
.rodata:08048885 db 0 | |
.rodata:08048886 db 0 | |
.rodata:08048887 db 0 | |
.rodata:08048888 db 0DEh | |
.rodata:08048889 db 0 |
This file contains hidden or 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
#! usr/bin/env python3 | |
import string | |
import sys | |
import numpy as np | |
import math | |
from numpy import matrix | |
from numpy import linalg | |
# from flag import FLAG | |
# assert len(FLAG) == 28 |
This file contains hidden or 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
e = 0x10001 | |
n = 55089599753625499150129246679078411260946554356961748980861372828434789664694269460953507615455541204658984798121874916511031276020889949113155608279765385693784204971246654484161179832345357692487854383961212865469152326807704510472371156179457167612793412416133943976901478047318514990960333355366785001217 | |
q = 7422236843002619998657542152935407597465626963556444983366482781089760759017266051147512413638949173306397011800331344424158682304439958652982994939276427 | |
c = 33062272351573218250384115704487361063970465004033740168733959927707721053321054975845636421337650298670338055101957913137486876401007806540788449215177115739842456860057795240129932234489439409388612936981938930876353938688227847808194010536300529961489751250254640618262254364661940751727869020817391566773 | |
p = n/q | |
phi = (p-1)*(q-1) | |
def egcd(a, b): | |
if a == 0: |