Skip to content

Instantly share code, notes, and snippets.

View thomasrayner's full-sized avatar
😸
Write code, pet cats.

Thomas Rayner thomasrayner

😸
Write code, pet cats.
View GitHub Profile
@thomasrayner
thomasrayner / corbob-prompt.ps1
Created March 12, 2019 18:51 — forked from corbob/prompt.ps1
prompt...
$forePromptColor = 0
[System.Collections.Generic.List[ScriptBlock]]$global:PromptRight = @(
# right aligned
{ "$FG;${er}m{0}" -f $LeftArrow }
{ "$FG;${forePromptColor}m$BG;${er}m{0}" -f $(if (@(get-history).Count -gt 0) {(get-history)[-1] | % { "{0:c}" -f (new-timespan $_.StartExecutionTime $_.EndExecutionTime)}}else {'00:00:00.0000000'}) }
{ "$FG;7m$BG;${er}m{0}" -f $LeftArrow }
{ "$FG;0m$BG;7m{0}" -f $(get-date -format "hh:mm:ss tt") }
)
@thomasrayner
thomasrayner / Migrate-ADMTUserCLI.ps1
Created May 29, 2018 19:41 — forked from RamblingCookieMonster/Migrate-ADMTUserCLI.ps1
This is an example function that wraps ADMT.exe, abstracting out migration of Active Directory users into a PowerShell function.
<#
This is a PowerShell function wrapping the ADMT executable to abstract out migrating Active Directory users.
Read all the ADMT docs, and all the code and comments below before considering using this : )
The COM object was covered nicely by Jan Egil Ring:
http://blog.powershell.no/2010/08/04/automate-active-directory-migration-tool-using-windows-powershell/
Unfortunately, the COM object does not support Include files, a critical requirement for us.

How to pass the OSCP

  1. Recon
  2. Find vuln
  3. Exploit
  4. Escalate
  5. Document it

Time yourself