Skip to content

Instantly share code, notes, and snippets.

View brootware's full-sized avatar
🎯
Focusing

Oaker Min brootware

🎯
Focusing
View GitHub Profile
@brootware
brootware / Get_RBAC.ps1
Created June 25, 2019 00:38
exports role assignments in JSON format
#Get Resources
$Resources = Get-AzureRmRoleAssignment
#Get Resource Data
$Output = $Resources| ForEach-Object {
[PSCustomObject]@{
"Name" = $_.DisplayName
"ObjectId" = $_.ObjectId
"ObjectType" = $_.ObjectType
"RoleAssignmentId" = $_.RoleAssignmentId
##############################################################
########## Register Backup and Managed Disk ##################
##############################################################
Register-AzProviderFeature -ProviderNamespace Microsoft.RecoveryServices -FeatureName RecoveryServicesResourceMove
Register-AzResourceProvider -ProviderNamespace Microsoft.RecoveryServices
Register-AzProviderFeature -FeatureName ManagedResourcesMove -ProviderNamespace Microsoft.Compute
Register-AzResourceProvider -ProviderNamespace Microsoft.Compute
do {
$getMdStatus = Get-AzProviderFeature -FeatureName ManagedResourcesMove -ProviderNamespace Microsoft.Compute
$getvaultStatus = Get-AzProviderFeature -FeatureName RecoveryServicesResourceMove -ProviderNamespace Microsoft.RecoveryServices
# Ignoring sensitive files and directories.
secret*.*
*secret*.*
SECRET*.*
*SECRET*.*
Password*.*
*Password*.*
PASSWORD*.*
*PASSWORD*.*
#!/usr/bin/python
import socket
host = "127.0.0.1"
port = 4444
# try and connect to a bind shell
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
import math
data="""
Hello World, hi!
"""
# Words per minute
WPM = 75
# 3

You can use gtredactkit as an API. To do so:

from gtredactkit import runner
data = """this is my IP: 102.23.5.1
My router is : 10.10.10.1
71.159.188.33
81.141.167.45
165.65.59.139
64.248.67.225
import socket
import sys
import ipaddress
import subprocess
banner = r"""
__ __.__ _________ .__ .___
/ \ / \__| ____ \_ ___ \|__| __| _/______
\ \/\/ / |/ \ / \ \/| |/ __ |\_ __ \
\ /| | | \ \ \___| / /_/ | | | \/
param (
[string]$Domain = $(Throw "Error: No domain name argument provided. Usage: Provide a domain name as an argument.")
)
$DOMAIN = $Domain
# Create root CA & Private key
$CreateRootCA = "openssl req -x509 -sha256 -days 356 -nodes -newkey rsa:2048 -subj `"/CN=$DOMAIN/C=US/L=San Fransisco`" -keyout rootCA.key -out rootCA.crt"
Invoke-Expression $CreateRootCA
function durl() {
read proto server path <<<$(echo ${1//// })
DOC=/${path// //}
HOST=${server//:*}
PORT=${server//*:}
[[ x"${HOST}" == x"${PORT}" ]] && PORT=80
exec 3<>/dev/tcp/${HOST}/$PORT
echo -en "GET ${DOC} HTTP/1.0\r\nHost: ${HOST}\r\n\r\n" >&3
(while read line; do
@brootware
brootware / Vagrant_setup.md
Last active August 21, 2023 12:01
Vagrant +Windows + WSL2 + Hyper-v

Vagrant With Windows, WSL2 and Hyper-V

To say getting this configuration working is a pain in the ass is an understatement. However, once it is working correctly you gain access to tools like Ansible and full performance VMs inside Windows. This guide covers the steps I followed to get things working correctly with this configuration. It is possible that something may not work for you however I have been able to reproduce this success on two Windows 11 Pro machines and expect this to work for others.

This guide assumes basic knowledge of Windows and Linux systems and how Vagrant operates. Due to the difficulty of setting this up you may need to do some additional troubleshooting

Requirements

  • Windows Professional - Hyper-V can only be installed on Windows Professional systems or higher
  • WSL2 - Due to the massive differences between WSL1 and WSL2 this guide will only cover support for WSL2
  • CPU Virtualization - While the vast majority of modern CPUs support virtualization you may need to enable it in