UPDATE: Excellent resource here: https://scund00r.com/all/oscp/2018/02/25/passing-oscp.html
- Recon
- Find vuln
- Exploit
- Escalate
- Document it
| #!/bin/bash | |
| echo "" | |
| echo "Checking memory size.........." | |
| Totalmem=$(cat /proc/meminfo|grep MemTotal|grep -o '[0-9]*') | |
| if (($Totalmem > 3500000)); then | |
| echo "" | |
| echo "You have got enough memory. No need for a swap partition.........." | |
| echo "" | |
| else |
| #region prompt | |
| $forePromptColor = 0 | |
| [System.Collections.Generic.List[ScriptBlock]]$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") } |
UPDATE: Excellent resource here: https://scund00r.com/all/oscp/2018/02/25/passing-oscp.html