> ## Documentation Index
> Fetch the complete documentation index at: https://lua.starline.one/llms.txt
> Use this file to discover all available pages before exploring further.

# System

> Block programs with Windows Firewall and clean up session-created rules.

OS utility functions.

## SetProgramBlocked

```lua theme={"dark"}
local steam = "C:\\Program Files (x86)\\Steam\\steam.exe"

system.SetProgramBlocked(steam, true)   -- block and disconnect it
system.SetProgramBlocked(steam, false)  -- unblock
```

`path` is an absolute executable path. Enabling adds inbound and outbound firewall rules and closes current IPv4 TCP connections. Disabling removes the rules. Returns whether the firewall change succeeded.

Errors if `path` is empty, longer than 260, not absolute, or contains a `"` or control character.

Firewall rules cover IPv4 and IPv6. Connection teardown covers IPv4 only. Rules are removed when disabled, when the script unloads, reloads, or is disabled, and when the cheat closes normally.

## IsProgramBlocked

```lua theme={"dark"}
if system.IsProgramBlocked(path) then ... end
```

`true` if this session has a block on `path`.

## KillProgramConnections

```lua theme={"dark"}
local n = system.KillProgramConnections(path)
```

Drops active IPv4 TCP connections for processes running from `path`. It does not change the firewall and returns the number of connections dropped.

## Cleanup

A crash may leave a `Starline-NetBlock-*` firewall rule behind. Re-block and unblock the program, or remove the rule in Windows Firewall.
