mirror of
https://github.com/ApfelTeeSaft/OG-Fortnite-Cheat.git
synced 2026-08-27 03:43:39 +00:00
22 lines
566 B
PowerShell
22 lines
566 B
PowerShell
Param(
|
|
[string]$filePath
|
|
)
|
|
|
|
$contentBytes = [IO.File]::ReadAllBytes($filePath)
|
|
|
|
$content = [System.Text.Encoding]::Default.GetString($contentBytes)
|
|
|
|
$pathRegex = '[A-Za-z]:\\(?:[^\\\/:*?"<>|\x00\r\n]+\\)*[^\\\/:*?"<>|\x00\r\n]*'
|
|
|
|
$matches = [regex]::Matches($content, $pathRegex)
|
|
|
|
foreach ($match in $matches) {
|
|
$startIndex = $match.Index
|
|
$length = $match.Length
|
|
|
|
for ($i = $startIndex; $i -lt ($startIndex + $length); $i++) {
|
|
$contentBytes[$i] = Get-Random -Minimum 33 -Maximum 127
|
|
}
|
|
}
|
|
|
|
[IO.File]::WriteAllBytes($filePath, $contentBytes) |