https://github.com/the-viper-one/invoke-powerstrings
Extract strings from binary files with PowerShell
https://github.com/the-viper-one/invoke-powerstrings
powershell security strings windows
Last synced: 4 months ago
JSON representation
Extract strings from binary files with PowerShell
- Host: GitHub
- URL: https://github.com/the-viper-one/invoke-powerstrings
- Owner: The-Viper-One
- Created: 2024-07-12T09:53:27.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-12T10:04:54.000Z (about 1 year ago)
- Last Synced: 2025-01-22T10:18:30.292Z (6 months ago)
- Topics: powershell, security, strings, windows
- Language: PowerShell
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Invoke-PowerStrings
`Invoke-PowerStrings` is a PowerShell function that extracts readable strings from a file with specified encoding and minimum length. This can be particularly useful for analyzing binary files, logs, or any files where you need to extract text content.
## Parameters
- **`FilePath`** (Mandatory): The path to the file from which to extract strings.
- **`Encoding`** (Optional): The encoding to use for string extraction. Accepts `Default`, `Ascii`, or `Unicode`. Default is `Default`.
- **`MinimumLength`** (Optional): The minimum length of strings to extract. Default is 3.## Usage
## Load into memory
```powershell
IEX(New-Object System.Net.WebClient).DownloadString("https://raw.githubusercontent.com/The-Viper-One/Invoke-PowerStrings/main/Invoke-PowerStrings.ps1")
```### Example 1: Extracting with Default Encoding and Minimum Length
```powershell
# Extracts strings with Ascii encoding and default minimum length of 3 from the specified file.
Invoke-PowerStrings -FilePath "\\Server.security.local\FilesShare\backup.bak" -Encoding Ascii# Extracts strings with default encoding and minimum length of 5 from the specified file.
Invoke-PowerStrings -FilePath "C:\windows\temp\data.bin" -MinimumLength 5# Execute with Unicode encoding and default minimum length of 3
Invoke-PowerStrings -FilePath "C:\windows\temp\data.bin" -Encoding Unicode -MinimumLength 3
```