Skip to content

Instantly share code, notes, and snippets.

View rdapaz's full-sized avatar

ricdeez rdapaz

View GitHub Profile
@rdapaz
rdapaz / .gitignore
Created February 12, 2021 07:42 — forked from bradley219/.gitignore
PID C++ implementation
.DS_Store
@rdapaz
rdapaz / Hashmania.py
Created February 11, 2021 00:30
Clever data munging with hashes
abbrevs = [
'STP',
'TCP',
'TI',
'USB',
'UTP',
'VLAN',
'VLANs',
'VM',
'VMs',
@rdapaz
rdapaz / visioUpdater.py
Created January 14, 2021 23:53
Visio Updater
import os
import win32com.client
import re
import pprint
def pretty_print(o):
pp = pprint.PrettyPrinter(indent=4)
pp.pprint(o)
@rdapaz
rdapaz / ASA_tunnel.md
Created December 18, 2020 06:21
Configure Tunnel on ASA Firewall

Configure Tunnel on ASA

Phase 1 Configuration

Configure IKE V1

ASA1(config)# crypto ikev1 policy 10 
ASA1(config-ikev1-policy)# authentication pre-share 
@rdapaz
rdapaz / portscanner.ps1
Created December 17, 2020 07:12
Use Powershell as a port scanner
$range_of_ports = 1500 .. 1505
$ip = "10.230.149.232"
$range_of_ports | % { echo ((new-object Net.sockets.TCPClient).Connect($ip,$_)) (" Port $_ is open!") } 2>$null
https://www.sans.org/blog/pen-test-poster-white-board-powershell-built-in-port-scanner/
@rdapaz
rdapaz / hypriot.md
Last active December 14, 2020 23:34
Change Hostname and IP Address on Hypriot

Change hostname on hypriot

Option 1: Do it after the SD card has been imaged and loaded on first boot

Change hostname by editing each of these files:

/etc/hosts
/etc/hostname
/etc/cloud/cloud.cfg 
@rdapaz
rdapaz / getObjectsFromSecurityRules.py
Created November 18, 2020 09:07
Get Object Names from set commands in Palo Alto Firewall
import os
import re
import sqlite3
from pathlib import Path
def process(ary):
conn = sqlite3.connect(db_path)
cur = conn.cursor()
sql = """CREATE TABLE IF NOT EXISTS objects_in_rules (
id integer primary key,
@rdapaz
rdapaz / IguessIhavetoNameThis.sh
Last active October 16, 2025 23:23
Download youtube video as mp3
# Note to future self...
# Preparatory Steps
# -----------------
# pip3 install youtube-dl
# sudo apt-get install ffmpeg
url=https://www.youtube.com/watch?v=b9fUdJdlExU
#
yt-dlp -f 140 -x --audio-format m4a --no-playlist $url
# Convert it to mp3 with:
ffmpeg -i input.m4a music.mp3
@rdapaz
rdapaz / til.md
Last active October 7, 2020 13:34
TIL

Using Hashcat

echo -n "Password" | md5sum | tr -d " -" >> target_hashes.txt

echo -n "HELLO" | md5sum | tr -d " -" >> target_hashes.txt

echo -n "MYSECRET" | md5sum | tr -d " -" >> target_hashes.txt

echo -n "Test1234"| md5sum | tr -d " -" >> target_hashes.txt

@rdapaz
rdapaz / SubnetIPLister.py
Created October 7, 2020 04:14
List All IPs on a Subnet
import ipaddress
nw = ipaddress.IPv4Network('192.168.10.0/28')
for ip in nw:
print(ip)