I couldn't find latest brotli binary for Win64 / x64, so here is how to compile it on Windows, for Windows: https://github.com/google/brotli
Will use this repo later: https://github.com/Microsoft/vcpkg
# more efficient than base64 | |
$base85lib = | |
@" | |
using System; | |
using System.Text; | |
using System.IO; | |
using System.Linq; | |
namespace BaseN { | |
/// <summary> |
# my format | |
get-date -format "yyyy_MM_dd_HH_mm_ss" | |
# epoch in dec | |
(Get-Date).ToUniversalTime().Subtract((Get-Date "01/01/1970")).TotalSeconds | |
# alt format | |
gcim Win32_LocalTime | select Year,Quarter,Month,WeekInMonth,DayOfWeek | fl |
:: put below in your config, usually for Win64 : C:\Program Files\Common Files\SSL\openssl.cnf | |
[provider_sect] | |
default = default_sect | |
oqsprovider = oqsprovider_sect | |
[default_sect] | |
activate = 1 | |
[oqsprovider_sect] | |
activate = 1 |
#Requires RunAsAdministrator | |
# put above comment at top of script to prevent running of script if it was not run as admin | |
# or quietly check for script run as admin: | |
([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator") |
# will prompt for passphrase on stdin | |
openssl genpkey -out skey.pem -verbose -pass stdin -aes-256-cbc -algorithm ed448 | |
openssl ec -in skey.pem -pubout -out pub.pem | |
# create hash | |
openssl shake256 -xoflen 64 -out dgst thefile | |
openssl pkeyutl -sign -inkey skey.pem -rawin -in dgst -out dgst.sig | |
openssl pkeyutl -verify -rawin -inkey pub.pem -pubin -sigfile dgst.sig -in dgst |
# updated for Win11 | |
# List privileged services that don't come with Windows 11 | |
# Exclusion List for Win11 built in | |
$exclusion = @('ALG', 'AppVClient', 'COMSysApp', 'diagnosticshub.standardcollector.service', | |
'edgeupdate', 'edgeupdatem', 'gcs', 'MicrosoftEdgeElevationService', 'MSDTC', | |
'msiserver', 'NetTcpPortSharing', 'perceptionsimulation', 'PerfHost', 'RpcLocator', 'SecurityHealthService', | |
'Sense', 'SensorDataService', 'SgrmBroker', 'SNMPTrap', 'spectrum', 'Spooler', 'sppsvc', 'TieringEngineService', | |
'TrustedInstaller', 'UevAgentService', 'uhssvc', 'vds', 'VSS', 'wbengine', 'WdNisSvc', 'WinDefend', 'wmiApSrv', | |
'WMPNetworkSvc', 'WSearch', 'WslService') |
#!/bin/bash | |
if command -v whois >/dev/null 2>&1 ; then echo "whois ok..." ; else echo "install whois!" && exit ; fi | |
# verified on latest Ubuntu server cloudimg | |
############################################################################################################ | |
# ---------------------------------------------------------------------- | |
# ASN/IPv4/Prefix lookup tool. Uses Team Cymru's whois service for data. | |
# ---------------------------------------------------------------------- | |
# example usage: | |
# asn <ASnumber> -- to lookup matching ASN data. Supports "as123" and "123" formats (case insensitive) |
# assumes new Debian Testing VM, for purpose of compiling, running below as root | |
# uses most libs already available from apt, only compiles lib ntbtls | |
lsb_release -a | |
uname -a | |
wget https://gnupg.org/signature_key.asc | |
gpg --import signature_key.asc | |
gpg -k | |
wget https://www.gnupg.org/signature_key.html |
I couldn't find latest brotli binary for Win64 / x64, so here is how to compile it on Windows, for Windows: https://github.com/google/brotli
Will use this repo later: https://github.com/Microsoft/vcpkg
# for GitHub: | |
# use this for name: | |
VERNAME=$(wget -q -O- https://api.github.com/repos/roelds/litaf/releases/latest | jq -r '.name') | |
# or this for tag name, if jq installed: | |
VERTAG=$(wget -q -O- https://api.github.com/repos/roelds/litaf/releases/latest | jq -r '.tag_name') | |
# or if jq not installed: | |
curl --silent "https://api.github.com/repos/roelds/litaf/releases/latest" | grep -Po "(?<=\"tag_name\": \").*(?=\")" | |
# latest release tag name, for GitLab: | |
curl -s https://gitlab.com/gitlab-org/cli/-/releases/permalink/latest | grep -m1 -Eo "releases/[^/]+\"" | awk 'BEGIN { FS="/" } {print $2}' | rev | cut -c2- | rev |