diff --git a/.github/workflows/docker-image-dev.yml b/.github/workflows/docker-image-dev.yml index 47110ae..d6d962a 100644 --- a/.github/workflows/docker-image-dev.yml +++ b/.github/workflows/docker-image-dev.yml @@ -23,7 +23,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ github.actor }}/wifi_db + images: ${{ github.repository }} - name: Login to DockerHub uses: docker/login-action@v1 @@ -38,7 +38,7 @@ jobs: file: ./Dockerfile platforms: linux/amd64,linux/arm64 push: true - tags: ${{ secrets.DOCKERHUB_USERNAME }}/wifi_db:dev + tags: ${{ github.repository }}:dev - name: Login to GitHub Container Registry run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin @@ -51,4 +51,4 @@ jobs: file: ./Dockerfile platforms: linux/amd64,linux/arm64 push: true - tags: ghcr.io/${{ github.actor }}/wifi_db:dev \ No newline at end of file + tags: ghcr.io/${{ github.repository }}:dev \ No newline at end of file diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index aa9f430..0ac671d 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -25,7 +25,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ github.actor }}/wifi_db + images: ${{ github.repository }} - name: Login to DockerHub uses: docker/login-action@v1 @@ -54,5 +54,5 @@ jobs: file: ./Dockerfile platforms: linux/amd64,linux/arm64 push: true - tags: ghcr.io/${{ github.actor }}/wifi_db:latest, ghcr.io/${{ steps.meta.outputs.tags }} + tags: ghcr.io/${{ github.repository }}:latest, ghcr.io/${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 51a33ca..1221ab5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,17 +4,19 @@ FROM ubuntu:22.04 as hcxtools-builder WORKDIR /app RUN apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install python3-pip make git zlib1g-dev -y \ - && apt-get install pkg-config libcurl4-openssl-dev libssl-dev zlib1g-dev make gcc -y \ + && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends python3-pip make git zlib1g-dev -y \ + && apt-get install --no-install-recommends pkg-config libcurl4-openssl-dev libssl-dev zlib1g-dev make gcc -y \ && apt-get clean && rm -rf /var/lib/apt/lists/* # Clone hcxtools and install -RUN git clone -b 6.3.1 https://github.com/ZerBea/hcxtools.git /app/hcxtools \ - && cd /app/hcxtools \ - && make \ - && make install \ - && cd /app \ - && rm -rf /app/hcxtools +RUN git clone -b 6.3.1 https://github.com/ZerBea/hcxtools.git /app/hcxtools + +WORKDIR /app/hcxtools +RUN make \ + && make install + +WORKDIR /app +RUN rm -rf /app/hcxtools FROM ubuntu:22.04 @@ -22,6 +24,7 @@ WORKDIR /app # Install dependencies ENV DEBIAN_FRONTEND noninteractive + RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get update && apt-get install -y --no-install-recommends python3-pip tshark git libcurl4-openssl-dev libssl-dev -y \ && apt-get clean && rm -rf /var/lib/apt/lists/* @@ -30,8 +33,8 @@ COPY --from=hcxtools-builder /usr/bin/hcx* /usr/bin/ # Copy and install Python dependencies -RUN python3 -m pip install --no-cache-dir -U pip \ - && python3 -m pip install --no-cache-dir pytest + +RUN python3 -m pip install --no-cache-dir --upgrade pip==20.0.2 COPY requirements.txt requirements.txt RUN pip3 install --no-cache-dir -r requirements.txt diff --git a/README.md b/README.md index bd6a3d1..07ea122 100755 --- a/README.md +++ b/README.md @@ -148,7 +148,7 @@ pip3 install -r requirements.txt ## Usage -### Usage example in [WiFiChallenge Lab](https://wifichallengelab.com/) +### Usage example in [WiFiChallenge Lab](https://lab.wifichallenge.com/) - https://r4ulcl.com/posts/wifi_db-in-wifichallenge-lab/ diff --git a/requirements.txt b/requirements.txt index 5d48e77..2fe4807 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ defusedxml==0.7.1 -ftfy==6.1.3 +ftfy==6.2.0 nest_asyncio==1.5.8 pyshark==0.6 -Requests==2.31.0 -pytest==7.4.2 \ No newline at end of file +Requests==2.32.3 +pytest==8.2.2 diff --git a/utils/oui.py b/utils/oui.py index ea5e7bb..49c618d 100644 --- a/utils/oui.py +++ b/utils/oui.py @@ -45,7 +45,7 @@ def load_vendors(): "Sec-Fetch-Mode": "navigate", "Sec-Fetch-Site": "none", "Sec-Fetch-User": "?1", "Te": "trailers"} - response = requests.get(url, headers=headersR) + response = requests.get(url, headers=headersR, timeout=5) tmp.write(response.content) tmp.seek(0) diff --git a/utils/update.py b/utils/update.py index 2845ffc..8f06d4b 100644 --- a/utils/update.py +++ b/utils/update.py @@ -18,7 +18,7 @@ def is_git_installed(): def get_latest_github_release(repo_url): try: - response = requests.get(f"{repo_url}/releases/latest") + response = requests.get(f"{repo_url}/releases/latest", timeout=5) if response.status_code == 200: latest_release_tag = response.json()["tag_name"] return latest_release_tag diff --git a/wifi_db.py b/wifi_db.py index f91db0a..df01aff 100755 --- a/wifi_db.py +++ b/wifi_db.py @@ -18,7 +18,7 @@ # import nest_asyncio ; nest_asyncio.apply() -> # Fix RuntimeError: This event loop is already running” -VERSION = '1.5' +VERSION = '1.5.1' def banner():