Skip to content

Commit

Permalink
v2.1 from dev to main
Browse files Browse the repository at this point in the history
v2.1 from dev to main
  • Loading branch information
r4ulcl authored Dec 21, 2024
2 parents 70eee6d + dbdfdb8 commit edab061
Show file tree
Hide file tree
Showing 112 changed files with 1,349 additions and 2,379 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/docker-image-nzyme-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Docker Image CI nzyme DEV

on:
push:
branches:
- 'dev'

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Checkout
uses: actions/checkout@v3

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./nzyme
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/wifichallengelab-nzyme:dev
41 changes: 41 additions & 0 deletions .github/workflows/docker-image-nzyme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Docker Image CI nzyme

on:
push:
tags:
- 'v*'

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Checkout
uses: actions/checkout@v3

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ secrets.DOCKERHUB_USERNAME }}/wifichallengelab-nzyme

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./nzyme
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ logsClient/*
vagrant/.vagrant/*
vagrant/date.log
*.log
.DS_Store
55 changes: 39 additions & 16 deletions APs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM debian
#FROM kalilinux/kali-rolling
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y macchanger sudo iw libcurl4-openssl-dev curl libz-dev module-assistant libssl-dev libnl-genl-3-dev libnl-3-dev pkg-config libsqlite3-dev git hostapd dnsmasq make g++ libnl-3-dev libnl-genl-3-dev apache2 php wpasupplicant iproute2 net-tools iptables kmod iputils-ping gettext-base wget

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y macchanger sudo iw libcurl4-openssl-dev curl libz-dev module-assistant libssl-dev libnl-genl-3-dev libnl-3-dev pkg-config libsqlite3-dev git hostapd dnsmasq make g++ libnl-3-dev libnl-genl-3-dev apache2 openssl php libapache2-mod-php wpasupplicant iproute2 net-tools iptables kmod iputils-ping gettext-base wget

#RUN date

Expand All @@ -10,7 +11,6 @@ COPY config/psk/ /root/psk/
COPY config/mgt/ /root/mgt/
COPY config/wpa3/ /root/wpa3/
COPY config/wep/ /root/wep/
COPY config/certs/ /root/mgt/certs/

#COPY var file
COPY config/wlan_config_aps /root/
Expand All @@ -22,32 +22,52 @@ COPY config/connectINET.sh /root/
COPY config/cronAPs.sh /root/

#Update certs
#RUN cd /root/mgt/certs/ ; make install
#RUN cd /root/certs/ ; make install

COPY config/dnsmasq.conf /etc/dnsmasq.conf.tmp
COPY config/interfaces /etc/network/interfaces.tmp

#Copy HTML files
COPY config/html /var/www/html/
RUN mkdir /var/www/html/.internalCA/
RUN cp /root/mgt/certs/ca.crt /var/www/html/.internalCA/ca.crt.txt \
; cp /root/mgt/certs/ca.key /var/www/html/.internalCA/ca.key.txt \
; cp /root/mgt/certs/ca.serial /var/www/html/.internalCA/ca.serial.txt \
; cp /root/mgt/certs/server.crt /var/www/html/.internalCA/server.crt.txt \
; cp /root/mgt/certs/server.key /var/www/html/.internalCA/server.key.txt \
; cp /root/mgt/certs/client.ext /var/www/html/.internalCA/client.ext.txt \
; cp /root/mgt/certs/client.conf /var/www/html/.internalCA/client.conf.txt \
; chown -R www-data:www-data /var/www/html/ ; rm /var/www/html/index.html

RUN chown -R www-data:www-data /var/www/html/
RUN rm /var/www/html/index.html

# Make sure Apache uses index.php as the default file
RUN echo "<IfModule mod_dir.c>\n DirectoryIndex index.php index.html\n</IfModule>" > /etc/apache2/mods-enabled/dir.conf

# Enable the SSL and rewrite modules
RUN a2enmod ssl && a2enmod rewrite

# Create a custom SSL VirtualHost configuration for Apache
RUN echo "<IfModule mod_ssl.c>\n\
<VirtualHost *:443>\n\
ServerAdmin [email protected]\n\
DocumentRoot /var/www/html\n\
SSLEngine on\n\
SSLCertificateFile /root/certs/server.crt\n\
SSLCertificateKeyFile /root/certs/server.key\n\
<Directory /var/www/html>\n\
Options Indexes FollowSymLinks\n\
AllowOverride All\n\
Require all granted\n\
</Directory>\n\
ErrorLog \${APACHE_LOG_DIR}/error.log\n\
CustomLog \${APACHE_LOG_DIR}/access.log combined\n\
</VirtualHost>\n\
</IfModule>" > /etc/apache2/sites-available/default-ssl.conf

# Enable the SSL site
RUN a2ensite default-ssl.conf
RUN a2enmod ssl

#WPS
RUN touch /var/run/hostapd_wps_pin_requests

#Apache
RUN update-rc.d apache2 defaults


#Change name of wpa_supplicant to avoid airmon-ng check kill, etc
RUN mv /usr/sbin/hostapd /usr/sbin/hostapd_aps
#Change name of hostapd to avoid airmon-ng check kill, etc
RUN mv /usr/sbin/hostapd /usr/sbin/host_aps_apd


COPY config/ns-inet.sh /root/
Expand All @@ -72,5 +92,8 @@ COPY config/opennds.conf.tmp /etc/opennds/opennds.conf.tmp
COPY config/theme_user-email-login-basic.sh /usr/lib/opennds/
RUN chmod +x /usr/lib/opennds/theme_user-email-login-basic.sh

# Expose both HTTP and HTTPS ports
EXPOSE 80 443

# exec ns-inet.sh and waits aits
CMD ["/bin/bash", "/root/ns-inet.sh"]
27 changes: 0 additions & 27 deletions APs/config/certs/c/ca.crt

This file was deleted.

27 changes: 0 additions & 27 deletions APs/config/certs/c/ca.key

This file was deleted.

15 changes: 0 additions & 15 deletions APs/config/certs/c/ca.key.txt.a

This file was deleted.

12 changes: 0 additions & 12 deletions APs/config/certs/c/ca.key.txt.b

This file was deleted.

1 change: 0 additions & 1 deletion APs/config/certs/c/ca.serial

This file was deleted.

8 changes: 0 additions & 8 deletions APs/config/certs/c/dh

This file was deleted.

23 changes: 0 additions & 23 deletions APs/config/certs/c/server.crt

This file was deleted.

27 changes: 0 additions & 27 deletions APs/config/certs/c/server.key

This file was deleted.

15 changes: 0 additions & 15 deletions APs/config/certs/c/server.key.txt.a

This file was deleted.

12 changes: 0 additions & 12 deletions APs/config/certs/c/server.key.txt.b

This file was deleted.

24 changes: 0 additions & 24 deletions APs/config/certs/ca.conf

This file was deleted.

Loading

0 comments on commit edab061

Please sign in to comment.