Quellcode durchsuchen

Merge pull request #78 from derskythe/master

CI problems
DerSkythe vor 1 Jahr
Ursprung
Commit
9972536583
3 geänderte Dateien mit 17 neuen und 61 gelöschten Zeilen
  1. 4 49
      .github/workflows/pr-build.yaml
  2. 12 12
      README.md
  3. 1 0
      helpers/subbrute_worker.c

+ 4 - 49
.github/workflows/pr-build.yaml

@@ -2,6 +2,7 @@ name: "PR Build"
 run-name: "PR Build ${{ inputs.DEPLOY_TARGET }} triggered by ${{ github.EVENT_NAME }} (@${{ github.ACTOR }})"
 run-name: "PR Build ${{ inputs.DEPLOY_TARGET }} triggered by ${{ github.EVENT_NAME }} (@${{ github.ACTOR }})"
 
 
 on:
 on:
+  workflow_dispatch:
   pull_request:
   pull_request:
     types: [opened, reopened]
     types: [opened, reopened]
 
 
@@ -28,12 +29,8 @@ jobs:
         include:
         include:
           - firmware: unlshd
           - firmware: unlshd
             url: ${{ vars.REPO_UNLEASHED }}
             url: ${{ vars.REPO_UNLEASHED }}
-            version: ${{ vars.FIRMWARE_VERSION }}
-            src-included: 0
           - firmware: official
           - firmware: official
             url: ${{ vars.REPO_OFFICIAL }}
             url: ${{ vars.REPO_OFFICIAL }}
-            version: official
-            src-included: 0
     steps:
     steps:
       - name: Copy Firmware Files
       - name: Copy Firmware Files
         uses: actions/checkout@v4
         uses: actions/checkout@v4
@@ -44,7 +41,6 @@ jobs:
           ref: dev
           ref: dev
 
 
       - name: Copy Repo Files
       - name: Copy Repo Files
-        if: ${{ matrix.src-included == 0 }}
         uses: actions/checkout@v4
         uses: actions/checkout@v4
         with:
         with:
           repository: ${{ vars.REPO_SELF }}
           repository: ${{ vars.REPO_SELF }}
@@ -54,60 +50,19 @@ jobs:
 
 
       - name: Remove other apps
       - name: Remove other apps
         shell: pwsh
         shell: pwsh
+        if: ${{ success() }}
         # rm to remove problem FAP which includes non-existent files
         # rm to remove problem FAP which includes non-existent files
         run: |
         run: |
           Remove-Item -Force -Recurse ./applications/debug -ErrorAction SilentlyContinue
           Remove-Item -Force -Recurse ./applications/debug -ErrorAction SilentlyContinue
           Remove-Item -Force -Recurse ./applications/examples -ErrorAction SilentlyContinue
           Remove-Item -Force -Recurse ./applications/examples -ErrorAction SilentlyContinue
           Remove-Item -Force -Recurse ${{ env.RELATIVE_PATH }} -ErrorAction SilentlyContinue
           Remove-Item -Force -Recurse ${{ env.RELATIVE_PATH }} -ErrorAction SilentlyContinue
 
 
