less {filename}
| Navigation | |
|---|---|
SPACE |
forward one window |
b |
backward one window |
d |
forward half window |
| # This is a sample SELinux policy module file to confine a process executing the /bin/ps binary | |
| # The purpose is to act as a point of reference when writing policies for apps that make use of the ps functionality | |
| policy_module(ps, 0.1) | |
| type ps_t; | |
| domain_type(ps_t) | |
| allow ps_t self:cap_userns sys_ptrace; | |
| allow ps_t self:capability dac_read_search; |
| <?php | |
| function uuid() { | |
| $s = bin2hex(random_bytes(16)); | |
| return sprintf('%s-%s-%s-%s-%s', | |
| substr($s, 0, 8), | |
| substr($s, 8, 4), | |
| substr($s, 12, 4), | |
| substr($s, 16, 4), |
| #Small object to simplify the handling of credentials. | |
| class CredObject { | |
| $Name | |
| $Ip | |
| $Username | |
| $Password | |
| } | |
| #Change to full path of the credentials file with columns: Name, Ip, Username, Password | |
| $machines = Import-CSV -Path "\path\to\machines.csv" |
| #Get the local accounts on a machine | |
| Get-WmiObject -Class Win32_UserAccount -Filter "LocalAccount='$True'" | Select-Object Name, Disabled |
| #Small object to make the handling of credentials simpler. | |
| class CredObject { | |
| $Username | |
| $Password | |
| } | |
| #Create the session to the domain controller. | |
| $dcSession = Create-Session -Ip 10.0.0.10 -Username "Administrator" -Password "MyVerySecurePassword" | |
| #Get all the users who aren't the Administrator |
| Function Show-ProcessTree { | |
| [CmdletBinding()] | |
| Param($allprocess) | |
| Begin { | |
| # Identify top level processes | |
| # They have either an identified processID that doesn't exist anymore | |
| # Or they don't have a Parentprocess ID at all | |
| #$allprocess = Get-WmiObject -Class Win32_process | |
| $uniquetop = ($allprocess).ParentProcessID | Sort-Object -Unique |
| <?php | |
| use Badcow\DNS\Parser\Parser; | |
| use Badcow\DNS\ZoneBuilder; | |
| require_once __DIR__ . '/../vendor/autoload.php'; | |
| $example = <<< 'DNS' | |
| $ORIGIN example.com. | |
| $TTL 1337 |
| javascript:(function(){var a=document.getElementsByTagName('input');for(var i=0,e;e=a[i];i++)if(e.getAttribute('type')=='password')e.setAttribute('type', 'text');})() |
| #!/usr/bin/env bash | |
| PREFIX='http://example.com/gallery/pic_' | |
| SUFFIX='.jpg' | |
| START=1 | |
| END=25 | |
| FORMAT="%02d" | |
| for i in `seq $START $END`; | |
| do |