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
| #!/usr/bin/ruby | |
| if ARGV.length < 1 | |
| print "Usage: #{$0} <URI>\n\n" | |
| exit | |
| end | |
| str = ARGV[0] | |
| arr = [] | |
| str.split("").each do |c| | |
| arr << c.ord.to_i |
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
| #!/usr/bin/ruby | |
| require 'zlib' | |
| f = File.open(ARGV[0]) | |
| d = f.read | |
| print Zlib::Inflate.inflate(d) |
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
| require 'pp' | |
| data = File.open(ARGV[0]).read.force_encoding("ASCII-8BIT") | |
| tree,rest = data.split("\x00",2) | |
| while rest && rest.length > 0 do | |
| head, data = rest.split("\x00",2) | |
| hash = data[0,20] | |
| rest = data[20..-1] | |
| pre = hash.each_byte.map { |b| b.to_s(16).rjust(2,'0') }.join | |
| dir = pre[0,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
| require 'pp' | |
| for i in 0..255 do | |
| str += [i].pack('C') | |
| end | |
| pp str | |
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
| [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
| Add-Type -AssemblyName System.IO.Compression.FileSystem | |
| $GhostPack = @{Seatbelt = "https://github.com/GhostPack/Seatbelt/archive/master.zip"; | |
| SharpRoast = "https://github.com/GhostPack/SharpRoast/archive/master.zip"; | |
| SharpUp = "https://github.com/GhostPack/SharpUp/archive/master.zip"; | |
| SharpDPAPI = "https://github.com/GhostPack/SharpDPAPI/archive/master.zip"; | |
| SharpDump = "https://github.com/GhostPack/SharpDump/archive/master.zip"; | |
| SafetyKatz = "https://github.com/GhostPack/SafetyKatz/archive/master.zip"; |
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
| [Windows] | |
| New-SelfSignedCertificate -CertStoreLocation cert:\currentuser\my -Subject "CN=Code Signing" -KeyAlgorithm RSA -KeyLength 2048 -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" -KeyExportPolicy Exportable -KeyUsage DigitalSignature -Type CodeSigningCert | |
| dir cert:\currentuser\my | |
| $cert = (Get-ChildItem -Path Cert:\CurrentUser\my\<hash>) | |
| Export-Certificate -Cert $cert -Filepath user.p7b -Type p7b | |
| certutil.exe encode .\user.p7b user.txt | |
| <paste to linux box> | |
| base64 -d < b64data > user.p7b | |
| openssl pkcs7 -in user.p7b -inform der -print_certs -outform pem -out user.pem |
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
| wget -nv https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb | |
| sudo dpkg -i packages-microsoft-prod.deb | |
| sudo apt-get install apt-transport-https | |
| sudo apt install snapd | |
| sudo service snapd start | |
| sudo snap install dotnet-sdk --classic | |
| sudo apt-get install mono-complete |
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 | |
| # Check if user is root or sudo | |
| if ! [ $(id -u) = 0 ]; then echo "Please run this script as sudo or root"; exit 1 ; fi | |
| # Version number of Guacamole to install | |
| GUACVERSION="1.0.0" | |
| # Colors to use for output | |
| YELLOW='\033[1;33m' |
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 | |
| ACCID=`aws sts get-caller-identity --query Account --output text` | |
| BUCKET="ghh-cloudbu-$ACCID" | |
| SECS=`date +%s` | |
| echo "Checking to see if a bucket exists.. if not then making one" | |
| aws s3 ls s3://$BUCKET || aws s3 mb s3://$BUCKET | |
| echo "Creating a tarball of your home" | |
| cd ~/ | |
| find . | tar -zcvf /tmp/shell_backup_$SECS.tgz -T - --ignore-failed-read --exclude .cache |