Skip to content

Commit

Permalink
Merge branch 'dev' into dependabot/pip/pytest-8.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
r4ulcl authored Mar 11, 2024
2 parents 6abc059 + 1723dd4 commit ec30023
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docker-image-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -51,4 +51,4 @@ jobs:
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/${{ github.actor }}/wifi_db:dev
tags: ghcr.io/${{ github.repository }}:dev
4 changes: 2 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
23 changes: 13 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,27 @@ 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

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/*

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion utils/oui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion utils/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion wifi_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit ec30023

Please sign in to comment.