Skip to content

Instantly share code, notes, and snippets.

View notdodo's full-sized avatar
☁️
randomASDF' or '1'='1

Edoardo Rosa notdodo

☁️
randomASDF' or '1'='1
View GitHub Profile
@notdodo
notdodo / steghide_brute.py
Last active September 8, 2019 15:32
CTF Multicore bruteforcer for `steghide`
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
import multiprocessing as mp
import os
import subprocess
import time
import sys
try:
import click
from colored import fg, stylize
@notdodo
notdodo / caesar.py
Last active May 4, 2018 13:59
Caesar Cipher bruteforcer with basic support for advanced string trasformation
#!/usr/bin/env python3
import sys
import base64
try:
import click
except Exception as e:
print(e)
print("Install click")
sys.exit(-1)
@notdodo
notdodo / anti-memcached.py
Last active March 12, 2018 18:16
List of all memcached servers from shodan and script to kill (flush_all) DDoSing IPs.
#!/usr/bin/env python
import json
import socket
import urllib.request
from random import shuffle
def send_flush(s):
s.sendall("{}\r\n".format("flush_all").encode())
print(s.recv(4096).decode().strip())
@notdodo
notdodo / share_eth0.zsh
Created February 7, 2018 17:44
Share WIFI network with a wired device (i.e.: RaspberryPI) using dnsmasq
#!/usr/bin/env zsh
INTERFACE_WIRED="enp6s0"
INTERFACE_INTERNET="wlp2s0"
sudo ip addr add 192.168.2.1/24 dev ${INTERFACE_WIRED}
# NAT
sudo iptables -A FORWARD -o eth0 -i ${INTERFACE_WIRED} -s 192.168.2.0/24 -m conntrack --ctstate NEW -j ACCEPT
sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -t nat -F POSTROUTING
@notdodo
notdodo / getETH.py
Last active February 28, 2018 08:48
Check current informations from ethermine API and ETH/EUR value
#!/usr/bin/env python3
import aiohttp
import asyncio
import async_timeout
import datetime
from colored import fg, stylize, attr
wallet_address = "ADDRESS"
urlAPI = "https://api.ethermine.org/miner/{}".format(wallet_address)
coinbase = "https://www.coinbase.com/api/v2/prices/ETH-EUR/spot"
@notdodo
notdodo / addjstopdf.py
Last active March 27, 2020 21:55
Add embedded JavaScript script to a PDF document (python3)
#!/usr/bin/env python3
# https://gist.github.com/edoz90/a441f2bdfc8c99c1999db0a3e8495fb6
# Author: notdodo
try:
from PyPDF2 import PdfFileWriter, PdfFileReader
import click
except ModuleNotFoundError:
print("pip install pypdf2 click")
import sys
@notdodo
notdodo / reoder_deobfuscator.py
Last active June 20, 2023 10:33
Deobfuscate a powershell script with re-ordering obfuscation
#!/usr/bin/env python3
#
# AUTHOR: Edoardo Rosa notdodo https://github.com/notdodo
# https://twitter.com/_d_0_d_o_
#
# Sample: ("{0}{1}{4}{3}{5}{2}" -f 'CONv','er','G','R','tTo-SecURest','In')
# Decoded output: CONvertTo-SecURestRInG
#
try:
@notdodo
notdodo / bulkblock.zsh
Last active April 15, 2018 21:17
Block an IP (better inside a loop for multiple IPs) in Wordfence plugin
#/usr/bin/env zsh
#
echo "Block IP \"${1}\""
echo "========================================="
local domain="www.mymegasite.org"
local user_agent="Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0"
local nonce="COPY-PASTED-NONCE"
local data="IP=${1}&reason=Manual+block+by+administrator&perm=1&action=wordfence_blockIP&nonce=${nonce}"
@notdodo
notdodo / zombie.py
Created May 14, 2017 23:33
Open either Shodan search results, a specified IP range, a single IP, or domain and perform an ipidseq probing using nmap. Note that for a successful probing, the command must be ran as root.
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
'''
Open either Shodan search results, a specified IP range, a
single IP, or domain and perform an ipidseq probing using nmap. Note that
for a successful probing, the command must be ran as root.
Shamefully inspired from device-pharmer.py by Dan McInerney
(please see https://github.com/DanMcInerney/device-pharmer )
@notdodo
notdodo / idlescanner.py
Created May 14, 2017 23:32
Dumb script to perform a zombie (idle) port scan using some free non-related service like imgur (by Martin Obiols)
#!/usr/bin/python
'''
Dumb script to perform a zombie (idle) port scan
using some free non-related service like imgur
Questions/Comments:
twitter.com/olemoudi
http://blog.makensi.es