-      - name: Get SHA of our application and release version
-        shell: pwsh
-        env:
-          GITHUB_TOKEN: ${{ secrets.FLIPPER_TOKEN }}
-          INPUT_VERSION: ${{ inputs.version }}
-        run: |
-          Write-Output "::notice title=${{ matrix.firmware }} Input Version Number::v${{ inputs.version }}"
-          $fwInfo = ((gh release view --json tagName,url -R ${{ matrix.url }}) | ConvertFrom-Json)
-          cd '${{ env.APP_PATH }}'
-          $sha = (git rev-parse --verify HEAD)
-          
-          $releaseVersion = ''
-          $latestTag = ((gh release view --json tagName,url -R ${{ vars.REPO_SELF }}) | ConvertFrom-Json ).tagName
-
-          if ( [string]::IsNullOrWhitespace($env:INPUT_VERSION) ) {            
-            Write-Output "::notice title=${{ matrix.firmware }} Latest tag::$latestTag"
-            
-            $lastIndex = $latestTag.LastIndexOf('.')
-            
-            $minorValue = $latestTag.Substring($latestTag.LastIndexOf('.') + 1)
-            $minorValue = [Convert]::ToInt32($minorValue) + 1
-            $newTag = $latestTag.Substring(0, $lastIndex)
-            
-            $releaseVersion = ('{0}.{1}' -f $newTag, $minorValue)
-          } else {
-            $releaseVersion = "$env:INPUT_VERSION"
-          }
-          
-          if ( $releaseVersion.StartsWith('v') ) {
-            $releaseVersion = $releaseVersion.Substring(1)
-          }
-          
-          Write-Output "::notice title=${{ matrix.firmware }} PREV_TAG::$latestTag"
-          Write-Output "::notice title=${{ matrix.firmware }} RELEASE_VERSION::$releaseVersion"
-          Write-Output "::notice title=${{ matrix.firmware }} SHA::$sha"
-          Write-Output ('::notice title=${{ matrix.firmware }} FW_VERSION::{0}' -f $fwInfo.tagName)
-          
-          Write-Output ('RELEASE_VERSION={0}' -f $releaseVersion) >> $env:GITHUB_ENV
-          Write-Output ('SHA={0}' -f $sha) >> $env:GITHUB_ENV
-          Write-Output ('FW_VERSION={0}' -f $fwInfo.tagName) >> $env:GITHUB_ENV
-          Write-Output ('PREV_TAG={0}' -f $latestTag) >> $env:GITHUB_ENV
-
       - name: Build Firmware
       - name: Build Firmware
         shell: bash
         shell: bash
         if: ${{ success() }}
         if: ${{ success() }}
         env:
         env:
           FBT_NO_SYNC: 0
           FBT_NO_SYNC: 0
-          DIST_SUFFIX: ${{ matrix.version }}
+          DIST_SUFFIX: ${{ matrix.firmware }}
           WORKFLOW_BRANCH_OR_TAG: release-cfw
           WORKFLOW_BRANCH_OR_TAG: release-cfw
         run: |
         run: |
           ./fbt COMPACT=1 DEBUG=0 FBT_NO_SYNC=0
           ./fbt COMPACT=1 DEBUG=0 FBT_NO_SYNC=0
@@ -117,7 +72,7 @@ jobs:
         if: ${{ success() }}
         if: ${{ success() }}
         env:
         env:
           FBT_NO_SYNC: 0
           FBT_NO_SYNC: 0
-          DIST_SUFFIX: ${{ matrix.version }}
+          DIST_SUFFIX: ${{ matrix.firmware }}
           WORKFLOW_BRANCH_OR_TAG: release-cfw
           WORKFLOW_BRANCH_OR_TAG: release-cfw
           # rm to remove problem FAP which includes non-existent files
           # rm to remove problem FAP which includes non-existent files
         run: |
         run: |

+ 12 - 12
README.md

