Skip to content

Instantly share code, notes, and snippets.

@ethzero
ethzero / pistatus.sh
Last active July 1, 2021 14:37
Get power, ARM frequency, CPU throttle, and temperature status of a Raspberry Pi 4
#!/bin/bash
# Source/credit: https://www.raspberrypi.org/forums/viewtopic.php?t=254024
STATUS=$(vcgencmd get_throttled | sed -n 's|^throttled=\(.*\)|\1|p')
if [[ ${STATUS} -ne 0 ]]; then
echo ""
if [ $((${STATUS} & 0x00001)) -ne 0 ]; then
echo "Power is currently Under Voltage"
elif [ $((${STATUS} & 0x10000)) -ne 0 ]; then
# Copyright 2019, Alexander Hass
# https://www.hass.de/content/setup-microsoft-windows-or-iis-ssl-perfect-forward-secrecy-and-tls-12
#
# After running this script the computer only supports:
# - TLS 1.2
#
# Version 3.0.1, see CHANGELOG.txt for changes.
Write-Host 'Configuring IIS with SSL/TLS Deployment Best Practices...'
Write-Host '--------------------------------------------------------------------------------'
@ethzero
ethzero / pushover
Created October 5, 2020 20:54 — forked from outadoc/pushover
Pushover Bash Script
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage: ./pushover <message> [title]"
exit
fi
MESSAGE=$1
TITLE=$2
# Source: https://www.sysadmins.lv/blog-en/test-web-server-ssltls-protocol-support-with-powershell.aspx
function Test-ServerSSLSupport {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true, ValueFromPipeline = $true)]
[ValidateNotNullOrEmpty()]
[string]$HostName,
[UInt16]$Port = 443
)
@ethzero
ethzero / Cyberpunk_2077-session.md
Created June 12, 2019 15:23
Cyberpunk_2077-session.md
ethzero@Europa:~$ ssh [email protected] -p 2020
[email protected]’s password:
WhenItsDone
 ___________  ____________ _____   ___ _____ _   _______  ______ ___________
/  __ \  _  \ | ___ \ ___ \  _  | |_  |  ___| | / /_   _| | ___ \  ___|  _  \
| /  \/ | | | | |_/ / |_/ / | | |   | | |__ | |/ /  | |   | |_/ / |__ | | | |
| |   | | | | |  __/|    /| | | |   | |  __||    \  | |   |    /|  __|| | | |
| \__/\ |/ /  | |   | |\ \\ \_/ /\__/ / |___| |\  \ | |   | |\ \| |___| |/ /
 \____/___/   \_|   \_| \_|\___/\____/\____/\_| \_/ \_/   \_| \_\____/|___/
@ethzero
ethzero / Journal.190104145532.01.log
Created January 5, 2019 22:48
For Frontier Developments, Journal.190104145532.01.log
This file has been truncated, but you can view the full file.
{ "timestamp":"2019-01-04T14:55:32Z", "event":"Fileheader", "part":1, "language":"English\\UK", "gameversion":"3.3.1.501 EDH", "build":"r190817/r0 " }
{ "timestamp":"2019-01-04T14:55:32Z", "event":"Music", "MusicTrack":"NoTrack" }
{ "timestamp":"2019-01-04T14:55:32Z", "event":"Music", "MusicTrack":"MainMenu" }
{ "timestamp":"2019-01-04T14:56:19Z", "event":"Friends", "Status":"Online", "Name":"Franklyn Sylveste" }
{ "timestamp":"2019-01-04T14:56:19Z", "event":"Friends", "Status":"Online", "Name":"Jongi Hu" }
{ "timestamp":"2019-01-04T14:56:19Z", "event":"Friends", "Status":"Online", "Name":"Sternenjäger" }
{ "timestamp":"2019-01-04T14:56:19Z", "event":"Friends", "Status":"Online", "Name":"Catskin" }
{ "timestamp":"2019-01-04T14:56:19Z", "event":"Friends", "Status":"Online", "Name":"br4iny" }
{ "timestamp":"2019-01-04T14:56:19Z", "event":"Friends", "Status":"Online", "Name":"SiAlON" }
{ "timestamp":"2019-01-04T14:56:19Z", "event":"Friends", "Status":"Online", "Name":"MarcusSebeca" }
# Copyright 2017, Alexander Hass
# http://www.hass.de/content/setup-your-iis-ssl-perfect-forward-secrecy-and-tls-12
#
# Version 1.8
# - Windows 2016 powershell 5.1.14393.1532 requires 'else' statements in the same line after to the closing 'if' curly quote.
# Version 1.7
# - Windows Version compare failed. Get-CimInstance requires Windows 2012 or later.
# Version 1.6
# - OS version detection for cipher suites order.
# Version 1.5
@ethzero
ethzero / PSFileTransferByClipboard.ps1
Last active August 22, 2023 11:45
Transferring binary content by way of clipboard via Powershell
## Powershell method of transfering small (< 1 MB) binary files via Clipboard
##
## NB: Unwise to attempt to encode binary files exceeding 1 MB due to excessive memory consumption
## Powershell 5.0>
# On the transmission end:
$Content = Get-Content -Encoding Byte -Path binaryfile.xxx
[System.Convert]::ToBase64String($Content) | Set-Clipboard
# On the receiving end
mkdir "inetpub"
mkdir "inetpub\custerr"
mkdir "inetpub\custerr\en-US"
mkdir "inetpub\history"
mkdir "inetpub\history\CFGHISTORY_0000000001"
mkdir "inetpub\history\CFGHISTORY_0000000002"
mkdir "inetpub\logs"
mkdir "inetpub\temp"
mkdir "inetpub\temp\appPools"
mkdir "inetpub\temp\IIS Temporary Compressed Files"
@ethzero
ethzero / WS2012-IIS-inetpub-ACL.txt
Last active September 6, 2015 18:13
Default ACLs, files, and folders for Windows Server 2012's IIS "C:\inetpub" folder; Generator: icacls C:\inetpub\* /save %TMP%\WS2012-IIS-inetpub-ACL.txt /T; References: https://support.microsoft.com/en-us/kb/981949
inetpub
D:PAI(A;;FA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;OICIIO;GA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;;FA;;;SY)(A;OICIIO;GA;;;SY)(A;;FA;;;BA)(A;OICIIO;GA;;;BA)(A;;0x1200a9;;;BU)(A;OICIIO;GXGR;;;BU)(A;;FA;;;SY)(A;OICIIO;GA;;;CO)S:AI
inetpub\custerr
D:AI(A;;0x1200a9;;;BU)(A;;FA;;;BA)(A;;FA;;;SY)(A;ID;FA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;OICIIOID;GA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;ID;FA;;;SY)(A;OICIIOID;GA;;;SY)(A;ID;FA;;;BA)(A;OICIIOID;GA;;;BA)(A;ID;0x1200a9;;;BU)(A;OICIIOID;GXGR;;;BU)(A;OICIIOID;GA;;;CO)S:AI
inetpub\history
D:PAI(A;;FA;;;BA)(A;OICIIO;GA;;;BA)(A;;FA;;;SY)(A;OICIIO;GA;;;SY)S:AI
inetpub\logs
D:PAI(A;;FA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;OICIIO;GA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;;FA;;;SY)(A;OICIIO;GA;;;SY)(A;;FA;;;BA)(A;OICIIO;GA;;;BA)(A;;FA;;;SY)(A;OICIIO;GA;;;CO)S:AI
inetpub\temp
D:AI(A;ID;FA;;;