I hereby claim:
- I am kuan51 on github.
- I am kuan51 (https://keybase.io/kuan51) on keybase.
- I have a public key ASBmFuo2NH5A6SDRQPvAM4tjB75SD48ybtu5betfKDnLAAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| <# | |
| This script was built to allow one to quickly extrapolate data and information about the SSL certificate used on a large list of websites. | |
| Here is a breakdown of the logic: | |
| 1. Open SSL tunnel to a FQDN | |
| 2. Import the cert as a x509Certificate2 powershell object | |
| 3. Extract the subject and issuer info from the certificate | |
| 4. Compiles a CSV report with the certificate details | |
| #> | |
| function Get-Certs | |
| { |
| <# | |
| Description and useful info here | |
| #> | |
| function Cli-Example | |
| { | |
| Param | |
| ( | |
| [Parameter(Mandatory=$false, ParameterSetName='param1')] | |
| [bool] $param1, | |
| [Parameter(Mandatory=$false, ParameterSetName='param2')] |
| # Set to TLS1.2 | |
| [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12; | |
| # Create Headers variable for API call | |
| $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" | |
| $headers.Add("X-DC-DEVKEY", 'api_key_here') | |
| # Create array containing all order #'s | |
| $ordersList = Invoke-RestMethod 'https://www.digicert.com/services/v2/order/certificate' -Headers $headers | |
| $orderNumbers = @() | |
| foreach ($order in $ordersList.orders) { | |
| $orderNumbers+=$order.id |
| $port = 22 | |
| $net = “192.168.1” | |
| $range = 1..254 | |
| foreach ($r in $range) | |
| { | |
| $ip = “{0}.{1}” -F $net,$r | |
| if(Test-Connection -BufferSize 32 -Count 1 -Quiet -ComputerName $ip) | |
| { |
| # Create a Distribution List with Hidden Membership using a CSV of contacts | |
| import-module AzureAd | |
| Import-Module ExchangeOnlineManagement | |
| Connect-AzureAD | |
| Connect-ExchangeOnline | |
| $csv = Import-Csv C:\Users\username\Documents\Investors.csv | |
| foreach($investor in $csv) |