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
$WShell = New-Object -com "Wscript.Shell" | |
while ($true) | |
{ | |
Echo "Key press" | |
$WShell.sendkeys("{SCROLLLOCK}") | |
Start-Sleep -Milliseconds 100 | |
$WShell.sendkeys("{SCROLLLOCK}") | |
Start-Sleep -Seconds 300 | |
} |
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
python3 -c "import urllib.request;urllib.request.urlretrieve('https://example.com/spam.tar', filename='spam.tar')" |
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
for i in $(id -G); do find / -type f \! -user $(whoami) -gid $i -perm /g+w -exec ls -l {} \; 2>/dev/null | grep -v proc\/ ; 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
#!/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>' |
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
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
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
<# | |
.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
#!/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
#!/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') |