Skip to content

Instantly share code, notes, and snippets.

@dadatuputi
dadatuputi / rot13.py
Last active May 25, 2020 17:59
Encryption: Encrypt an ASCII [a-zA-Z0-9] string with a Caeser Cipher (ROT-N) encryption
import argparse
import sys
# Author: Bradford Law
# Author Website: https://bradford.la
# Description: A simple rot13 implementation for Python 3.x
# get args with argparse library:
# https://docs.python.org/3/library/argparse.html
parser = argparse.ArgumentParser(description='A simple rot13 implementation in Python.', prog='rot13')
@dadatuputi
dadatuputi / derbycon2016crypto.py
Created May 25, 2020 17:54
CTF: Derbycon 2016 Hilary E-Mail Buster
## ## ##
### ### # # # ##### # # #####
# # # # # # # # # #
# # ## # # ### ## # ## ## # #### ## ### ## # # # ## ## ## ### ## ## #
##### # # # # # ## # # ### # # # # # # # #### # # # # # # ##
# # # # # ### # # # # # # # ### # # # # # # # # #### #
# # # # # # # # # # # # # # # # # # # # # # # # # #
### ### ### ### ### #### ### # ##### ### ## ## #### ### ### ##### #### ## ## ### ###
# #
@dadatuputi
dadatuputi / chanhop.sh
Created May 25, 2020 17:52
Wi-Fi Channel Hoping BASH Script
#!/bin/bash
# From http://www.willhackforsushi.com/books/377_eth_2e_06.pdf and referenced by https://wiki.wireshark.org/CaptureSetup/WLAN#Channel_Hopping (dead/spam link)
# Hop channels every second
IFACE=ath0
IEEE80211bg="1 2 3 4 5 6 7 8 9 10 11"
IEEE80211bg_intl="$IEEE80211b 12 13 14"
IEEE80211a="36 40 44 48 52 56 60 64 149 153 157 161"
IEEE80211bga="$IEEE80211bg $IEEE80211a"
@dadatuputi
dadatuputi / HalloweenSlugOLantern.ino
Created May 25, 2020 17:49
Halloween Arduino Slug: Arduino code for a motion-activated screaming pumpkin slug
#include <RBD_Timer.h>
#include <RBD_Light.h>
#include "SD.h"
#include "TMRpcm.h"
#include "SPI.h"
#define SD_ChipSelectPin 4
TMRpcm tmrpcm;
@dadatuputi
dadatuputi / edgeos_access.sh
Created May 16, 2020 22:36
EdgeOS script to enable or disable access to webui or ssh / useful with task-schedule
#!/bin/vbash
# From https://wiki.vyos.net/wiki/Configuration_scripting
# Check for correct group
if [ "$(id -g -n)" != 'vyattacfg' ] ; then
echo "switching to vyattacfg group"
exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@"
exit 0
fi
@dadatuputi
dadatuputi / proxmox_access.sh
Last active May 16, 2020 22:41
Proxmox access lockout script - lock out access to webui/SSH, best used with crontab schedule
#!/usr/bin/env bash
file=/etc/pve/firewall/cluster.fw
drop_rule="IN DROP -log nolog"
group_rule="IN ACCEPT -source 192.168.1.0\/24 -log nolog"
function comment {
replace "$1" "|$1" $2
}
@dadatuputi
dadatuputi / embupdate.py
Last active February 21, 2024 11:29
Script to automatically upgrade Emby on Debian or Ubuntu
#!/usr/bin/env python3
from bs4 import BeautifulSoup
import requests
import json
import subprocess
import sys
import certifi
def log_error(e):
@dadatuputi
dadatuputi / findpi.ps
Last active October 4, 2021 12:47
Powershell script to find Raspberry Pis on a local network
# https://learn-powershell.net/2016/04/22/speedy-ping-using-powershell/
# Scan the local network
$Hosts = 1..254 | foreach {"192.168.1.$_"}
$Tasks = $Hosts | foreach {(New-Object System.Net.NetworkInformation.Ping).SendPingAsync($_)}
[Threading.Tasks.Task]::WaitAll($Tasks)
#$Tasks.Result
# Scan the arp table for MAC addresses that are registered to the Pi Foundation
arp -a | select-string "b8-27-eb" |% { $_.ToString().Trim().Split(" ")[0] }
@dadatuputi
dadatuputi / Remove_Hash_from_context_menu.reg
Created October 31, 2018 13:36
Windows 10 Hash Context Menu Uninstall
Windows Registry Editor Version 5.00
; Created by: Shawn Brink
; Created on: March 5th 2017
; Tutorial: https://www.tenforums.com/tutorials/78681-file-hash-context-menu-add-windows-8-windows-10-a.html
[-HKEY_CLASSES_ROOT\*\shell\hash]
@dadatuputi
dadatuputi / Add_Hash_to_context_menu.reg
Created October 31, 2018 13:35
Windows 10 Hash Context Menu Install
Windows Registry Editor Version 5.00
; Created by: Shawn Brink
; Created on: March 5th 2017
; Tutorial: https://www.tenforums.com/tutorials/78681-file-hash-context-menu-add-windows-8-windows-10-a.html
[HKEY_CLASSES_ROOT\*\shell\hash]
"MUIVerb"="Hash"
"SubCommands"=""