30.11.2020: Updated with the new patchseries and instructions for Windows
02.12.2020: Added tweaks
08.12.2020: Updated with patchseries v4
31.01.2020: Updated with patchseries v6
| :: https://stealthpuppy.com/customize-the-windows-default-profile/#.XEfajs17mUm | |
| :: https://helgeklein.com/blog/2011/12/customizing-the-default-profile/ | |
| :: https://www.reddit.com/r/PowerShell/comments/8rupxv/unloading_registry_hive_with_a_script/ | |
| :: https://blogs.technet.microsoft.com/deploymentguys/2009/10/29/configuring-default-user-settings-full-update-for-windows-7-and-windows-server-2008-r2/ | |
| :: remove the double colon to activate the code if it is commented out | |
| :: disable Cortana | |
| :: https://www.addictivetips.com/windows-tips/disable-web-search-windows-10-april-update/ | |
| REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AllowCortana" /d 0 /t REG_DWORD /f | |
| :: 5/9/2019 | |
| REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "DisableWebSearch" /d 1 /t REG_DWORD /f |
exec - Returns last line of commands output
passthru - Passes commands output directly to the browser
system - Passes commands output directly to the browser and returns last line
shell_exec - Returns commands output
\`\` (backticks) - Same as shell_exec()
popen - Opens read or write pipe to process of a command
proc_open - Similar to popen() but greater degree of control
pcntl_exec - Executes a program
| # Goto android source code root and then execute following commands | |
| # Keep the logcat.log in the root | |
| export ANDROID_BUILD_TOP=$(pwd) | |
| ./external/selinux/prebuilts/bin/audit2allow -p out/target/product/{devicename}/root/sepolicy < logcat.log | |
| # Copy the generated rules in respective files in the device tree |
| netsh advfirewall firewall set rule group="remote administration" new enable=yes | |
| netsh advfirewall firewall add rule name="Open Port 5985" dir=in action=allow protocol=TCP localport=5985 | |
| winrm quickconfig -q | |
| winrm quickconfig -transport:http | |
| winrm set winrm/config '@{MaxTimeoutms="7200000"}' | |
| winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="0"}' | |
| winrm set winrm/config/winrs '@{MaxProcessesPerShell="0"}' | |
| winrm set winrm/config/winrs '@{MaxShellsPerUser="0"}' | |
| winrm set winrm/config/service '@{AllowUnencrypted="true"}' |
| #!/bin/bash | |
| if [ $# -ne 3 ]; then | |
| echo "usage: $0 <unix socket file> <host> <listen port>" | |
| exit | |
| fi | |
| SOCK=$1 | |
| HOST=$2 | |
| PORT=$3 |
| RECAPTCHA_PUBLIC_KEY = '<public key>' | |
| RECAPTCHA_PRIVATE_KEY = '<private key>' | |
| def checkRecaptcha(response, secretkey): | |
| url = 'https://www.google.com/recaptcha/api/siteverify?' | |
| url = url + 'secret=' + str(secretkey) | |
| url = url + '&response=' +str(response) |
xhost + ${hostname} to allow connections to the macOS host *export HOSTNAME=`hostname`* environment:
| # Example of getting file content | |
| def getFileContent(pathAndFileName): | |
| with open(pathAndFileName, 'r') as theFile: | |
| # Return a list of lines (strings) | |
| # data = theFile.read().split('\n') | |
| # Return as string without line breaks | |
| # data = theFile.read().replace('\n', '') | |