Skip to content

Instantly share code, notes, and snippets.

View saurav3199's full-sized avatar
🎯
Focusing

Saurav Kumar Singh saurav3199

🎯
Focusing
View GitHub Profile
@saurav3199
saurav3199 / rabin.py
Created July 8, 2020 08:23
Rabin Rsa Hanukkah challenge in XMAS CTF'19
import gmpy2,math
def egcd(a, b):
u, u1 = 1 , 0
v, v1 = 0 , 1
while b:
q = a // b
u, u1 = u1, u - q * u1
v, v1 = v1, v - q * v1
a, b = b, a - q * b
return a, u, v
@saurav3199
saurav3199 / titanic.py
Created July 5, 2020 20:19
titanic solver script for challenge in asis-ctf-2020
#!/usr/bin/python3
# challenge titanic
# source asis-ctf-2020
import hashlib
import uuid
from pwn import *
from Crypto.Util.number import *
import string
@saurav3199
saurav3199 / uniquely_decoding_possibilty.cpp
Last active January 16, 2020 13:43
Checking if the list of given codes can be used to decode any possible string uniquely.
// the algorithm is known as Sardinas–Patterson algo.
#include <bits/stdc++.h>
using namespace std;
// in-short-use macros
#define ll long long int
#define ld long double
#define pb push_back