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 | |
SECONDS=0 | |
RED='\033[0;31m' | |
WHITE='\033[1;37m' | |
CYAN='\033[0;36m' | |
YELLOW='\033[1;33m' | |
NC='\033[0m' # No Color | |
list='' |
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
[Unit] | |
Description=Tomcat 8.5 servlet container | |
After=network.target | |
[Service] | |
Type=forking | |
User=ws | |
Group=ws |
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/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 |
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 | |
services=$(networksetup -listnetworkserviceorder | grep 'Hardware Port') | |
while read line; do | |
sname=$(echo $line | awk -F "(, )|(: )|[)]" '{print $2}') | |
sdev=$(echo $line | awk -F "(, )|(: )|[)]" '{print $4}') | |
#echo "Current service: $sname, $sdev, $currentservice" | |
if [ -n "$sdev" ]; then | |
ifout="$(ifconfig $sdev 2>/dev/null)" |
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 | |
url=$1 | |
soap_head=’<?xml version=”1.0” encoding=”utf-8”?><s:Envelope s:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:s=”http://schemas. xmlsoap.org/soap/envelope/”><s:Body><u:GetGenericPortMappingEntry xmlns:u=”urn:upnp- org:serviceId:WANIPConnection.1#GetGenericPortMappingEntry”><NewPortMappingIndex>’ soap_tail=’</NewPortMappingIndex></u:GetGenericPortMappingEntry></s:Body></ s:Envelope>’ | |
for i in `seq 1 1000`; do | |
payload=$soap_head$i$soap_tail | |
curl -H ‘Content-Type: “text/xml;charset=UTF-8”’ -H ‘SOAPACTION: “urn:schemas- | |
upnp-org:service:WANIPConnection:1#GetGenericPortMappingEntry”’ --data “$payload” “$url” | |
echo “” done |
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
displaytime () { | |
local T=$SECONDS | |
local D=$((T/60/60/24)) | |
local H=$((T/60/60%24)) | |
local M=$((T/60%60)) | |
local S=$((T%60)) | |
[[ $D > 0 ]] && printf '%d days ' $D | |
[[ $H > 0 ]] && printf '%d hours ' $H | |
[[ $M > 0 ]] && printf '%d minutes ' $M | |
[[ $D > 0 || $H > 0 || $M > 0 ]] && printf 'and ' |
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 | |
# DoD Root Certificate install 19 July 2019 | |
# to do: add Firefix import | |
# set cert numbers as variables | |
# combine fingerprint functions | |
# check all root CA fingerprints | |
# compare against CRL | |
SECONDS='0' | |
NC='\e[0m' |
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 | |
#URL="https://www.splunk.com/en_us/download/splunk-enterprise.html" | |
URL="https://www.splunk.com/en_us/download/universal-forwarder.html" | |
OS_REGEX="linux-2\.6-x86_64\.rpm" | |
#OS_REGEX="Linux-x86_64\.md5" | |
RESPONSE=`curl -s --connect-timeout 10 --max-time 10 $URL` | |
LINK=`echo $RESPONSE | egrep -o "data-link=\"https://[^\"]+-${OS_REGEX}\"" | cut -c12- | rev | cut -c2- | rev` |
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
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 |
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
local nmap = require "nmap" | |
local shortport = require "shortport" | |
local sslcert = require "sslcert" | |
local stdnse = require "stdnse" | |
local string = require "string" | |
local math = require "math" | |
local table = require "table" | |
local tls = require "tls" | |
local vulns = require "vulns" | |
local have_ssl, openssl = pcall(require, "openssl") |