To compare nmap scans use 'ndiff' https://operationsbynumbers.wordpress.com/2011/08/24/use-nmap-to-track-network-changes/
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 | |
if [ "$1" ] | |
then | |
find "$1" -name '*.flac' | while read fn; | |
do | |
basename=$(basename "$fn" .flac).mp3 | |
dirname=$(dirname "$fn") | |
outfile="$dirname/$basename" |
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 | |
#From http://brakertech.com/linux-find-large-files/ | |
# find large files | |
echo "find files over 100MB" | |
find / -type f -size +100000k -exec ls -lh {} \; |
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
#From http://unix.stackexchange.com/questions/88702/change-chkconfig-used-by-centos-6-3-to-print-on-in-bright-green-like-ubuntus/88706#88706 | |
alias chkconfig="chkconfig | perl -pe 'use Term::ANSIColor; s/\bon\b/color(\"green\").on.color(\"reset\")/ige;'" |
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 | |
############################################################################### | |
# USAGE: idc-certadd | |
# | |
# Allows user to: | |
# 1. Create a new certificate to be kept in OSCARS.jks | |
# 2. Import a signed certificate into OSCARS.jks | |
# 3. Import a trusted certificate into OSCARS.jks or ssl-keystore.jks | |
############################################################################### |
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 | |
# get_amis.sh | |
# Return a list of all ami's in use in aws | |
aws ec2 describe-instances --query 'Reservations[*].Instances[*].[ImageId,Tags[*]]' | grep ami | perl -pi -e "s/,//g;" | perl -pi -e "s/\"//g;" | perl -pi -e "s/\s+/\n/g;" | grep -v "^$" |
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
# ediscovery_search_exported_msg_files.ps1 | |
# Search through exported .msg files from content search (exchange compliance center) and return a spreadsheet of email addresses and matched URLs | |
# Kill outlook | |
cmd.exe /c "taskkill /F /IM outlook.exe /T 2> nul" | |
$scriptPath = $(split-path $myinvocation.mycommand.definition) | |
$inputPath = "$($scriptPath)\inputMails" | |
# Find all .msg files recursively |
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 | |
######################################################################### | |
# # | |
# # | |
# NATO String converter # | |
# # | |
# Description: converts string (first parameter given) # | |
# to NATO phonetics-alphabet # | |
# # |
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 | |
# Usage: ./ipinfo.sh file_containing_one_ip_per_line | |
filename=$1 | |
ipAddresses=`cat $filename` | |
`echo "" > out.txt` #To empty the file | |
readonly ourPath="$(dirname $0)" |
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 | |
# Filename: showdupes.sh | |
# source: http://brakertech.com/compare-two-files-and-print-lines-that-match/ | |
# this file takes two text files as input | |
# sorts them and outputs lines from | |
# file 2 that match file 1 | |
if [ -f "$1" ] && [ -f "$2" ] | |
then | |
awk 'NR==FNR{arr[$0];next} $0 in arr' $1.tmp $2.tmp; |
OlderNewer