@@ -1,9 +1,9 @@
-# SubGHz Bruteforcer Application for Flipper Zero
+# SubGHz BruteForcer Application for Flipper Zero
 
 
 ![image](https://github.com/DarkFlippers/flipperzero-subbrute/assets/31771569/0a952559-94c0-40b7-8b9c-9ee4e37c6cd6)
 ![image](https://github.com/DarkFlippers/flipperzero-subbrute/assets/31771569/0a952559-94c0-40b7-8b9c-9ee4e37c6cd6)
 
 
 
 
-SubGhz Bruteforcer from [Unleashed Firmware](https://github.com/DarkFlippers/unleashed-firmware)
+SubGhz BruteForcer from [Unleashed Firmware](https://github.com/DarkFlippers/unleashed-firmware)
 
 
 ## Disclaimer
 ## Disclaimer
 
 
@@ -21,8 +21,8 @@ You can also download the [release](https://github.com/derskythe/flipperzero-sub
 <br />
 <br />
 > [!WARNING]
 > [!WARNING]
 >
 >
-> The application is not compatible with the official firmware version.
-> Also, it has not been tested on other firmware versions other than [Unleashed Firmware](https://github.com/DarkFlippers/unleashed-firmware) and [OFW](https://github.com/flipperdevices/flipperzero-firmware).
+> The application has not been tested on other firmware versions other than [Unleashed Firmware](https://github.com/DarkFlippers/unleashed-firmware)
+> and [OFW](https://github.com/flipperdevices/flipperzero-firmware).
 
 
 ---
 ---
 
 
@@ -33,12 +33,12 @@ You can also download the [release](https://github.com/derskythe/flipperzero-sub
 ![image](https://github.com/DarkFlippers/flipperzero-subbrute/assets/31771569/9f428d6e-59fd-4517-895d-fb185f8d884f)
 ![image](https://github.com/DarkFlippers/flipperzero-subbrute/assets/31771569/9f428d6e-59fd-4517-895d-fb185f8d884f)
 
 
 <p>Here you can select the protocol and frequency that will be used for bruteforce.</p>
 <p>Here you can select the protocol and frequency that will be used for bruteforce.</p>
-<p>According to our observations, `CAME 12bit 433MHz` is the most common protocol, so it is selected by default.
-To identify other devices and protocols, you should inspect the device.</p>
-<p>According to the protocol, when probe a key, each value is sent 3 times.</p>
-<p>Most of the devices this works but there are devices that don't work and more repetitions are needed.</p>
+<p>According to our observations, <code>CAME 12bit 433MHz</code> is the most common protocol, so it is selected by default.</p>
+<p></p>To identify other devices and protocols you should inspect the device.</p>
+<p>According to the protocol, when probe a key, each value is sent 3 times.
+For most of the devices this works but there are devices that don't work and more repetitions are needed.</p>
 <p>The number of repetitions can be increased with the right button, the left button decreases the value.</p>
 <p>The number of repetitions can be increased with the right button, the left button decreases the value.</p>
-<p>The negative side of increasing the number of repetitions will be a longer key find time.</p>
+<p>But negative side of increasing the number of repetitions will be a longer key find time.</p>
 
 
 ![image](https://github.com/DarkFlippers/flipperzero-subbrute/assets/31771569/a17695d0-833d-44ce-a0d0-ead8366cb4fe)
 ![image](https://github.com/DarkFlippers/flipperzero-subbrute/assets/31771569/a17695d0-833d-44ce-a0d0-ead8366cb4fe)
 
 
@@ -114,7 +114,7 @@ To identify other devices and protocols, you should inspect the device.</p>
 
 
 > [!NOTE]
 > [!NOTE]
 >
 >
-> Only dip switch combinations, not full 25bit bruteforce
+> Only DIP switch combinations, not full 25bit bruteforce
 
 
 - UNILARM 25bit 330MHz (TE: 209μs)
 - UNILARM 25bit 330MHz (TE: 209μs)
 - UNILARM 25bit 433MHz (TE: 209μs)
 - UNILARM 25bit 433MHz (TE: 209μs)
@@ -123,7 +123,7 @@ To identify other devices and protocols, you should inspect the device.</p>
 
 
 > [!NOTE]
 > [!NOTE]
 >
 >
-> Only dip switch combinations, not full 25bit bruteforce
+> Only DIP switch combinations, not full 25bit bruteforce
 
 
 - SMC5326 25bit 330MHz (TE: 320μs)
 - SMC5326 25bit 330MHz (TE: 320μs)
 - SMC5326 25bit 433MHz (TE: 320μs)
 - SMC5326 25bit 433MHz (TE: 320μs)
@@ -132,7 +132,7 @@ To identify other devices and protocols, you should inspect the device.</p>
 
 
 > [!NOTE]
 > [!NOTE]
 >
 >
-> Only for 8 dip switch remote, not full 24bit bruteforce
+> Only for 8 DIP switch remote, not full 24bit bruteforce
 
 
 - PT2260 24bit 315MHz (TE: 286μs)
 - PT2260 24bit 315MHz (TE: 286μs)
 - PT2260 24bit 330MHz (TE: 286μs)
 - PT2260 24bit 330MHz (TE: 286μs)

+ 1 - 0
helpers/subbrute_worker.c

@@ -1,4 +1,5 @@
 #include "subbrute_worker_private.h"
 #include "subbrute_worker_private.h"
+#include <furi.h>
 #include <string.h>
 #include <string.h>
 #include <toolbox/stream/stream.h>
 #include <toolbox/stream/stream.h>
 #include <flipper_format.h>
 #include <flipper_format.h>