This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## ## ## | |
### ### # # # ##### # # ##### | |
# # # # # # # # # # | |
# # ## # # ### ## # ## ## # #### ## ### ## # # # ## ## ## ### ## ## # | |
##### # # # # # ## # # ### # # # # # # # #### # # # # # # ## | |
# # # # # ### # # # # # # # ### # # # # # # # # #### # | |
# # # # # # # # # # # # # # # # # # # # # # # # # # | |
### ### ### ### ### #### ### # ##### ### ## ## #### ### ### ##### #### ## ## ### ### | |
# # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <RBD_Timer.h> | |
#include <RBD_Light.h> | |
#include "SD.h" | |
#include "TMRpcm.h" | |
#include "SPI.h" | |
#define SD_ChipSelectPin 4 | |
TMRpcm tmrpcm; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from bs4 import BeautifulSoup | |
import requests | |
import json | |
import subprocess | |
import sys | |
import certifi | |
def log_error(e): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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] } |