Skip to content

Instantly share code, notes, and snippets.

@FriedrichWeinmann
FriedrichWeinmann / DomainCryptographyScan.ps1
Last active May 30, 2023 05:15
Scans an Active Directory domain's and its principal's kerberos encryption configuration.
<#
.SYNOPSIS
Scans an Active Directory domain's and its principal's kerberos encryption configuration.
.DESCRIPTION
Scans an Active Directory domain's and its principal's kerberos encryption configuration.
It will generate all data via LDAP, and analyze the results for possible authentication issues.
It supports three ways to report:
- Print: Write analysis of results to screen
@pythoninthegrass
pythoninthegrass / .bashrc
Last active January 25, 2024 07:46
Synology shell config
#/etc/profile: system-wide .profile file for ash.
# shellcheck disable=SC2155
umask 077
export PATH="/volume1/@appstore/git/bin:/opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin"
export PGDATA=/var/services/pgsql
export TERMINFO=/usr/share/terminfo
@jonlabelle
jonlabelle / ldap_search_filter_cheatsheet.md
Last active April 25, 2024 13:01
LDAP Search Filter Cheatsheet
ipconfig /release; ipconfig /flushdns; ipconfig /renew; netsh winsock reset; netsh interface ipv4 reset; netsh interface ipv6 reset; netsh interface ip delete destinationcache;
@gasman
gasman / encode.py
Created October 25, 2020 12:23
Encoding a file as a Youtube video - https://www.youtube.com/watch?v=hyqLv2_zBdA
# Encode inputfile.tar.gz as a series of video frames
# Frames are written to frames/frameNNNN.png
from PIL import Image
with open('inputfile.tar.gz', 'rb') as f:
data = f.read()
WIDTH = 120
HEIGHT = 90
CHUNK_SIZE = int((WIDTH * HEIGHT) / 8)
@CybersamuraiDK
CybersamuraiDK / wifi-passwords.ps1
Created October 3, 2020 17:18 — forked from willjobs/wifi-passwords.ps1
PowerShell script to show all wifi passwords saved in Windows
(netsh wlan show profiles) | Select-String "\:(.+)$" | %{$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name="$name" key=clear)} | Select-String "Key Content\W+\:(.+)$" | %{$pass=$_.Matches.Groups[1].Value.Trim(); $_} | %{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | Format-Table -AutoSize
@RomelSan
RomelSan / kitty-theme.md
Last active April 17, 2023 09:24
Kitty Theme

Kitty portable recommended settings

  1. Terminal --> Features --> Disable Application Keypad mode
  2. Terminal --> Keyboard --> The Function keys and keypad --> Linux
  3. Connection --> Data --> set terminal-type string to linux
  4. Window -> Appearance set check for "Allow selection of variable pitch fonts"
  5. Window -> Colours set check for "Selected text is a different colour"
  6. Use font Cascadia Code PL included with "Windows Terminal" app or download from github
    File to install: CascadiaCodePL.ttf
    https://github.com/microsoft/cascadia-code
  7. If you are using oh my zsh then you can use the fonts from nerdfonts.com
@jimanx2
jimanx2 / AgentDeploymentScript.sh
Last active February 7, 2024 11:25
TrendMicroDeepSecurityInstallScript
#!/bin/bash
ACTIVATIONURL='dsm://agents.deepsecurity.trendmicro.com:443/'
MANAGERURL='https://app.deepsecurity.trendmicro.com:443'
CURLOPTIONS='--silent --tlsv1.2'
linuxPlatform='';
isRPM='';
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo You are not running as the root user. Please try again with root privileges.;
@MichaelCurrin
MichaelCurrin / self-extracting-shell-scripts.md
Last active October 19, 2023 06:07
Self-extracting shell scripts

Self-extracting shell scripts

Guide to using MakeSelf tool to create self-extracting shell scripts for easy distribution

How to package your shell scripts project as a release which can be easily downloaded, extracted, and run.

This is intended to work with one or more executable scripts that use a shell shebang. This could work with other shebangs I guss, but you're probably better off using the packaging approach for that language.

This guide is written for macOS / Linux.

@Tydewest
Tydewest / ProductKey.vbs
Created June 16, 2020 02:09
ProductKey.vbs returns current Windows product key in a message box. Save code with the file extension .vbs the save to desktop & open the file.
Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))
Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
Cur = 0
x = 14