Skip to content

Instantly share code, notes, and snippets.

View intrd's full-sized avatar
🚫
Become a ghost

intrd

🚫
Become a ghost
View GitHub Profile
@intrd
intrd / copy.html
Last active October 16, 2021 13:12
## Copy, paste and get hacked (PoC)
# @author intrd - http://dann.com.br/ (based on https://lifepluslinux.blogspot.com.br/2017/01/look-before-you-paste-from-website-to.html)
# @license Creative Commons Attribution-ShareAlike 4.0 International License - http://creativecommons.org/licenses/by-sa/4.0/
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<style>
@intrd
intrd / int_wiki.py
Last active March 3, 2017 05:59
Wikipedia parser (birth data extractor)
## Wikipedia parser (birth data extractor)
# @author intrd - http://dann.com.br/ (based on @JBernardo's suggestion http://stackoverflow.com/a/12250675)
# @license Creative Commons Attribution-ShareAlike 4.0 International License - http://creativecommons.org/licenses/by-sa/4.0/
import re, requests
from bs4 import BeautifulSoup
def wikiGet(name):
url = 'http://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&rvsection=0&titles='+name+'&format=xml'
res = requests.get(url)
@intrd
intrd / int_anagram.py
Last active March 3, 2017 05:58
intrd's anagram solver v.0.1
#!/usr/bin/python
## intrd's anagram solver v0.1
# @author intrd - http://dann.com.br/ (based on http://www.stealthcopter.com/blog/2009/11/python-anagram-solver/)
# @license Creative Commons Attribution-ShareAlike 4.0 International License - http://creativecommons.org/licenses/by-sa/4.0/
import sys
def anagramchk(word,chkword):
for letter in word:
if letter in chkword:
@intrd
intrd / int_pipebruteforcer.py
Last active March 8, 2017 18:39
intrd's multithread pipe/stdin bruteforcer v1.2 (sample: bruteforcing .cpt ccrypt encrypted files)
# This tool is deprecated, please use https://github.com/intrd/nozzlr
#!/usr/bin/env python
## intrd's multithread pipe/stdin bruteforcer v1.2 (sample: bruteforcing .cpt ccrypt encrypted files)
# @author intrd - http://dann.com.br/ (based on https://www.phillips321.co.uk/2013/08/31/multi-threading-python-a-quick-example/)
# @license Creative Commons Attribution-ShareAlike 4.0 International License - http://creativecommons.org/licenses/by-sa/4.0/
import sys,Queue,threading,hashlib,os
from subprocess import Popen, PIPE, STDOUT
@intrd
intrd / rsa_egcd.py
Last active July 16, 2022 05:32
RSA - Given p,q and e.. recover and use private key w/ Extended Euclidean Algorithm - crypto150-what_is_this_encryption @ alexctf 2017
#!/usr/bin/python
## RSA - Given p,q and e.. recover and use private key w/ Extended Euclidean Algorithm - crypto150-what_is_this_encryption @ alexctf 2017
# @author intrd - http://dann.com.br/ (original script here: http://crypto.stackexchange.com/questions/19444/rsa-given-q-p-and-e)
# @license Creative Commons Attribution-ShareAlike 4.0 International License - http://creativecommons.org/licenses/by-sa/4.0/
import binascii, base64
p = 0xa6055ec186de51800ddd6fcbf0192384ff42d707a55f57af4fcfb0d1dc7bd97055e8275cd4b78ec63c5d592f567c66393a061324aa2e6a8d8fc2a910cbee1ed9
q = 0xfa0f9463ea0a93b929c099320d31c277e0b0dbc65b189ed76124f5a1218f5d91fd0102a4c8de11f28be5e4d0ae91ab319f4537e97ed74bc663e972a4a9119307
e = 0x6d1fdab4ce3217b3fc32c9ed480a31d067fd57d93a9ab52b472dc393ab7852fbcb11abbebfd6aaae8032db1316dc22d3f7c3d631e24df13ef23d3b381a1c3e04abcc745d402ee3a031ac2718fae63b240837b4f657f29ca4702da9af22a3a019d68904a969ddb01bcf941df70af042f4fae5cbeb9c2151b324f387e525094c41
@intrd
intrd / rsa_small_primes.py
Last active March 3, 2017 05:58
RSA - Recover and use private key generated w/ small prime numbers - crypto200-poor_rsa @ alexctf 2017
#!/usr/bin/python
## RSA - Recover and use private key generated w/ small prime numbers - crypto200-poor_rsa @ alexctf 2017
# @author intrd - http://dann.com.br/ (original script here: http://crypto.stackexchange.com/questions/19444/rsa-given-q-p-and-e)
# @license Creative Commons Attribution-ShareAlike 4.0 International License - http://creativecommons.org/licenses/by-sa/4.0/
from Crypto.PublicKey import RSA
import gmpy, base64
pub = open("key.pub", "r").read()
pub = RSA.importKey(pub)
@intrd
intrd / many_time_pad_attack.py
Last active December 18, 2023 05:04
OTP - Recovering the private key from a set of messages that were encrypted w/ the same private key (Many time pad attack) - crypto100-many_time_secret @ alexctf 2017
#!/usr/bin/python
## OTP - Recovering the private key from a set of messages that were encrypted w/ the same private key (Many time pad attack) - crypto100-many_time_secret @ alexctf 2017
# @author intrd - http://dann.com.br/
# Original code by jwomers: https://github.com/Jwomers/many-time-pad-attack/blob/master/attack.py)
import string
import collections
import sets, sys
# 11 unknown ciphertexts (in hex format), all encrpyted with the same key
@intrd
intrd / math_bot_parser.py
Last active October 20, 2023 01:46
Math bot script - prog100-math_bot @ alexctf 2017
#!/usr/bin/python
## Math bot script - prog100-math_bot @ alexctf 2017
# @author intrd - http://dann.com.br/ (original script here: http://crypto.stackexchange.com/questions/19444/rsa-given-q-p-and-e)
# @license Creative Commons Attribution-ShareAlike 4.0 International License - http://creativecommons.org/licenses/by-sa/4.0/
# int_netcat.py - https://gist.github.com/intrd/00a39c83f752acf81775bfa9721e745a
import re, sys, string, time
sys.path.append("../../LIBS/")
from int_netcat import Netcat
@intrd
intrd / int_pipebruteforcer_alexctf.py
Last active March 3, 2017 05:57
Pipe bruteforcer script to extract the flag @ rev100-re2 @ alexctf2k17
#!/usr/bin/python
## Pipe bruteforcer to extract the flag - rev100-re2 @ alexctf2k17
# @author intrd - http://dann.com.br/
# @license Creative Commons Attribution-ShareAlike 4.0 International License - http://creativecommons.org/licenses/by-sa/4.0/
import sys, time
from subprocess import Popen, PIPE, STDOUT
fixed=""
i=0
@intrd
intrd / int_ftpbruteforcer.py
Last active March 8, 2017 18:38
intrd's multithread FTP bruteforcer v1.5 (tested w/ ProFTPd anyver)
# This tool is deprecated, please use https://github.com/intrd/nozzlr
#!/usr/bin/env python
## intrd's multithread FTP bruteforcer v1.5 (tested w/ ProFTPd anyver)
# @author intrd - http://dann.com.br/ (thx to phillips321.co.uk/2013/08/31/multi-threading-python-a-quick-example/)
# @license Creative Commons Attribution-ShareAlike 4.0 International License - http://creativecommons.org/licenses/by-sa/4.0/
# int_netcat.py - https://gist.github.com/intrd/00a39c83f752acf81775bfa9721e745a
import sys,Queue,threading,hashlib,os,re,string,time