Skip to content

Instantly share code, notes, and snippets.

103.94.135.216
139.28.217.236
185.117.74.43
185.141.24.189
103.18.109.161
27.121.66.73
106.52.56.192
42.192.163.102
82.102.229.20
94.103.89.228
import datetime
name = input("What's your name?")
age = int(input("How old are you?"))
print("Hi " + name + ", you will turn 100 in " + str(datetime.datetime.now().year + (100 - int(age))))
@iwikmai
iwikmai / ImportTo-ElasticSearchBulk.ps1
Last active October 12, 2023 17:56
Parse .nessus report and import to ElasticSearch
<#
.Synopsis
Parse Nessus XML report and import to ElasticSearch using _bulk API
.DESCRIPTION
Parse Nessus XML report and convert to expected json format (x-ndjson)
for ElasticSearch _bulk API
.EXAMPLE
.\ImportTo-ElasticSearchBulk.ps1 -InputXML "C:\folder\file.nessus" -Server es.contoso.com -Index "nessus" -type "vuln"
#>
<#
.Synopsis
Create new certificate signing request on Windows platforms
.DESCRIPTION
Users certreq on Windows platforms to create a certificate
signing request.
.EXAMPLE
New-CertificateSigningRequest -SAN mysite.contoso.com,mysitealt.contoso.com -CN mysite.contoso.com -O "Contoso Ltd" -OU IT -L Dallas -S Texas -C US
#>
<#
.Synopsis
Scans a host or network for the MS17-010 vulnerability and output results as a
table that you can pipe to other PowerShell functions such as Invoke-Command or
Export-CSV.
.DESCRIPTION
This script will use a custom NMap NSE script to scan a destination host on
port 445 for the MS17-010 vulnerability. If the host is not online or is blocking