| Loop | Return | Continue | Break |
|---|---|---|---|
| Normal Expectation | Exit Scope | Next Item | Exit Loop |
| .foreach{} | Next Item | Break Scopes / Next Item of Parent Loop | Break Scopes / Exit Parent Loop |
| foreach ($y in $x) | Exit Scope | Next Item | Exit Loop |
| for ($i;$i -lt 5;$i++) | Exit Scope | Next Item | Exit Loop |
| Foreach-Object -InputObject @() | Next Item | Break Scopes / Next Item of Parent Loop | Break Scopes / Exit Parent Loop |
| Switch | Exit Scope | Next Item | Exit Switch |
| While |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Collections.ObjectModel; | |
| using System.Diagnostics.CodeAnalysis; | |
| using System.IO; | |
| using System.Management.Automation; | |
| using System.Security; | |
| using System.Text; | |
| using Microsoft.Win32; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Get-MyDisk { | |
| [CmdletBinding()] | |
| param( | |
| [Alias('DeviceId')] | |
| [int] $Number, | |
| [string] $FriendlyName | |
| ) | |
| if (-Not ('Pinvoke.Win32Utils' -as [type])) { | |
| Add-Type -TypeDefinition @' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Add-ClipboardProtocolHandler { | |
| # clipboard:// | |
| $custom = Get-Command "$env:temp\customclip.exe" -CommandType Application -ErrorAction 'Stop' | |
| $uri = 'clipboard' | |
| if (!(Test-Path "HKCU:\Software\Classes\$uri")) { | |
| New-Item "HKCU:\Software\Classes\$uri" | |
| } | |
| Set-ItemProperty "HKCU:\Software\Classes\$uri" '(Default)' "URL:$uri Protocol" | |
| Set-ItemProperty "HKCU:\Software\Classes\$uri" 'URL Protocol' '' | |
| if (!(Test-Path "HKCU:\Software\Classes\$uri\shell")) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| NOTE: Must be run in Windows PowerShell (5.1), PowerShell (7+) cannot create standalone exes. | |
| This is designed to create a simple exe that can be used to spawn any console | |
| application with a hidden Window. As NoGui.exe is a GUI executable it won't | |
| spawn with an associated console window and can be used to then create a new | |
| process with a hidden console window with the arguments it was created with. | |
| By default, NoGui will spawn the child process with same stdio handles as |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Flags()] enum UAC { | |
| SCRIPT = 1 | |
| ACCOUNTDISABLE = 2 | |
| HOMEDIR_REQUIRED = 8 | |
| LOCKOUT = 16 | |
| PASSWD_NOTREQD = 32 | |
| PASSWD_CANT_CHANGE = 64 | |
| ENCRYPTED_TEXT_PWD_ALLOWED = 128 | |
| TEMP_DUPLICATE_ACCOUNT = 256 | |
| NORMAL_ACCOUNT = 512 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"customEntities":{"script":[["1",{"name":"wall.js","value":{"mdTime":1641400238352,"srcCode":"await ACCio(_ => {\n socketGameSend.buildCityWall();\n selectNextAfterDelay();\n});"}}],["2",{"name":"setup.js","value":{"mdTime":1656815986599,"srcCode":" try {\n return ACCio(_ => console.log(\"ACCio is already enabled! Try refreshing if you're having trouble.\"));\n }\n catch (e) { console.error(e) }\n\n try {\n await ACtl.runInPageCtx('https://cdn.jsdelivr.net/gh/CoeJoder/[email protected]/waitForKeyElements.js');\n }\n catch {\n return ACtl.runInPageCtx(_ => console.error('ACCio failed to load all required libraries.'));\n }\n\n ACCio = new Proxy(ACtl.runInPageCtx, {\n apply: (target, thisArg, argumentsList) => {\n if (['INPUT', 'TEXTAREA'].includes(document.activeElement.tagName)) {\n return;\n }\n\n try { return target(...argumentsList); }\n catch (e) { console.error(e) }\n }\n });\n\n await ACtl.runInPageCtx(_ => waitForKeyElements('canvas[style* |