This file contains 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/bash | |
# inspired by https://www.atlassian.com/git/tutorials/dotfiles | |
[ $# -eq 0 ] && { echo "Usage: $0 <remote-repo-url>"; exit 1; } | |
REMOTE_REPO=$1 | |
BARE_REPO_PATH=$HOME/.dotfiles | |
git clone --bare $REMOTE_REPO $BARE_REPO_PATH |
This file contains 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/bash | |
# Inspired by https://www.atlassian.com/git/tutorials/dotfiles | |
[ $# -eq 0 ] && { echo "Usage: $0 <shell-config-file>"; exit 1; } | |
SHELL_CONFIG=$1 | |
BARE_REPO_PATH=$HOME/.dotfiles | |
git init --bare $BARE_REPO_PATH | |
echo "alias config='/usr/bin/git --git-dir=$BARE_REPO_PATH --work-tree=$HOME'" >> $HOME/$SHELL_CONFIG |
This file contains 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 | |
# Inspired by https://youtu.be/VfKpftzaSJ4 | |
# required dependencies: | |
# yt-dlp - https://github.com/yt-dlp/yt-dlp | |
# qutebrowser - https://qutebrowser.org | |
# rdrview - https://github.com/eafer/rdrview | |
# zathura, mpv, xclip, sxiv | |
# Feed script a url or file location. | |
# If an image, it will view in sxiv, |
This file contains 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 sys | |
questions = [ | |
"What do I want to protect? (asset)", | |
"Who do I want to protect it from? (threat)", | |
"How likely is that I will need to protect it? (adversary)", | |
"How bad are the consequences if I fail? (impact)", | |
"How much trouble are I willing to go through to prevent these consequences? (patience)" | |
] |
This file contains 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
$software = Read-Host -Prompt 'Enter an application name: '; | |
$uninstallInfo = gp HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\* | |
$applicationName = $uninstallInfo.DisplayName -Match $software | |
If ($applicationName) { | |
$anchor = [regex]::Match($uninstallInfo.PSPath -Match $software,'.*\\(.*)').captures.groups[1].value | |
$applicationInfo = gp HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$anchor | |
$vendor = $applicationInfo.Publisher | |
$version = $applicationInfo.DisplayVersion |
This file contains 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
# Creates 20 random users with password "username_first_letter-Ww12345" | |
# For user "G7sk9Ilo" password will be "G-Ww12345" | |
for ($user_num = 1; $user_num -le 20; $user_num++){ | |
$ruser = -join ((48..57) +(65..90) + (97..122) | Get-Random -Count 8 | % {[char]$_}) | |
$rpassword = ConvertTo-SecureString "$($ruser.Substring(0,1))-Ww12345" -AsPlainText -Force | |
$null = New-LocalUser $ruser -Password $rpassword -FullName $ruser -Description "password almost same as name" | |
Write-Host "`r`nUSERNAME: $($ruser) `r`nNUMBER: $($user_num)" | |
} |
This file contains 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/bash | |
IMPACKET_PATH=$HOME/Github/impacket | |
DOMAIN="domain.local" | |
USERNAME="Administrator" | |
PASSWORD="AwesomeAdmin16" | |
IP="10.0.3.100" | |
OUTPUT_FILENAME="creds" | |
# Change the hardcoded values in variables before using! |