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
import boto3 | |
from botocore import UNSIGNED | |
from botocore.client import Config | |
s3 = boto3.client('s3', config=Config(signature_version=UNSIGNED)) | |
s3.head_bucket(Bucket="bucketname") | |
print(s3.head_bucket(Bucket="flaws.cloud")["ResponseMetadata"]["HTTPHeaders"]["x-amz-bucket-region"]) # output: us-west-2 |
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
function Invoke-AESEncryptDirectory | |
{ | |
param( | |
[string]$directory, | |
[string]$extension | |
) | |
$csharp = @" | |
//https://stackoverflow.com/questions/27645527/aes-encryption-on-large-files | |
using System; |
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
{ | |
"user_options":{ | |
"misc":{ | |
"hotkeys":[ | |
{ | |
"action":"editor_url_decode", | |
"hotkey":"Ctrl+Shift+U" | |
}, | |
{ | |
"action":"editor_url_encode_all_characters", |
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/bash | |
apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common | |
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - | |
echo "deb [arch=amd64] https://download.docker.com/linux/debian stretch stable" >> /etc/apt/sources.list | |
apt update | |
apt-get install -y docker-ce docker-ce-cli containerd.io |
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/bash | |
#bashrc config | |
echo "PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\][\u⛾ \h]\[\033[00m\] \[\033[01;33m\][\w]\[\033[00m\]\n└─ '" >> $HOME/.bashrc | |
echo "PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\][\u⛾ \h]\[\033[00m\] \[\033[01;33m\][\w]\[\033[00m\]\n└─ '" >> sudo tee -a /root/.bashrc | |
echo "export PATH=~/.local/bin:$PATH" >> $HOME/.bashrc | |
echo "export PATH=~/.local/bin:$PATH" >> /root/.bashrc | |
#apt general | |
sudo apt-get update -y |
NewerOlder