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 | |
# Sync time from HTTP response. update_time_from_web.sh | |
# Fix system time from retrieved webpage off of Internet. | |
# I need to do it this way because the system only has outbound http/s access | |
# to a couple websites and no outbound access to a time server. | |
# Use any highly available reference website. | |
SITE="http://www.openntpd.org/" | |
HTTP_PROXY=http://webproxy:port | |
HTTPS_PROXY=http://webproxy:port |
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
nmap -Pn -sS -sV -sC -p- -oA IP-out IP |
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
If you're having a problem decoding TLS traffic in Wireshark due to TLS 1.3 perfect forward secrecy then lower your browser's max TLS version. | |
In Linux configure ssl key logging | |
1. Open terminal, | |
export SSLKEYLOGFILE=/tmp/sslkeylog.log | |
2. Launch firefix from the same terminal. | |
firefox & | |
or | |
firefox-esr |
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 | |
# Generate a random time in 24H format | |
# Requires Bash because using builtin Random function | |
# Author: raresteak | |
HOUR=$(echo $(($RANDOM % 124)) ) | |
while [ $HOUR -lt "100" ]; do | |
HOUR=$(echo $(($RANDOM % 124)) ) | |
done | |
RHOUR=$(echo $HOUR | sed 's/^1//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/bash | |
# Create a persistent self restarting udp listener to recover from client disconnects | |
# Usage: | |
# nohup /path/to/udp_listener.sh & | |
PORT=60000 | |
RESTART=600 | |
while : ; do | |
/bin/netcat -u -l ${PORT} >> /path/to/output/file & |
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
<# | |
.SYNOPSIS | |
Create a random time in 24 hour format | |
.OUTPUTS | |
Outputs time to standard out. | |
.NOTES | |
Version: .1 | |
Author: raresteak |
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
tail --retry -s 2 -f /var/log/apache2/access.log | grep --line-buffered 404 | while read ; do echo "404 keyword found, $(doSomeCommand)" ; done |
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
export HISTSIZE=0 | |
export HISTFILE=/dev/null |
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
# requires shred | |
dd if=/dev/urandom of=junk bs=1M; shred -v -u -n 1 junk |
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 | |
# Create self contained html files with embedded images | |
# Usage | |
# ./html_picture_embed.sh picture.png > html_file.html | |
# Example https://pastebin.com/K3dDXjfA | |
PIC=$1 | |
echo -n '<html><img src="data:image/png;base64,' | |
base64 $PIC | tr -d '\n' | |
echo '"></html>' |