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 / add_wp_user.sql
Created November 6, 2018 16:43
Add a Wordpress Admin user from MySQL
INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`) VALUES ('edoz90', MD5('passwordASD'), 'administrator', 'asd@asd.it', '0');
INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (SELECT max(id) FROM wp_users), 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (SELECT max(id) FROM wp_users), 'wp_user_level', '10');
@notdodo
notdodo / cleanvba.zsh
Created December 31, 2018 14:33
Clean VBA: this script should remove unused variables in obfuscated VBAs (should work also for other files)
#!/usr/bin/env zsh
#
toclean=${1}
while read line; do
local length=$(echo -n ${line} | \wc -m)
if [[ ${length} -ge 50 ]]; then
local match=$(echo ${line} | \awk '{print $1}')
local file_match=$(\rg -i ${match} * -c | \awk -F ':' '{print $1}')

Speed up videos

document.getElementById("video").playbackRate = 1.5;

VPN - NM

[vpn]
dev-type=tap
@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 / lfi_generator.py
Created October 27, 2019 20:36
Create PHP dockers (that are available on the official channel) to create a LFI test laboratory
#!/usr/bin/env python3
import glob
import requests
import subprocess
import sys
from bs4 import BeautifulSoup
from grp import getgrgid
from os import stat, path, chown
from pwd import getpwuid
@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 / DBus-spotify
Last active January 30, 2020 18:41
Python script to interact with DBus MediaPlayer2 interface, used by Spotify, VLC, mpd, MPlayer, etc (Info, Play/Pause, Next, Prev, Stop)
#!/usr/bin/env python3
# Author: edoz90
import sys
try:
# http://click.pocoo.org/5/why/
import click
import dbus
from colored import fg, stylize
except:
print("Need to install click, dbus-python and colored")
@notdodo
notdodo / lastrofi.zsh
Created February 23, 2020 21:55
rofi menu to help read Lastpass passwords.
#!/usr/bin/env zsh
if ! hash lpass 2>/dev/null; then
echo "Lastpass not installed"
exit -1
fi
if ! hash xsel 2>/dev/null; then
echo "xsel not installed"
exit -1
@notdodo
notdodo / parse_dump.py
Last active March 17, 2020 18:10
Parse `sqlmap` dumps from data breaches or leaks file into a JSON file
#!/usr/bin/env python3
# -*- encoding: ascii -*-
#
# AUTHOR: Edoardo Rosa dodo https://github.com/notdodo
#
# DESCRIPTION: Parse `sqlmap` dumps from data breaches or leaks into JSON files
#
# Some files have shitty encoding/chars and they must be educated:
# sed -i 's/[^[:print:]\t]//g; s/\\r//g' *.txt
import click
@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