Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 16 days 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 (7 months ago)
- Default Branch: main
- Last Pushed: 2024-07-12T10:04:54.000Z (7 months ago)
- Last Synced: 2024-07-13T11:23:01.806Z (7 months ago)
- Topics: powershell, security, strings, windows
- Language: PowerShell
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 3
- 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
```