View searchpackage.py
This file contains 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 | |
import json | |
import sys | |
if (len(sys.argv) != 3): | |
sys.stderr.write('Search RIO Package for string, identify matching group' | |
' and short title\n') | |
sys.stderr.write(f'Usage: {sys.argv[0]} package_export.json "keyword"\n') | |
sys.exit(0) |
View lm2ntcrack.py
This file contains 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 | |
# Most of this code is from @clr2of8's Domain Password Audit Tool: | |
# https://github.com/clr2of8/DPAT | |
import hashlib | |
import os | |
import sys | |
import textwrap | |
def wrap(body): |
View Copy-RemoteWindowsEventLogs.ps1
This file contains 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://chat.openai.com/share/6d96527b-288d-45a9-8eb4-e8b43d52486a | |
# Input parameters | |
param ( | |
[Parameter(Mandatory=$true)] | |
[string]$inputFile, | |
[Parameter(Mandatory=$true)] | |
[System.Management.Automation.PSCredential]$Credential | |
) |
View summarizelinks.js
This file contains 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
// Useful JavaScript to make a simple table of links from an open page using the browser Inspector console. | |
// https://www.datablist.com/learn/scraping/extract-urls-from-webpage | |
var x = document.querySelectorAll("a"); | |
var myarray = [] | |
for (var i=0; i<x.length; i++){ | |
var nametext = x[i].textContent; | |
var cleantext = nametext.replace(/\s+/g, ' ').trim(); | |
var cleanlink = x[i].href; | |
myarray.push([cleantext,cleanlink]); |
View debugrequests.py
This file contains 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 logging | |
import requests | |
import http.client | |
http.client.HTTPConnection.debuglevel = 1 | |
logging.basicConfig() | |
logging.getLogger().setLevel(logging.DEBUG) | |
requests_log = logging.getLogger("requests.packages.urllib3") | |
requests_log.setLevel(logging.DEBUG) | |
requests_log.propagate = True |
View apacheanon.py
This file contains 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 | |
# Anonymize the first column (delimited by space) IPv4 address in an ASCII file with a | |
# consistent IP address that excludes RFC1918 and other internal network IP addresses. | |
# You can use this to take an Apache (or Nginx or probably other log files as well) file | |
# and change each of the source IP addresses to another value that is preserved consistently | |
# throughout the output log file. | |
# Changes to the log file are written to STDOUT, so run this as | |
# `apacheanon.py access.log > new-access.log`. | |
# | |
# 2022-11-16 Joshua Wright |
View profile.ps1
This file contains 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
function prompt { | |
"$pwd`nPS > " | |
} |
View awsUserPrivs.sh
This file contains 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 | |
# https://stackoverflow.com/a/69728383/5089189 CC-BY-SA 4.0 | |
function getUserIamPermissions() { | |
export AWS_PAGER=""; | |
local _user="${1}"; | |
local outputManagedPolicies=""; | |
local outputUserPolicies=""; | |
local outputManagedGroupPolicies=""; |
View asciidoctor-vimrc
This file contains 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
" Insert the template file for an Asciidoc listing. This file is essentially | |
" this text: | |
" .Caption | |
" [[listing-]] | |
" [subs="+quotes,+replacements"] | |
" ---- | |
" | |
" ---- | |
" Customize the file and the file path as needed. | |
function! InsertAsciidocListing() |
View nmap-top-tcpport-commadsep-list.sh
This file contains 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
grep -v '^#' /usr/local/Cellar/nmap/7.92/share/nmap/nmap-services | grep '/tcp' | sort -r -k3 | awk '{print $2}' | sed 's,/tcp,,' | head -40 | sort -n | gsed -z 's/\n/,/g;s/,$/\n/' |
NewerOlder