This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| host="" | |
| username="" | |
| password="" | |
| database="" | |
| datestamp=$(date +"%m-%d-%Y") | |
| cd "/databackup/backup" | |
| ##Start DATABASE BACKUP | |
| rm *.sql | |
| for x in `mysql --skip-column-names -h$host -u$username -p$password $database -e 'show tables;'`; do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install Node.js and npm (adjust the version as needed) | |
| RUN apt-get -y update && apt-get install -y ca-certificates curl gnupg | |
| RUN mkdir -p /etc/apt/keyrings | |
| RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --batch --dearmor -o /etc/apt/keyrings/nodesource.gpg | |
| RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list | |
| RUN apt-get update && apt-get install nodejs -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Switch to root | |
| sudo -i | |
| ## Disable IPv6 | |
| echo "net.ipv6.conf.all.disable_ipv6=1" > /etc/sysctl.d/99-disable-ipv6.conf | |
| echo "net.ipv6.conf.default.disable_ipv6=1" >> /etc/sysctl.d/99-disable-ipv6.conf | |
| echo "net.ipv6.conf.lo.disable_ipv6=1" >> /etc/sysctl.d/99-disable-ipv6.conf | |
| sysctl -p /etc/sysctl.d/99-disable-ipv6.conf | |
| sed -i 's/IPV6=yes/IPV6=no/g' /etc/default/ufw | |
| ufw disable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Allow traffic all around the local subnet | |
| ufw allow in to 192.168.1.0/24 | |
| ufw allow out to 192.168.1.0/24 | |
| ## Default deny traffic rules | |
| ufw default deny outgoing | |
| ufw default deny incoming | |
| ## Allow connections to the OpenVPN Server on the specific port/protocol | |
| ufw allow out to 12.34.56.78 port 1194 proto udp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $key = '' | |
| $rendezvous_server = '' | |
| $relay_server = '' | |
| $api_server = '' | |
| $nat_type = 1 | |
| $serial = 0 | |
| $setupUnattendedAccess = 1 | |
| $process = "rustdesk" | |
| $ServiceName = 'Rustdesk' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # requires inotify-tools and mailutils and rsync | |
| #echo "fs.inotify.max_user_watches=524288" | sudo tee -a /etc/sysctl.d/99-sysctl.conf | |
| # Directory to be monitored | |
| MONITOR_DIR="/var/www/html" | |
| # Directory to store file backups | |
| BACKUP_DIR="/var/www/filewatcher_backup/html" | |
| mkdir -p "$BACKUP_DIR" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| setlocal | |
| :: Check if a file path was provided as an argument | |
| if "%~1"=="" ( | |
| echo No WPL file was dragged onto the script. | |
| pause | |
| exit /b | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| setlocal | |
| :: Check if a folder path was provided as an argument | |
| if "%~1"=="" ( | |
| echo No folder path was provided. | |
| pause | |
| exit /b | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include <string.h> | |
| // Simplified MD4 implementation | |
| typedef struct { | |
| uint32_t state[4]; | |
| uint32_t count[2]; | |
| unsigned char buffer[64]; | |
| } MD4_CTX; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # map different architecture variations to the available binaries | |
| ARCH=$(uname -m) | |
| case $ARCH in | |
| i386|i686) ARCH=x86 ;; | |
| armv6*) ARCH=armv6 ;; | |
| armv7*) ARCH=armv7 ;; | |
| aarch64*) ARCH=arm64 ;; | |
| esac | |
| # prepare the download URL |