I needed to inspect an HTTPS site's current certs and wanted to do it from the command line. Here are a couple of commands that I used that worked quite well.
nmap -p 443 --script ssl-cert [hostname]
| #!/bin/bash | |
| # --------------------------------- Constants -------------------------------- # | |
| readonly BASE_URL="http://169.254.169.254" | |
| readonly METADATA_PATH="/latest/meta-data" | |
| readonly TOKEN_PATH="/latest/api/token" | |
| readonly TOKEN_TTL=60 # In seconds | |
| readonly HEADER_TOKEN_TTL="X-aws-ec2-metadata-token-ttl-seconds" | |
| readonly HEADER_TOKEN="X-aws-ec2-metadata-token" |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| # Usage: ./script.sh input.env output.yaml | |
| input_file=$1 | |
| output_file=$2 | |
| # Check if the input file exists | |
| if [ ! -f "$input_file" ]; then | |
| echo "Input file does not exist: $input_file" |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Ansi 0 Color</key> | |
| <dict> | |
| <key>Alpha Component</key> | |
| <real>1</real> | |
| <key>Blue Component</key> | |
| <real>0.38307824730873108</real> |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>AllowClipboardAccess</key> | |
| <true/> | |
| <key>AlternateMouseScroll</key> | |
| <true/> | |
| <key>AppleAntiAliasingThreshold</key> | |
| <integer>1</integer> |
| FROM jenkins/jenkins:lts | |
| USER root | |
| RUN curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh | |
| RUN usermod -aG docker jenkins | |
| USER jenkins |
Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.
If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.