Skip to content

Instantly share code, notes, and snippets.

View maxrodrigo's full-sized avatar
🪐
(loop(print "code hack automate"))

Max Rodrigo maxrodrigo

🪐
(loop(print "code hack automate"))
View GitHub Profile
@maxrodrigo
maxrodrigo / crtsh-enum.sh
Last active October 27, 2020 01:23
`crt.sh` PostgreSQL interface subdomain query
#!/usr/bin/env bash
# Usage: ./crtsh-subdomains.sh domain.com
query="SELECT ci.NAME_VALUE NAME_VALUE FROM certificate_identity ci WHERE ci.NAME_TYPE = 'dNSName' AND reverse(lower(ci.NAME_VALUE)) LIKE reverse(lower('%.$1'));"
(echo $1; echo $query | \
psql -t -h crt.sh -p 5432 -U guest certwatch | \
sed -e 's:^ *::g' -e 's:^*\.::g' -e '/^$/d' | \
sed -e 's:*.::g';) | sort -u
@maxrodrigo
maxrodrigo / youtube-to-gif.sh
Created October 15, 2020 14:38
Creates gif for the given youtube video
#!/usr/bin/env bash
# example: ./yt-2-gif.sh dQw4w9WgXcQ 1 3
VID=$1
SKIP_SECONDS=$2
TIME=$3
youtube-dl --no-progress -o ${VID} ${VID}
ffmpeg -y -v error -ss ${SKIP_SECONDS} -t ${TIME} \
[Incremental:RockYou-LanMan]
File = $JOHN/rockyou-lanman.chr
MinLen = 0
MaxLen = 7
CharCount = 69
[Incremental:rockyou]
File = $JOHN/rockyou.chr
MinLen = 0
MaxLen = 8
/NetServer\bin\stable\apache\php.ini
/PHP\php.ini
/Program Files\Apache Group\Apache2\conf\httpd.conf
/Program Files\Apache Group\Apache\conf\httpd.conf
/Program Files\Apache Group\Apache\logs\access.log
/Program Files\Apache Group\Apache\logs\error.log
/Program Files\xampp\apache\conf\httpd.conf
/Volumes/Macintosh_HD1/opt/apache/conf/httpd.conf
/Volumes/Macintosh_HD1/opt/apache2/conf/httpd.conf
/Volumes/Macintosh_HD1/opt/httpd/conf/httpd.conf
C:/$recycle.bin/s-1-5-18/desktop.ini
C:/MININT/SMSOSD/OSDLOGS/VARIABLES.DAT
C:/apache/log/access.log
C:/apache/log/access_log
C:/apache/log/error.log
C:/apache/log/error_log
C:/apache/logs/access.log
C:/apache/logs/access_log
C:/apache/logs/error.log
C:/apache/logs/error_log
@maxrodrigo
maxrodrigo / empty-commit.sh
Created April 30, 2020 06:46
Run Github Actions
git commit --allow-empty -m "Trigger rebuild"
git push
@maxrodrigo
maxrodrigo / reintall-macos-lion.md
Created March 3, 2020 17:16
Reinstall MacOS Lion 10.6 Without AppleID

Boot your laptop in Recovery Mode (cmd+R)

  1. Open the Terminal and find the Apple_Boot Recovery HD.
# diskutil list
/dev/disk0
 #:                       TYPE NAME               SIZE       IDENTIFIER
 0:      GUID_partition_scheme                   *250.1 GB   disk0
 1:                        EFI                    209.7 MB   disk0s1
 2:                  Apple_HFS Macintosh HD       249.2 GB   disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3

rsync -avhW --no-compress --progress /src/ /dst/

  • -a is for archive, which preserves ownership, permissions etc.
  • -v is for verbose, so I can see what's happening (optional)
  • -h is for human-readable, so the transfer rate and file sizes are easier to read (optional)
  • -W is for copying whole files only, without delta-xfer algorithm which should reduce CPU load
  • --progress so I can see the progress of large files (optional)
@maxrodrigo
maxrodrigo / iso-3166-1-database.json
Created April 5, 2019 11:25
ISO 3166-1 - Codes for the representation of names of countries and their subdivisions.
{
"3166-1": [
{
"alpha_2": "AW",
"alpha_3": "ABW",
"name": "Aruba",
"numeric": "533"
},
{
"alpha_2": "AF",
@maxrodrigo
maxrodrigo / docker-cleanup.sh
Created November 9, 2018 15:38
Docker cleanup script
#!/bin/bash
docker rm -v $(docker ps -a -q -f status=exited)
docker rmi $(docker images -f "dangling=true" -q)