Skip to content

Instantly share code, notes, and snippets.

View jasonadsit's full-sized avatar

Jason Adsit jasonadsit

View GitHub Profile
@jasonadsit
jasonadsit / id_rsa.pub
Created April 21, 2016 21:52
My SSH Public Key
(((Resolve-DnsName -Name key.cipher.sexy -Type TXT -NoHostsFile -DnsOnly | Select-Object -ExpandProperty Strings) -join ',') -replace '[,]')
@jasonadsit
jasonadsit / New-AudioNotification.ps1
Created June 21, 2016 07:28
Let PowerShell do the talking.
#requires -Version 2
function New-AudioNotification
{
[CmdletBinding(SupportsShouldProcess = $True,ConfirmImpact = 'Low')]
Param(
[Parameter(Mandatory = $False,ValueFromPipeline)]
[string]$Message = 'This is a test of the PowerShell broadcast system.'
)
@jasonadsit
jasonadsit / Get-McAfeeLogs.ps1
Last active June 30, 2016 05:10
A function for retrieving and parsing McAfee text-based log files. Outputs them as objects to the pipeline. Accepts computer names or IP addresses from the pipeline.
function Get-McAfeeLogs {
[cmdletbinding()]
Param (
[parameter(ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True)]
[Alias('CN','Hostname','Target','IP','IpAddress')]
[string] $ComputerName = $env:COMPUTERNAME,
$1337h4x0r = $True
$ErrorActionPreference = 'Stop'
while ($1337h4x0r -eq $True) {
if (!(Get-WinEvent -ListProvider 'CAC-Exempt Script' -ErrorAction SilentlyContinue)) {
New-EventLog -LogName Application -Source 'CAC-Exempt Script'
} # if
@jasonadsit
jasonadsit / Enable-DnsClientLogging.ps1
Created July 15, 2016 21:31
Enable-DnsClientLogging
function Enable-DnsClientLogging {
Param (
[parameter(ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True)]
[Alias('DNSHostName','PSComputerName','CN','Hostname')]
[array] $ComputerName = $env:COMPUTERNAME
) # End of Param section
@jasonadsit
jasonadsit / Get-DefCon24Presentations.ps1
Created August 18, 2016 06:44
Download All the DefCon 24 Presentations With PowerShell
$DefCon24PresoBaseUrl = 'https://media.defcon.org/DEF%20CON%2024/DEF%20CON%2024%20presentations/'
(Invoke-WebRequest -Uri $DefCon24PresoBaseUrl).Links |
Where-Object { $_.href -match '\.pdf' } |
ForEach-Object {
$DefCon24PresoFullUrl = $DefCon24PresoBaseUrl + $_.href ;
$OutFile = "$env:USERPROFILE\Downloads\" + $_.href ;
Invoke-WebRequest -Uri $DefCon24PresoFullUrl -OutFile $OutFile
}
@jasonadsit
jasonadsit / km.md
Created September 8, 2016 02:51
What is Knowledge Management?

What is Knowledge Management?

  • The right information to the right people, at the right time, in the right context, & in most usable format
  • Creating, sharing, and acting upon information in ways that measurably improve performance
  • Connecting those who know with those who need to know by leveraging knowledge transfers—converting tacit to explicit knowledge
@jasonadsit
jasonadsit / Invoke-DerbyCon2016VideoDownload.ps1
Last active September 27, 2016 04:46
Download All the DerbyCon 2016 Videos
[cmdletbinding()]
Param (
[string] $DerbyConFileList = 'https://ia601502.us.archive.org/16/items/DerbyCon6/DerbyCon6_files.xml',
[string] $BaseDownloadUrl = 'https://archive.org/download/DerbyCon6/',
[string] $DestinationFolder = $($HOME + '\Videos\DerbyCon6')
@jasonadsit
jasonadsit / Invoke-UsenixSec16Download.ps1
Created September 28, 2016 06:43
Download All the Usenix Security 2016 Presentation Files
[cmdletbinding()]
Param (
[string] $UseNixBaseUrl = 'https://www.usenix.org',
[string] $UsenixSec16BaseUrl = 'https://www.usenix.org/conference/usenixsecurity16/technical-sessions/',
[string] $DestinationFolder = $($HOME + '\Downloads\UsenixSec16')
@jasonadsit
jasonadsit / Invoke-LlvmDevMtg16Download.ps1
Created September 28, 2016 17:41
Download All The 2016 LLVM Dev Meeting Slides using PowerShell
[cmdletbinding()]
Param (
[string] $LlvmBaseUrl = 'http://llvm.org',
[string] $DestinationFolder = $($HOME + '\Downloads\2016-LLVM-Slides')
)