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
#!/usr/bin/env bash | |
# Requires: nmap | |
TIMESTAMP=$(date +"%Y%m%d%M") | |
TARGETS=( ) # E.g. TARGETS=( 1.0.0.1 1.1.1.1 ) | |
for TARGET in "${TARGETS[@]}" | |
do | |
echo "Begin scan: ${TARGET}" | tee -a nmap_${TIMESTAMP}.log |
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
#!/usr/bin/env bash | |
# Requires: az-cli | |
DATA_DISK= # Existing data disk (by name) | |
NSG= # Existing NSG (by name) | |
OS_DISK # Existing OS disk (by name) | |
PRIVATE_IP= # Available private IP address, e.g. 10.0.0.10 | |
PUBLIC_IP= # Existing public IP address (by name) | |
RG_TARGET= # Existing resource group (by name) for deployment |
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
#!/usr/bin/env bash | |
# Requires: sqlcmd | |
IP= | |
sqlcmd -S tcp:${IP},1433 -Q "select getdate()" |
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
#!/usr/bin/env bash | |
# Requires: az-cli, azcopy, jp | |
SOURCE= # Source Storage Account name | |
TARGET= # Target Storage Account name | |
SOURCE_KEY= # Source Storage Account key | |
TARGET_KEY= # Target Storage Account key | |
for CONTAINER in $(az storage container list --account-name ${SOURCE} | jp [].name) |
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
https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-managed-disk-portal |
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
robocopy \${SOURCE} \${TARGET} /E |
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
Add-LocalGroupMember -Group ${GROUP} -Member ${USER} |
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
# Packages: | |
apt update && apt upgrade | |
apt install -y realmd sssd sssd-tools libnss-sss libpam-sss krb5-user adcli samba-common-bin | |
# Add the following to /etc/krb5.conf under [libdefaults] (following default_realm): | |
dns_lookup_kdc = true | |
dns_lookup_realm = true |
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
#!/usr/bin/env bash | |
# Create a Windows Server 2016 VM with a private IP in a specific subnet. | |
# Requires: az-cli | |
NSG= # Existing NSG (by name) | |
PRIVATE_IP= # Available private IP address, e.g. 10.0.0.10 | |
RG_VM= # Existing resource group (by name) for deployment | |
RG_VNET= # Existing resource group (by name) containing existing VNet resource | |
SUBSCRIPTION= # Azure subscription ID |
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
function FindProxyForURL(url, host) { | |
if (shExpMatch(url, "*.slack.com")) { | |
return "PROXY 127.0.0.1:666"; | |
} | |
} |