On client, run:
ssh -f -N -D 1080 -p 22 USER@REMOTE_ADDRreplace:
1080 - with port to open local SOCKS server at (if already taken).
On client, run:
ssh -f -N -D 1080 -p 22 USER@REMOTE_ADDRreplace:
1080 - with port to open local SOCKS server at (if already taken).
| import asyncio | |
| import sftp | |
| async def main() -> None: | |
| ssh_port = 22 | |
| root_dir = r"C:/" | |
| username = "admin" | |
| password = "mypassword" |
| import powershell | |
| def main() -> None: | |
| with powershell.PowerShell() as pwsh: | |
| proc = pwsh.execute_command("Get-Process -Name explorer") | |
| id = pwsh.get_str_property(proc, "Id") | |
| print(f"Explorer process ID: {id}") | |
| import process | |
| def main() -> None: | |
| process.start_process( | |
| "python", | |
| ["--version"], | |
| raise_on_exitcode=True, | |
| ) |
| """ | |
| Windows Privilege Elevation Utility | |
| This script provides functions to check and elevate process privileges on Windows systems, | |
| ranging from standard user to Administrator, SYSTEM, and TrustedInstaller levels. It uses | |
| Windows APIs to trigger UAC prompts and impersonate higher-privilege tokens. | |
| Tested with python 3.13.9 | |
| Package dependencies: |
| #!/bin/bash | |
| # Tested with go 1.22.5 | |
| project_name="my_project" # Change to your project name | |
| main_file="${project_name}.go" # Or main.go, depends on your project structure | |
| build_path="./build" | |
| # Add values to your liking from "go tool dist list" command | |
| # or https://gist.github.com/asukakenji/f15ba7e588ac42795f421b48b8aede63 |
Create minecraft-compose.yaml:
services:
mc-survival:
container_name: mc-survival
image: itzg/minecraft-server:latest
environment:
TYPE: FABRIC
SERVER_NAME: MyServer| // Add to your Cargo.toml: | |
| // [dependencies] | |
| // subprocess = { version = "0.2.10", git = "https://github.com/SCP002/rust-subprocess.git" } | |
| use subprocess::Exec; | |
| fn main() { | |
| let exit_status = Exec::cmd("my-executable-name") | |
| .arg("arg1") | |
| .creation_flags(0x00000010) // CREATE_NEW_CONSOLE |
| # write systemd config for the first instance | |
| sudo tee /lib/systemd/system/astra-8000.service > /dev/null << ENDSEQ | |
| [Unit] | |
| Description=Astra 8000 service (%N) | |
| After=network-online.target | |
| StartLimitBurst=5 | |
| StartLimitIntervalSec=10 | |
| [Service] | |
| Type=simple |