Last active
January 22, 2025 01:01
-
-
Save r15ch13/0f82e368003a1e0150f97dc585fa2527 to your computer and use it in GitHub Desktop.
Revisions
-
r15ch13 revised this gist
May 21, 2023 . 2 changed files with 20 additions and 18 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,18 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ # Converts Flipper SubGhz RAW Files to PSCustomObject[] function ConvertFrom-SubGhzRAW { param( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)] [String] $Path ) process { $data = Get-Content $Path if(!$data.Contains("Filetype: Flipper SubGhz RAW File")) { throw "$Path is not a Flipper SubGhz RAW File" } $data | Select-Object -Skip 5 | ForEach-Object { $_.Replace("RAW_Data: ", "") } | Join-String -Separator " " | Select-String -Pattern '(\d+)\s(-\d+)' -AllMatches | ForEach-Object { $_.Matches } | ForEach-Object { [PSCustomObject]@{ Tone = $_.Groups[1]; Silence = $_.Groups[2] } } } } -
r15ch13 revised this gist
May 21, 2023 . No changes.There are no files selected for viewing
-
r15ch13 created this gist
May 21, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ # Converts Flipper SubGhz RAW Files to CSV function ConvertSubTo-Csv { param( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)] [String] $Path ) process { Get-Content $Path | Select-Object -Skip 5 | ForEach-Object { $_.Replace("RAW_Data: ", "") } | Join-String -Separator " " | Select-String -Pattern '(\d+)\s(-\d+)' -AllMatches | ForEach-Object { $_.Matches } | ForEach-Object { @{ Tone = $_.Groups[1]; Silence = $_.Groups[2] } } | ConvertTo-Csv } }