killshadow.github.io's People
killshadow.github.io's Issues
ctf
from flag import flag
from Crypto.Util.number import long_to_bytes,bytes_to_long,getPrime
from os import urandom
def gen_arg():
p=getPrime(1024)
q=getPrime(1024)
open("log.txt","w").write(hex(p)+"\n"+hex(q))
n=p*q
e=getPrime(32)
return n,e,p,q
def mamacheck(c):
if long_to_bytes(c)[0:4]!="rose":
return False
return True
def babasay(m):
n,e,p,q=gen_arg()
c=pow(m,e,n)
print hex(n)
print hex(e)
print hex(c)
if not mamacheck(c):
e=getPrime(32)
c = pow(m, e, n)
print hex(e)
print hex(c)
m=bytes_to_long(flag+urandom(64))
babasay(m)
'''otuput:
0xe1b310980a0e1145c315cc5c7f4b29f5690bd256c5643adc0bcabe223cecc11c270726b50d9f77e17f9a104cea9ef327fa54638625b664a4e7644963209f15bdb9157cbf5d3887d724294a9c0a4aa09a2d5b44bc07be09074d35e850e2a79f7a14880f7b3e60dc341bf6ab10e63f09fde12ca49fde26663e9c82bc0ecf16050d7b0ee3c87374e716d8b7bb4e38b466d777e5992ae567d4baa317132de946df6a961dc1cabc1b76a82733695f08598ea39c63e81fc4c6030dba21f9b47f1e8e2b428f381b9eceacfa27a4c87eef5cbf955521032d664926a175b2af56bd695364e6bf521cc359d4aa63951153063e98da441879c2b1d210ffcdfd707a13cc79a3L
0xbfa19999L
0x9adcc6e47da4971e1c9c5221ebaf43c33d3c508deac0dd68f46073abeaf8e43a6d353c0bb7c3030023d006f744d6c026ef20eb2164702eed3d742609dd5242ca37161d78d926ebb4f4cfcdd4a2ae88962e0a4d1d667e973cba99bac0691740b94e34ec2871a068e9312777ff14697fa741292a01ea2c593bbbb2e44e35dc48af2455e0af62e8fdd2f94454ab3ddcffc9e1e889c359793bc57c53c54d1f61c3c95314e753a5651b8fd82dd9eb29b8840791ad56f3bf7a798eba22ebce0fcb8f0f3b579bfdf1073bcf2d79a4f86d08c2a111186a4d8748f3566f6a7079db4664659c773734bc3134112c5528f5929d4e7346659b9ba5f788777c471b8e5114141cL
0xdca9376dL
0x46c436d6d5bce21f481e1073982b3410ff94c1c7557dff94a9aa9055951087a3d02714b8c221d7cfb60d890fa9495ad4b835190f611f5234d4ce832a114392716b3873e4ce4e035a2d28745fdf2f61b11c54ee05d89753b3132efeeaa5de89e795a71950c5c6720fc7f2d184f25703e76521e1c5a9299dcb62d3ae02eaf655e546aef6e786d15bd03fabee72bf9117c9e0ace7d6e878f4f01046d1f28f2aab0604c8147c378219ab8626b34dff99bd62d6da325fd54cd394014e17a9b04fc673464c5e3d951b187c68ac3945b9df209ca23fff6ad3a6e6102dbe2afa66c43db392d6590d01e8459a02c9522775ab41121b697448017f6d04094daa7f3358de5cL
'''
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.