View tcp_packet_dropper_4040.py
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
#!/usr/bin/python | |
from bcc import BPF | |
from bcc.utils import printb | |
F = """ | |
#include <linux/bpf.h> | |
#include <linux/if_ether.h> | |
#include <linux/ip.h> | |
#include <linux/in.h> |
View h1_sol.sage
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 hashlib | |
from cryptography.hazmat.backends import default_backend | |
from cryptography.hazmat.primitives import padding | |
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes | |
from Crypto.Util.number import long_to_bytes, bytes_to_long | |
from lll_helper import resultant,prmat | |
a2b_r1,a2b_s1,_ = (8618416354247009865173783322782283385800726568519779763790691157278063798628048418532907783021806238103423515210146966468025964847364086792099622893845216, 2932674107137731789093617068375500084388905453653468925392946088867116597531950960271857205235755778202380084260003117176704579423285955014316540314931750, 27865871384804321325511205140263204607) | |
a2b_r2,a2b_s2,flag = (8832295267397231051293216564016639537146222596144354850230682204978731311879255662259663270183445827348338041752369314181111940713714991119349376636404112, 8683784208731634307361157916911868656279723101808163939313971801256736484458199874570532609285522391139002296248059424750941962344918156540408403221858292, 1053985354644091714 |
View find_x_y_z.py
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
2*z**5 - x**3 + y*z = 47769864706750161581152919266942014884728504309791272300873440765010405681123224050402253883248571746202060439521835359010439155922618613520747411963822349374260144229698759495359592287331083229572369186844312169397998958687629858407857496154424105344376591742814310010312178029414792153520127354594349356721 | |
x**4 + y**5 + x*y*z = 89701863794494741579279495149280970802005356650985500935516314994149482802770873012891936617235883383779949043375656934782512958529863426837860653654512392603575042842591799236152988759047643602681210429449595866940656449163014827637584123867198437888098961323599436457342203222948370386342070941174587735051 | |
y**6 + 2*z**5 + z*y = 47769864706750161581152919266942014884728504309791272300873440765010405681123224050402253883248571746202060439521835359010439155922618613609786612391835856376321085593999733543104760294208916442207908167085574197779179315081994735796390000652436258333943257231020011932605906567086908226693333446521506911058 |
View tux_sol_dicectf.sage
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 itertools | |
from sympy.solvers.diophantine.diophantine import diop_linear | |
from sympy import symbols | |
def getPolyInfo(poly): | |
HM = poly.monomials()[0] # HM: head monomial | |
HC = poly.monomial_coefficient(HM) # HC: head coefficient | |
HT = HC*HM # HT: head term | |
HI = poly.exponents()[0] # HI: head index | |
return {'HT':HT,'HC':HC,'HM':HM,'HI':HI} |
View Factor.py
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
def check_cong(k, p, q, n, xored=None): | |
kmask = (1 << k) - 1 | |
p &= kmask | |
q &= kmask | |
n &= kmask | |
pqm = (p*q) & kmask | |
return pqm == n and (xored is None or (p^q) == (xored & kmask)) | |
def extend(k, a): | |
kbit = 1 << (k-1) |
View lll_helper.py
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 numpy as np | |
from sage.all import * | |
from sage.modules.free_module_integer import IntegerLattice | |
import itertools | |
from sage.rings.polynomial.multi_polynomial_sequence import PolynomialSequence | |
import binascii | |
import numpy as np | |
import ast |
View ecdsa_sol_tenablectf.sage
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 binascii import unhexlify | |
from Crypto.Cipher import AES | |
from Crypto.Util.Padding import unpad | |
r= 50394691958404671760038142322836584427075094292966481588111912351250929073849 | |
s1= 26685296872928422980209331126861228951100823826633336689685109679472227918891 | |
s2= 40762052781056121604891649645502377037837029273276315084687606790921202237960 | |
msg1,msg2 = 777971358777664237997807487843929900983351335441289679035928005996851307115,91840683637030200077344423945857298017410109326488651848157059631440788354195 |
View HomeBrew.html
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
<!DOCTYPE html> | |
<html> | |
<head><meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>HomeBrew</title><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script> | |
View complex_tot.py
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
def complex_tot(factors): | |
phi = 1 | |
for (p, e) in factors: | |
# Integer prime of this form is a Gaussian prime with norm(p) = p^2 | |
if p % 4 == 3: | |
phi *= (p**(e-1))**2 * (p**2 - 1) | |
# Integer prime of this form is factored into two Gaussian primes with norm(P) = p | |
elif p % 4 == 1: | |
phi *= (p**(e-1) * (p - 1))**2 | |
return phi |
View oh_my_zsh.zshrc
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
export ZSH="/home/overflow/.oh-my-zsh" | |
export EDITOR='vim' | |
export PATH="/home/overflow/.cargo/bin":$PATH | |
source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh | |
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh | |
export LC_ALL=en_IN.UTF-8 | |
export LANG=en_IN.UTF-8 | |
ZSH_THEME="nicoulaj" | |
ENABLE_CORRECTION="true" | |
COMPLETION_WAITING_DOTS="true" |
NewerOlder