Projects STRLCPY scan4all Commits b49ed62a
🤬
  • ■ ■ ■ ■ ■ ■
    .github/workflows/dockerhub-push.yml
     1 +name: 🌥 Docker Push
     2 + 
     3 +on:
     4 + workflow_run:
     5 + workflows: ["🎉 Release Binary"]
     6 + types:
     7 + - completed
     8 + workflow_dispatch:
     9 + 
     10 +jobs:
     11 + docker:
     12 + runs-on: ubuntu-latest
     13 + steps:
     14 + - name: Git Checkout
     15 + uses: actions/checkout@v3
     16 + 
     17 + - name: Get Github tag
     18 + id: meta
     19 + run: |
     20 + echo "::set-output name=tag::$(curl --silent "https://api.github.com/repos/hktalent/scan4all/releases/latest" | jq -r .tag_name)"
     21 + 
     22 + - name: Set up QEMU
     23 + uses: docker/setup-qemu-action@v2
     24 + 
     25 + - name: Set up Docker Buildx
     26 + uses: docker/setup-buildx-action@v2
     27 + 
     28 + - name: Login to DockerHub
     29 + uses: docker/login-action@v2
     30 + with:
     31 + username: ${{ secrets.DOCKER_USERNAME }}
     32 + password: ${{ secrets.DOCKER_TOKEN }}
     33 + 
     34 + - name: Build and push
     35 + uses: docker/build-push-action@v3
     36 + with:
     37 + context: .
     38 + platforms: linux/amd64
     39 + push: true
     40 + tags: hktalent/scan4all:latest,hktalent/scan4all:${{ steps.meta.outputs.tag }}
  • ■ ■ ■ ■ ■
    pkg/fingerprint/fingerScan.go
    skipped 89 lines
    90 90   
    91 91  func CaseMethod(szUrl, method, bodyString, favhash, md5Body, hexBody string, finp *Fingerprint) []string {
    92 92   cms := []string{}
    93  - if !strings.HasSuffix(szUrl, finp.UrlPath) || 0 == len(finp.Keyword) {
     93 + u01, _ := url.Parse(strings.TrimSpace(szUrl))
     94 + if u01.Path != finp.UrlPath || 0 == len(finp.Keyword) {
    94 95   //log.Printf("%+v", finp)
    95 96   return cms
    96 97   }
    97  - u01, _ := url.Parse(strings.TrimSpace(szUrl))
     98 + 
    98 99   if _, ok := Mfavhash.Load(u01.Host + favhash); ok {
    99 100   return cms
    100 101   }
    skipped 120 lines
  • ■ ■ ■ ■ ■ ■
    pkg/fingerprint/matchfinger.go
    skipped 13 lines
    14 14   x = x && true
    15 15   rstr = k
    16 16   if KeywordMathOr {
     17 + x = true
    17 18   break
    18 19   }
    19 20   } else {
    skipped 17 lines
    37 38   x = x && true
    38 39   rstr = k
    39 40   if KeywordMathOr {
     41 + x = true
    40 42   break
    41 43   }
    42 44   } else {
    skipped 6 lines
Please wait...
Page is in error, reload to recover