Skip to content

Instantly share code, notes, and snippets.

@jfeilbach
jfeilbach / sslv2.nse
Created August 7, 2019 15:18
test for ssl v2 ciphers
local shortport = require "shortport"
local sslcert = require "sslcert"
local sslv2 = require "sslv2"
description = [[
Determines whether the server supports obsolete and less secure SSLv2, and discovers which ciphers it
supports.
]]
---
@jfeilbach
jfeilbach / ssl-enum-ciphers.nse
Created August 7, 2019 15:16
test tls connection
local coroutine = require "coroutine"
local math = require "math"
local nmap = require "nmap"
local shortport = require "shortport"
local sslcert = require "sslcert"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
local tls = require "tls"
@jfeilbach
jfeilbach / backup.sh
Last active May 21, 2022 16:43
rsync downloads to remote storage
rsync -avhz --stats --progress --exclude='$RECYCLE.BIN' --exclude='$Recycle.Bin' --exclude='.AppleDB' --exclude='.AppleDesktop' --exclude='.AppleDouble' --exclude='.com.apple.timemachine.supported' --exclude='.dbfseventsd' --exclude='.DocumentRevisions-V100*' --exclude='.DS_Store' --exclude='.fseventsd' --exclude='.PKInstallSandboxManager' --exclude='.Spotlight*' --exclude='.SymAV*' --exclude='.symSchedScanLockxz' --exclude='.TemporaryItems' --exclude='.Trash*' --exclude='.vol' --exclude='.VolumeIcon.icns' --exclude='Desktop DB' --exclude='Desktop DF' --exclude='hiberfil.sys' --exclude='lost+found' --exclude='Network Trash Folder' --exclude='pagefile.sys' --exclude='Recycled' --exclude='RECYCLER' --exclude='System Volume Information' --exclude='Temporary Items' --exclude='Thumbs.db' /Volumes/Raid\ 0/Torrent\ Downloads/ /Volumes/vol2/ops_torrents/
--exclude='$RECYCLE.BIN' \
--exclude='$Recycle.Bin' \
--exclude='.AppleDB' \
--exclude='.AppleDesktop' \
--exclude='.AppleDouble' \
--exclude='.com.apple.timemachin
@jfeilbach
jfeilbach / export_iam.py
Created July 8, 2019 20:59
export all the things
import boto3
import json
client = boto3.client('iam')
paginator = client.get_paginator('list_policies')
response_iterator = paginator.paginate(Scope='AWS')
managed_policies = []
for response in response_iterator:
for policy in response['Policies']:
@jfeilbach
jfeilbach / zerotier.xml
Created June 12, 2019 17:27
docker template for zerotier
<?xml version="1.0"?>
<Container version="2">
<Name>ZeroTier</Name>
<Repository>spikhalskiy/zerotier</Repository>
<Registry>https://registry.hub.docker.com/u/spikhalskiy/zerotier/</Registry>
<Network>host</Network>
<MyIP/>
<Privileged>true</Privileged>
<Support>https://lime-technology.com/forums/topic/72030-support-spikhalskiy-zerotier/</Support>
<Project/>
@jfeilbach
jfeilbach / my-plex.xml
Created June 11, 2019 23:53
Plex Media Server docker template
<?xml version="1.0"?>
<Container version="2">
<Name>plex</Name>
<Repository>linuxserver/plex</Repository>
<Registry>https://hub.docker.com/r/linuxserver/plex/</Registry>
<Network>host</Network>
<MyIP/>
<Privileged>false</Privileged>
<Support>https://forums.unraid.net/topic/40463-support-linuxserverio-plex-media-server/</Support>
<Project>https://www.plex.tv/</Project>
@jfeilbach
jfeilbach / move_torrent_host.sh
Last active June 10, 2019 21:10
move torrents and torrent metadata to new host and client
#!/bin/bash
# Move torrent data and metadata from local transmission client to new host running transmission.
# This was made for MacOS
# requires transmission, install via brew. 'brew install transmission'
SECONDS=0
id=${1}
tracker='t.myanonamouse.net' # search string for tracker name, results will be transferred
cmd='/usr/local/bin/transmission-remote'
show='/usr/local/bin/transmission-show'
@jfeilbach
jfeilbach / test_net.sh
Created June 7, 2019 20:08
test all network interfaces and get info on MacOS
#!/bin/sh
clear
sExternalMACALService="http://dns.kittell.net/macaltext.php?address="
# List all Network ports
NetworkPorts=$(ifconfig -uv | grep '^[a-z0-9]' | awk -F : '{print $1}')
#echo $NetworkPorts
# Function to convert IP Subnet Mask to CIDR
try:
season_data = requests.get(ERGAST_SEASON.format(PAGE_SIZE, OFFSET)).json()['MRData']
pages = int(season_data['total']) / int(season_data['limit'])
if pages > 0:
for page in range(1, pages):
offset = page*PAGE_SIZE
page_data = requests.get(ERGAST_SEASON.format(PAGE_SIZE, offset))
season_data.update(page_data.json()['MRData'])
races = sorted(filter(lambda x: (x['date'] <= pendulum.now()), [{'name': race['raceName'], 'date': pendulum.parse(race['date']+'T'+race['time']), } for race in season_data['RaceTable']['Races']]), key=lambda x: x['date'])
for torrent_id in client.list():
@jfeilbach
jfeilbach / check_race_dl.sh
Last active May 26, 2019 23:16
Check for download availability on Mac
#!/bin/bash
# MacOS torrent availbility notification and start download
# use gnu sed (/usr/local/bin/gsed) provided by brew instead of macos sed
NAME='Monaco'
EXCLUDE='Qualifying|Show|Notebook|SD'
URL='https://www.ettv.to/user/smcgill1969'
DOM='https://www.ettv.to'
HOST='localhost'
PORT='9091'